Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2 Pull up following revision(s) (requ...
details: https://anonhg.NetBSD.org/src/rev/713b476464b3
branches: netbsd-7
changeset: 798530:713b476464b3
user: martin <martin%NetBSD.org@localhost>
date: Mon Nov 10 19:45:53 2014 +0000
description:
Pull up following revision(s) (requested by snj in ticket #191):
sys/external/bsd/drm2/include/linux/io-mapping.h: revision 1.4
sys/external/bsd/drm2/dist/uapi/drm/drm.h: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_panel.c: revision 1.5
sys/external/bsd/drm2/dist/uapi/drm/drm.h: revision 1.6
sys/external/bsd/drm2/dist/drm/i915/intel_drv.h: revision 1.7
sys/external/bsd/drm2/include/linux/ww_mutex.h: revision 1.7
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c: revision 1.8
sys/external/bsd/drm2/dist/drm/i915/i915_ums.c: revision 1.2
sys/external/bsd/drm2/dist/drm/i915/intel_pm.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c: revision 1.2
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h: revision 1.9
sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c: revision 1.4
sys/external/bsd/drm2/dist/drm/i915/intel_dsi.c: revision 1.3
sys/external/bsd/drm2/dist/drm/i915/intel_display.c: revision 1.11
sys/external/bsd/drm2/dist/drm/i915/intel_hdmi.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_display.c: revision 1.12
sys/external/bsd/drm2/include/asm/processor.h: revision 1.3
sys/external/bsd/drm2/dist/drm/i915/intel_crt.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_sideband.c: revision 1.2
sys/external/bsd/drm2/dist/drm/i915/intel_ddi.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/intel_tv.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c: revision 1.11
sys/external/bsd/drm2/dist/drm/i915/i915_irq.c: revision 1.10
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.16
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.17
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.6
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.7
sys/external/bsd/drm2/drm/drm_module.c: revision 1.8
sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c: revision 1.2
sys/external/bsd/drm2/dist/drm/i915/intel_dsi_cmd.c: revision 1.2
sys/external/bsd/drm2/i915drm/intelfb.c: revision 1.10
sys/external/bsd/drm2/dist/drm/i915/intel_dvo.c: revision 1.2
sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c: revision 1.6
sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c: revision 1.6
Code cleanup and minor bugfixes for drm2.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c | 3 +-
sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c | 22 +-
sys/external/bsd/drm2/dist/drm/i915/i915_dma.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h | 10 +-
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 74 ++++++--
sys/external/bsd/drm2/dist/drm/i915/i915_irq.c | 46 ++--
sys/external/bsd/drm2/dist/drm/i915/i915_ums.c | 6 +-
sys/external/bsd/drm2/dist/drm/i915/intel_crt.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_ddi.c | 12 +-
sys/external/bsd/drm2/dist/drm/i915/intel_display.c | 110 ++++++------
sys/external/bsd/drm2/dist/drm/i915/intel_dp.c | 10 +-
sys/external/bsd/drm2/dist/drm/i915/intel_drv.h | 24 +-
sys/external/bsd/drm2/dist/drm/i915/intel_dsi.c | 4 +-
sys/external/bsd/drm2/dist/drm/i915/intel_dsi_cmd.c | 16 +-
sys/external/bsd/drm2/dist/drm/i915/intel_dvo.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_hdmi.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_lvds.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_panel.c | 22 +-
sys/external/bsd/drm2/dist/drm/i915/intel_pm.c | 16 +-
sys/external/bsd/drm2/dist/drm/i915/intel_sdvo.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_sideband.c | 4 +-
sys/external/bsd/drm2/dist/drm/i915/intel_sprite.c | 2 +-
sys/external/bsd/drm2/dist/drm/i915/intel_tv.c | 2 +-
sys/external/bsd/drm2/dist/uapi/drm/drm.h | 2 +
sys/external/bsd/drm2/drm/drm_module.c | 9 +-
sys/external/bsd/drm2/i915drm/intelfb.c | 6 +-
sys/external/bsd/drm2/include/asm/processor.h | 4 +-
sys/external/bsd/drm2/include/linux/io-mapping.h | 4 +-
sys/external/bsd/drm2/include/linux/ww_mutex.h | 150 ++++++++++++++---
sys/external/bsd/drm2/ttm/ttm_bo_vm.c | 19 +-
30 files changed, 355 insertions(+), 234 deletions(-)
diffs (truncated from 2325 to 300 lines):
diff -r 6fad0eec449d -r 713b476464b3 sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c Mon Nov 10 19:20:33 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_cmd_parser.c Mon Nov 10 19:45:53 2014 +0000
@@ -370,7 +370,8 @@
{
int ret = 0;
u32 *cmd, *batch_base, *batch_end;
- struct drm_i915_cmd_descriptor default_desc = { 0 };
+ static const struct drm_i915_cmd_descriptor zero_default_desc;
+ struct drm_i915_cmd_descriptor default_desc = zero_default_desc;
int needs_clflush = 0;
ret = i915_gem_obj_prepare_shmem_read(batch_obj, &needs_clflush);
diff -r 6fad0eec449d -r 713b476464b3 sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c Mon Nov 10 19:20:33 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_debugfs.c Mon Nov 10 19:45:53 2014 +0000
@@ -2360,7 +2360,7 @@
struct pipe_crc_info {
const char *name;
struct drm_device *dev;
- enum pipe pipe;
+ enum i915_pipe pipe;
};
static int i915_pipe_crc_open(struct inode *inode, struct file *filep)
@@ -2511,7 +2511,7 @@
};
static int i915_pipe_crc_create(struct dentry *root, struct drm_minor *minor,
- enum pipe pipe)
+ enum i915_pipe pipe)
{
struct drm_device *dev = minor->dev;
struct dentry *ent;
@@ -2585,7 +2585,7 @@
return 0;
}
-static int i9xx_pipe_crc_auto_source(struct drm_device *dev, enum pipe pipe,
+static int i9xx_pipe_crc_auto_source(struct drm_device *dev, enum i915_pipe pipe,
enum intel_pipe_crc_source *source)
{
struct intel_encoder *encoder;
@@ -2637,7 +2637,7 @@
}
static int vlv_pipe_crc_ctl_reg(struct drm_device *dev,
- enum pipe pipe,
+ enum i915_pipe pipe,
enum intel_pipe_crc_source *source,
uint32_t *val)
{
@@ -2694,7 +2694,7 @@
}
static int i9xx_pipe_crc_ctl_reg(struct drm_device *dev,
- enum pipe pipe,
+ enum i915_pipe pipe,
enum intel_pipe_crc_source *source,
uint32_t *val)
{
@@ -2770,7 +2770,7 @@
}
static void vlv_undo_pipe_scramble_reset(struct drm_device *dev,
- enum pipe pipe)
+ enum i915_pipe pipe)
{
struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t tmp = I915_READ(PORT_DFT2_G4X);
@@ -2786,7 +2786,7 @@
}
static void g4x_undo_pipe_scramble_reset(struct drm_device *dev,
- enum pipe pipe)
+ enum i915_pipe pipe)
{
struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t tmp = I915_READ(PORT_DFT2_G4X);
@@ -2855,7 +2855,7 @@
return 0;
}
-static int pipe_crc_set_source(struct drm_device *dev, enum pipe pipe,
+static int pipe_crc_set_source(struct drm_device *dev, enum i915_pipe pipe,
enum intel_pipe_crc_source source)
{
struct drm_i915_private *dev_priv = dev->dev_private;
@@ -2996,7 +2996,7 @@
return -EINVAL;
}
-static int display_crc_ctl_parse_pipe(const char *buf, enum pipe *pipe)
+static int display_crc_ctl_parse_pipe(const char *buf, enum i915_pipe *pipe)
{
const char name = buf[0];
@@ -3027,7 +3027,7 @@
#define N_WORDS 3
int n_words;
char *words[N_WORDS];
- enum pipe pipe;
+ enum i915_pipe pipe;
enum intel_pipe_crc_object object;
enum intel_pipe_crc_source source;
@@ -3824,7 +3824,7 @@
void intel_display_crc_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
- enum pipe pipe;
+ enum i915_pipe pipe;
for_each_pipe(pipe) {
struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
diff -r 6fad0eec449d -r 713b476464b3 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Mon Nov 10 19:20:33 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c Mon Nov 10 19:45:53 2014 +0000
@@ -1552,7 +1552,7 @@
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_device_info *info;
- enum pipe pipe;
+ enum i915_pipe pipe;
info = (struct intel_device_info *)&dev_priv->info;
diff -r 6fad0eec449d -r 713b476464b3 sys/external/bsd/drm2/dist/drm/i915/i915_drv.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Mon Nov 10 19:20:33 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h Mon Nov 10 19:45:53 2014 +0000
@@ -56,7 +56,7 @@
#define DRIVER_DESC "Intel Graphics"
#define DRIVER_DATE "20080730"
-enum pipe {
+enum i915_pipe {
INVALID_PIPE = -1,
PIPE_A = 0,
PIPE_B,
@@ -2237,11 +2237,11 @@
extern void intel_uncore_destroy(struct drm_device *dev);
void
-i915_enable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
+i915_enable_pipestat(struct drm_i915_private *dev_priv, enum i915_pipe pipe,
u32 status_mask);
void
-i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
+i915_disable_pipestat(struct drm_i915_private *dev_priv, enum i915_pipe pipe,
u32 status_mask);
void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv);
@@ -2820,8 +2820,8 @@
void vlv_bunit_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
u32 vlv_gps_core_read(struct drm_i915_private *dev_priv, u32 reg);
void vlv_gps_core_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
-u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg);
-void vlv_dpio_write(struct drm_i915_private *dev_priv, enum pipe pipe, int reg, u32 val);
+u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum i915_pipe pipe, int reg);
+void vlv_dpio_write(struct drm_i915_private *dev_priv, enum i915_pipe pipe, int reg, u32 val);
u32 intel_sbi_read(struct drm_i915_private *dev_priv, u16 reg,
enum intel_sbi_destination destination);
void intel_sbi_write(struct drm_i915_private *dev_priv, u16 reg, u32 value,
diff -r 6fad0eec449d -r 713b476464b3 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Mon Nov 10 19:20:33 2014 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Mon Nov 10 19:45:53 2014 +0000
@@ -810,6 +810,7 @@
struct drm_file *file)
{
struct drm_i915_gem_pread *args = data;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
int ret = 0;
@@ -825,11 +826,12 @@
if (ret)
return ret;
- obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
- if (&obj->base == NULL) {
+ gobj = drm_gem_object_lookup(dev, file, args->handle);
+ if (gobj == NULL) {
ret = -ENOENT;
goto unlock;
}
+ obj = to_intel_bo(gobj);
/* Bounds check source. */
if (args->offset > obj->base.size ||
@@ -1202,6 +1204,7 @@
struct drm_file *file)
{
struct drm_i915_gem_pwrite *args = data;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
int ret;
@@ -1226,11 +1229,12 @@
if (ret)
return ret;
- obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
- if (&obj->base == NULL) {
+ gobj = drm_gem_object_lookup(dev, file, args->handle);
+ if (gobj == NULL) {
ret = -ENOENT;
goto unlock;
}
+ obj = to_intel_bo(gobj);
/* Bounds check destination. */
if (args->offset > obj->base.size ||
@@ -1388,6 +1392,8 @@
if (timeout)
ticks = mstohz(timespec_to_ns(timeout) / 1000000);
+ else
+ ticks = 1;
if (INTEL_INFO(dev)->gen >= 6 && can_wait_boost(file_priv)) {
gen6_rps_boost(dev_priv);
@@ -1662,6 +1668,7 @@
struct drm_file *file)
{
struct drm_i915_gem_set_domain *args = data;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
uint32_t read_domains = args->read_domains;
uint32_t write_domain = args->write_domain;
@@ -1684,11 +1691,12 @@
if (ret)
return ret;
- obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
- if (&obj->base == NULL) {
+ gobj = drm_gem_object_lookup(dev, file, args->handle);
+ if (gobj == NULL) {
ret = -ENOENT;
goto unlock;
}
+ obj = to_intel_bo(gobj);
/* Try to flush the object off the GPU without holding the lock.
* We will repeat the flush holding the lock in the normal manner
@@ -1728,6 +1736,7 @@
struct drm_file *file)
{
struct drm_i915_gem_sw_finish *args = data;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
int ret = 0;
@@ -1735,11 +1744,12 @@
if (ret)
return ret;
- obj = to_intel_bo(drm_gem_object_lookup(dev, file, args->handle));
- if (&obj->base == NULL) {
+ gobj = drm_gem_object_lookup(dev, file, args->handle);
+ if (gobj == NULL) {
ret = -ENOENT;
goto unlock;
}
+ obj = to_intel_bo(gobj);
/* Pinned buffers may be scanout, so flush the cache */
if (obj->pin_display)
@@ -2267,6 +2277,7 @@
uint64_t *offset)
{
struct drm_i915_private *dev_priv = dev->dev_private;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
int ret;
@@ -2274,11 +2285,12 @@
if (ret)
return ret;
- obj = to_intel_bo(drm_gem_object_lookup(dev, file, handle));
- if (&obj->base == NULL) {
+ gobj = drm_gem_object_lookup(dev, file, handle);
+ if (gobj == NULL) {
ret = -ENOENT;
goto unlock;
}
+ obj = to_intel_bo(gobj);
if (obj->base.size > dev_priv->gtt.mappable_end) {
ret = -E2BIG;
@@ -3365,6 +3377,7 @@
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_i915_gem_wait *args = data;
+ struct drm_gem_object *gobj;
struct drm_i915_gem_object *obj;
struct intel_ring_buffer *ring = NULL;
struct timespec timeout_stack, *timeout = NULL;
@@ -3381,11 +3394,12 @@
Home |
Main Index |
Thread Index |
Old Index