dri1 dragon slaughtering, v2
Subsystems (2)
cover dri1 dragon slaughtering, v2
Hi all,
Essentially just rebased on top of latest dinq. Happy bikeshedding!
Cheers, Daniel
Daniel Vetter (17):
drm/i915: move dri1 vblank stubs to i915_dma.c drm/i915: create dev_priv->dri1 dragon dungeon^W^W sub-struct drm/i915 disallow physical batchbuffers for KMS drm/i915: rip out dev_priv->tex_lru_log_granularity drm/i915: remove LP_RING&friends from modeset code drm/i915: kill intel_clear_scanline_wait
drm/i915: rip out dri1 breadcrumb updates from gen5+ irq handlers drm/i915: move dri1 irq ioctl code to i915_dma.c drm/i915: extract dri1 breadcrumb update from irq handler drm/i915: move LP_RING&friends to i915_dma.c
drm/i915: disallow clip rects on gen5+
drm/i915: move the ips code to intel_pm.c
drm/i915: move rps/emon function declarations drm/i915: kill pointless clearing of dev_priv->hws_map drm/i915: rework legacy GFX HWS handling
drm/i915: fixup __iomem mixups in ringbuffer.c drm/i915: move pnv|ilk_gem_mem_freq to intel_pm.c
drivers/gpu/drm/i915/i915_dma.c | 815 ++++++++-------------------- drivers/gpu/drm/i915/i915_drv.h | 48 +-- drivers/gpu/drm/i915/i915_gem.c | 5 +- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 + drivers/gpu/drm/i915/i915_irq.c | 211 +------- drivers/gpu/drm/i915/intel_display.c | 100 ++-- drivers/gpu/drm/i915/intel_drv.h | 12 +- drivers/gpu/drm/i915/intel_overlay.c | 58 ++- drivers/gpu/drm/i915/intel_pm.c | 618 +++++++++++++++++++++- drivers/gpu/drm/i915/intel_ringbuffer.c | 44 +-- drivers/gpu/drm/i915/intel_ringbuffer.h | 8 +- 11 files changed, 937 insertions(+), 987 deletions(-)
Signature · 1 line
1.7.7.6
PATCH 1/17 drm/i915: move dri1 vblank stubs to i915_dma.c
i915_dma.c contains most of the old dri1 horror-show, so move the remaining bits there, too. The code has been removed and the only thing left are some stubs to ensure that userspace doesn't try to use this stuff. vblank_pipe_set only returns 0 without any side-effects, so we can even stub it out with the canonical drm_noop.
v2: Rebase against ENODEV changes.
--- drivers/gpu/drm/i915/i915_dma.c | 44 +++++++++++++++++++++++++++- drivers/gpu/drm/i915/i915_drv.h | 7 ---- drivers/gpu/drm/i915/i915_irq.c | 61 --------------------------------------- 3 files changed, 43 insertions(+), 69 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +43 -1
@@ -721,6 +721,48 @@ fail_batch_free:return ret; } +static int i915_vblank_pipe_get (struct drm_device *dev,void *data, +struct drm_file *file_priv) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +drm_i915_vblank_pipe_t *pipe = data; + +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -ENODEV ; + +if (!dev_priv) { +DRM_ERROR ("called with no initialization\n" ); +return -EINVAL ; + } + + pipe->pipe =DRM_I915_VBLANK_PIPE_A |DRM_I915_VBLANK_PIPE_B ; + +return 0 ; +} + +/** +* Schedule buffer swap at given vertical blank. +*/ +static int i915_vblank_swap (struct drm_device *dev,void *data, +struct drm_file *file_priv) +{ +/* The delayed swap mechanism was fundamentally racy, and has been +* removed. The model was that the client requested a delayed flip/swap +* from the kernel, then waited for vblank before continuing to perform +* rendering. The problem was that the kernel might wake the client +* up before it dispatched the vblank swap (since the lock has to be +* held while touching the ringbuffer), in which case the client would +* clear and start the next frame before the swap occurred, and +* flicker would occur in addition to likely missing the vblank. +* +* In the absence of this ioctl, userland falls back to a correct path +* of waiting for a vblank, then dispatching the swap on its own. +* Context switching to userland and back is plenty fast enough for +* meeting the requirements of vblank swapping. +*/ +return -EINVAL ; +} +static int i915_flip_bufs (struct drm_device *dev,void *data,struct drm_file *file_priv) {
@@ -2156,7 +2198,7 @@ struct drm_ioctl_desc i915_ioctls[] = {DRM_IOCTL_DEF_DRV (I915_INIT_HEAP , drm_noop,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ),DRM_IOCTL_DEF_DRV (I915_CMDBUFFER , i915_cmdbuffer,DRM_AUTH ),DRM_IOCTL_DEF_DRV (I915_DESTROY_HEAP , drm_noop,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ), -DRM_IOCTL_DEF_DRV (I915_SET_VBLANK_PIPE , i915_vblank_pipe_set,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ), +DRM_IOCTL_DEF_DRV (I915_SET_VBLANK_PIPE , drm_noop,DRM_AUTH |DRM_MASTER |DRM_ROOT_ONLY ),DRM_IOCTL_DEF_DRV (I915_GET_VBLANK_PIPE , i915_vblank_pipe_get,DRM_AUTH ),DRM_IOCTL_DEF_DRV (I915_VBLANK_SWAP , i915_vblank_swap,DRM_AUTH ), DRM_IOCTL_DEF_DRV(I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
drivers/gpu/drm/i915/i915_drv.h +0 -7
@@ -1155,13 +1155,6 @@ extern int i915_irq_wait(struct drm_device *dev, void *data,extern void intel_irq_init (struct drm_device *dev); -extern int i915_vblank_pipe_set (struct drm_device *dev,void *data, -struct drm_file *file_priv); -extern int i915_vblank_pipe_get (struct drm_device *dev,void *data, -struct drm_file *file_priv); -extern int i915_vblank_swap (struct drm_device *dev,void *data, -struct drm_file *file_priv); -void i915_enable_pipestat (drm_i915_private_t *dev_priv,int pipe,u32 mask);
drivers/gpu/drm/i915/i915_irq.c +0 -61
67 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 2/17 drm/i915: create dev_priv->dri1 dragon dungeon^W^W sub-struct
In reply to Daniel Vetter... and shove allow_batchbuffer in there. More dragons will follow suit.
There's the curious case that we allow this for KMS ...
--- drivers/gpu/drm/i915/i915_dma.c | 8 ++++---- drivers/gpu/drm/i915/i915_drv.h | 11 ++++++++++- drivers/gpu/drm/i915/i915_gem.c | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +4 -4
@@ -198,7 +198,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)/* Allow hardware batchbuffers unless told otherwise. */ - dev_priv->allow_batchbuffer =1 ; + dev_priv->dri1.allow_batchbuffer =1 ;return 0 ; }
@@ -610,7 +610,7 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,if (drm_core_check_feature (dev,DRIVER_MODESET ))return -ENODEV ; -if (!dev_priv->allow_batchbuffer) { +if (!dev_priv->dri1.allow_batchbuffer) {DRM_ERROR ("Batchbuffer ioctl disabled\n" );return -EINVAL ; }
@@ -799,7 +799,7 @@ static int i915_getparam(struct drm_device *dev, void *data, value = dev->pdev->irq ?1 :0 ;break ;case I915_PARAM_ALLOW_BATCHBUFFER : - value = dev_priv->allow_batchbuffer ?1 :0 ; + value = dev_priv->dri1.allow_batchbuffer ?1 :0 ;break ;case I915_PARAM_LAST_DISPATCH : value =READ_BREADCRUMB (dev_priv);
@@ -882,7 +882,7 @@ static int i915_setparam(struct drm_device *dev, void *data, dev_priv->tex_lru_log_granularity = param->value;break ;case I915_SETPARAM_ALLOW_BATCHBUFFER : - dev_priv->allow_batchbuffer = param->value; + dev_priv->dri1.allow_batchbuffer = param->value ?1 :0 ;break ;case I915_SETPARAM_NUM_USED_FENCES : if (param->value > dev_priv->num_fence_regs ||
drivers/gpu/drm/i915/i915_drv.h +10 -1
@@ -397,7 +397,6 @@ typedef struct drm_i915_private {struct work_struct hotplug_work;int tex_lru_log_granularity; -int allow_batchbuffer;unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds;int vblank_pipe;int num_pipe;
@@ -630,6 +629,7 @@ typedef struct drm_i915_private {u32 saveMCHBAR_RENDER_STANDBY;u32 savePCH_PORT_HOTPLUG; +struct {/** Bridge to intel-gtt-ko */ const struct intel_gtt *gtt;
@@ -739,6 +739,15 @@ typedef struct drm_i915_private {size_t object_memory;u32 object_count; } mm; + +/* Old dri1 support infrastructure, beware the dragons ya fools entering +* here! */ +struct { +unsigned allow_batchbuffer :1 ; + } dri1; + +/* Kernel Modesetting */ +struct sdvo_device_mapping sdvo_mappings[2 ];/* indicate whether the LVDS_BORDER should be enabled or not */ unsigned int lvds_border_bits;
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -3606,7 +3606,7 @@ int i915_gem_init(struct drm_device *dev) }/* Allow hardware batchbuffers unless told otherwise. */ - dev_priv->allow_batchbuffer =1 ; + dev_priv->dri1.allow_batchbuffer =1 ;return 0 ; }
Signature · 1 line
1.7.7.6
PATCH 3/17 drm/i915 disallow physical batchbuffers for KMS
In reply to Daniel VetterEven the horrible gen3 XvMC code has learned to do this right by the time xf86-video-intel releases learned to do kernel modesetting. So we can just disallow this.
--- drivers/gpu/drm/i915/i915_gem.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +3 -2
@@ -3605,8 +3605,9 @@ int i915_gem_init(struct drm_device *dev)return ret; } -/* Allow hardware batchbuffers unless told otherwise. */ - dev_priv->dri1.allow_batchbuffer =1 ; +/* Allow hardware batchbuffers unless told otherwise, but not for KMS. */ +if (!drm_core_check_feature (dev,DRIVER_MODESET )) + dev_priv->dri1.allow_batchbuffer =1 ;return 0 ; }
Signature · 1 line
1.7.7.6
PATCH 4/17 drm/i915: rip out dev_priv->tex_lru_log_granularity
In reply to Daniel VetterAssigned in setparam, used never.
I didn't bother to dig through the archives to figure out what this was supposed to do.
--- drivers/gpu/drm/i915/i915_dma.c | 1 - drivers/gpu/drm/i915/i915_drv.h | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +0 -1
@@ -879,7 +879,6 @@ static int i915_setparam(struct drm_device *dev, void *data,case I915_SETPARAM_USE_MI_BATCHBUFFER_START :break ;case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY : - dev_priv->tex_lru_log_granularity = param->value;break ;case I915_SETPARAM_ALLOW_BATCHBUFFER : dev_priv->dri1.allow_batchbuffer = param->value ?1 :0 ;
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -396,7 +396,6 @@ typedef struct drm_i915_private {u32 hotplug_supported_mask;struct work_struct hotplug_work; -int tex_lru_log_granularity;unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds;int vblank_pipe;int num_pipe;
Signature · 1 line
1.7.7.6
PATCH 5/17 drm/i915: remove LP_RING&friends from modeset code
In reply to Daniel VetterThe LP refers to 'low priority' as opposed to the high priority ring on gen2/3. So lets constrain its use to the code of that era.
Unfortunately we can't yet completely remove the associated macros from common headers and shove them into i915_dma.c to the other dri1 legacy support code, a few cleanups are still missing for that.
--- drivers/gpu/drm/i915/intel_display.c | 78 ++++++++++++++++++---------------- drivers/gpu/drm/i915/intel_overlay.c | 58 ++++++++++++++----------- drivers/gpu/drm/i915/intel_pm.c | 27 ++++++------ 3 files changed, 87 insertions(+), 76 deletions(-)
drivers/gpu/drm/i915/intel_display.c +41 -37
@@ -5749,16 +5749,17 @@ static int intel_gen2_queue_flip(struct drm_device *dev,struct intel_crtc *intel_crtc =to_intel_crtc (crtc);unsigned long offset;u32 flip_mask; +struct intel_ring_buffer *ring = &dev_priv->ring[RCS ];int ret; - ret =intel_pin_and_fence_fb_obj (dev, obj,LP_RING (dev_priv)); + ret =intel_pin_and_fence_fb_obj (dev, obj, ring);if (ret) goto err;/* Offset into the new buffer for cases of shared fbs between CRTCs */ offset = crtc->y * fb->pitches[0 ] + crtc->x * fb->bits_per_pixel/8 ; - ret =BEGIN_LP_RING (6 ); + ret =intel_ring_begin (ring,6 );if (ret) goto err_unpin;
@@ -5769,14 +5770,14 @@ static int intel_gen2_queue_flip(struct drm_device *dev, flip_mask =MI_WAIT_FOR_PLANE_B_FLIP ; else flip_mask =MI_WAIT_FOR_PLANE_A_FLIP ; -OUT_RING (MI_WAIT_FOR_EVENT | flip_mask); -OUT_RING (MI_NOOP ); -OUT_RING (MI_DISPLAY_FLIP | -MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); -OUT_RING (fb->pitches[0 ]); -OUT_RING (obj->gtt_offset + offset); -OUT_RING (0 );/* aux display base address, unused */ -ADVANCE_LP_RING (); +intel_ring_emit (ring,MI_WAIT_FOR_EVENT | flip_mask); +intel_ring_emit (ring,MI_NOOP ); +intel_ring_emit (ring,MI_DISPLAY_FLIP | +MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); +intel_ring_emit (ring, fb->pitches[0 ]); +intel_ring_emit (ring, obj->gtt_offset + offset); +intel_ring_emit (ring,0 );/* aux display base address, unused */ +intel_ring_advance (ring);return 0 ; err_unpin:
@@ -5794,16 +5795,17 @@ static int intel_gen3_queue_flip(struct drm_device *dev,struct intel_crtc *intel_crtc =to_intel_crtc (crtc);unsigned long offset;u32 flip_mask; +struct intel_ring_buffer *ring = &dev_priv->ring[RCS ];int ret; - ret =intel_pin_and_fence_fb_obj (dev, obj,LP_RING (dev_priv)); + ret =intel_pin_and_fence_fb_obj (dev, obj, ring);if (ret) goto err;/* Offset into the new buffer for cases of shared fbs between CRTCs */ offset = crtc->y * fb->pitches[0 ] + crtc->x * fb->bits_per_pixel/8 ; - ret =BEGIN_LP_RING (6 ); + ret =intel_ring_begin (ring,6 );if (ret) goto err_unpin;
@@ -5811,15 +5813,15 @@ static int intel_gen3_queue_flip(struct drm_device *dev, flip_mask =MI_WAIT_FOR_PLANE_B_FLIP ; else flip_mask =MI_WAIT_FOR_PLANE_A_FLIP ; -OUT_RING (MI_WAIT_FOR_EVENT | flip_mask); -OUT_RING (MI_NOOP ); -OUT_RING (MI_DISPLAY_FLIP_I915 | -MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); -OUT_RING (fb->pitches[0 ]); -OUT_RING (obj->gtt_offset + offset); -OUT_RING (MI_NOOP ); - -ADVANCE_LP_RING (); +intel_ring_emit (ring,MI_WAIT_FOR_EVENT | flip_mask); +intel_ring_emit (ring,MI_NOOP ); +intel_ring_emit (ring,MI_DISPLAY_FLIP_I915 | +MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); +intel_ring_emit (ring, fb->pitches[0 ]); +intel_ring_emit (ring, obj->gtt_offset + offset); +intel_ring_emit (ring,MI_NOOP ); + +intel_ring_advance (ring);return 0 ; err_unpin:
@@ -5836,13 +5838,14 @@ static int intel_gen4_queue_flip(struct drm_device *dev,struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc);uint32_t pf, pipesrc; +struct intel_ring_buffer *ring = &dev_priv->ring[RCS ];int ret; - ret =intel_pin_and_fence_fb_obj (dev, obj,LP_RING (dev_priv)); + ret =intel_pin_and_fence_fb_obj (dev, obj, ring);if (ret) goto err; - ret =BEGIN_LP_RING (4 ); + ret =intel_ring_begin (ring,4 );if (ret) goto err_unpin;
@@ -5850,10 +5853,10 @@ static int intel_gen4_queue_flip(struct drm_device *dev,* Display Registers (which do not change across a page-flip) * so we need only reprogram the base address. */ -OUT_RING (MI_DISPLAY_FLIP | -MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); -OUT_RING (fb->pitches[0 ]); -OUT_RING (obj->gtt_offset | obj->tiling_mode); +intel_ring_emit (ring,MI_DISPLAY_FLIP | +MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); +intel_ring_emit (ring, fb->pitches[0 ]); +intel_ring_emit (ring, obj->gtt_offset | obj->tiling_mode);/* XXX Enabling the panel-fitter across page-flip is so far * untested on non-native modes, so ignore it for now.
@@ -5861,8 +5864,8 @@ static int intel_gen4_queue_flip(struct drm_device *dev,*/ pf =0 ; pipesrc =I915_READ (PIPESRC (intel_crtc->pipe)) &0x0fff0fff ; -OUT_RING (pf | pipesrc); -ADVANCE_LP_RING (); +intel_ring_emit (ring, pf | pipesrc); +intel_ring_advance (ring);return 0 ; err_unpin:
@@ -5878,26 +5881,27 @@ static int intel_gen6_queue_flip(struct drm_device *dev, {struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +struct intel_ring_buffer *ring = &dev_priv->ring[RCS ];uint32_t pf, pipesrc;int ret; - ret =intel_pin_and_fence_fb_obj (dev, obj,LP_RING (dev_priv)); + ret =intel_pin_and_fence_fb_obj (dev, obj, ring);if (ret) goto err; - ret =BEGIN_LP_RING (4 ); + ret =intel_ring_begin (ring,4 );if (ret) goto err_unpin; -OUT_RING (MI_DISPLAY_FLIP | -MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); -OUT_RING (fb->pitches[0 ] | obj->tiling_mode); -OUT_RING (obj->gtt_offset); +intel_ring_emit (ring,MI_DISPLAY_FLIP | +MI_DISPLAY_FLIP_PLANE (intel_crtc->plane)); +intel_ring_emit (ring, fb->pitches[0 ] | obj->tiling_mode); +intel_ring_emit (ring, obj->gtt_offset); pf =I915_READ (PF_CTL (intel_crtc->pipe)) &PF_ENABLE ; pipesrc =I915_READ (PIPESRC (intel_crtc->pipe)) &0x0fff0fff ; -OUT_RING (pf | pipesrc); -ADVANCE_LP_RING (); +intel_ring_emit (ring, pf | pipesrc); +intel_ring_advance (ring);return 0 ; err_unpin:
drivers/gpu/drm/i915/intel_overlay.c +32 -26
153 lines not on this page · raw message
drivers/gpu/drm/i915/intel_pm.c +14 -13
@@ -2436,6 +2436,7 @@ static int ironlake_setup_rc6(struct drm_device *dev)void ironlake_enable_rc6 (struct drm_device *dev) {struct drm_i915_private *dev_priv = dev->dev_private; +struct intel_ring_buffer *ring = &dev_priv->ring[RCS ];int ret;/* rc6 disabled by default due to repeated reports of hanging during
@@ -2455,31 +2456,31 @@ void ironlake_enable_rc6(struct drm_device *dev)* GPU can automatically power down the render unit if given a page * to save state. */ - ret =BEGIN_LP_RING (6 ); + ret =intel_ring_begin (ring,6 );if (ret) {ironlake_teardown_rc6 (dev);mutex_unlock (&dev->struct_mutex);return ; } -OUT_RING (MI_SUSPEND_FLUSH |MI_SUSPEND_FLUSH_EN ); -OUT_RING (MI_SET_CONTEXT ); -OUT_RING (dev_priv->renderctx->gtt_offset | -MI_MM_SPACE_GTT | -MI_SAVE_EXT_STATE_EN | -MI_RESTORE_EXT_STATE_EN | -MI_RESTORE_INHIBIT ); -OUT_RING (MI_SUSPEND_FLUSH ); -OUT_RING (MI_NOOP ); -OUT_RING (MI_FLUSH ); -ADVANCE_LP_RING (); +intel_ring_emit (ring,MI_SUSPEND_FLUSH |MI_SUSPEND_FLUSH_EN ); +intel_ring_emit (ring,MI_SET_CONTEXT ); +intel_ring_emit (ring, dev_priv->renderctx->gtt_offset | +MI_MM_SPACE_GTT | +MI_SAVE_EXT_STATE_EN | +MI_RESTORE_EXT_STATE_EN | +MI_RESTORE_INHIBIT ); +intel_ring_emit (ring,MI_SUSPEND_FLUSH ); +intel_ring_emit (ring,MI_NOOP ); +intel_ring_emit (ring,MI_FLUSH ); +intel_ring_advance (ring);/* * Wait for the command parser to advance past MI_SET_CONTEXT. The HW * does an implicit flush, combined with MI_FLUSH above, it should be * safe to assume that renderctx is valid */ - ret =intel_wait_ring_idle (LP_RING (dev_priv)); + ret =intel_wait_ring_idle (ring);if (ret) {DRM_ERROR ("failed to enable ironlake power power savings\n" );ironlake_teardown_rc6 (dev);
Signature · 1 line
1.7.7.6
PATCH 6/17 drm/i915: kill intel_clear_scanline_wait
In reply to Daniel VetterThis is a pretty racy way to close these races, and we have much better means to cope with these races meanwhile: For non-broken userspace we correctly wait for any outstanding rendering, for broken userspace the hangcheck will save the day.
--- drivers/gpu/drm/i915/intel_display.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
drivers/gpu/drm/i915/intel_display.c +0 -22
@@ -2528,26 +2528,6 @@ static void ironlake_fdi_disable(struct drm_crtc *crtc)udelay (100 ); } -/* -* When we disable a pipe, we need to clear any pending scanline wait events -* to avoid hanging the ring, which we assume we are waiting on. -*/ -static void intel_clear_scanline_wait (struct drm_device *dev) -{ -struct drm_i915_private *dev_priv = dev->dev_private; -struct intel_ring_buffer *ring; -u32 tmp; - -if (IS_GEN2 (dev)) -/* Can't break the hang on i8xx */ -return ; - - ring =LP_RING (dev_priv); - tmp =I915_READ_CTL (ring); -if (tmp &RING_WAIT ) -I915_WRITE_CTL (ring, tmp); -} -static void intel_crtc_wait_for_pending_flips (struct drm_crtc *crtc) {struct drm_device *dev = crtc->dev;
@@ -2931,7 +2911,6 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)mutex_lock (&dev->struct_mutex);intel_update_fbc (dev); -intel_clear_scanline_wait (dev);mutex_unlock (&dev->struct_mutex); }
@@ -3036,7 +3015,6 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) intel_crtc->active = false;intel_update_fbc (dev);intel_update_watermarks (dev); -intel_clear_scanline_wait (dev); }static void i9xx_crtc_dpms (struct drm_crtc *crtc,int mode)
Signature · 1 line
1.7.7.6
PATCH 7/17 drm/i915: rip out dri1 breadcrumb updates from gen5+ irq handlers
In reply to Daniel VetterWe never supported dri1 on gen5+.
VLV never had that code, so no need to remove it.
--- drivers/gpu/drm/i915/i915_irq.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +0 -16
@@ -585,7 +585,6 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS)drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;int ret =IRQ_NONE ;u32 de_iir, gt_iir, de_ier, pch_iir, pm_iir; -struct drm_i915_master_private *master_priv;atomic_inc (&dev_priv->irq_received);
@@ -604,13 +603,6 @@ static irqreturn_t ivybridge_irq_handler(DRM_IRQ_ARGS) ret =IRQ_HANDLED ; -if (dev->primary->master) { - master_priv = dev->primary->master->driver_priv; -if (master_priv->sarea_priv) - master_priv->sarea_priv->last_dispatch = -READ_BREADCRUMB (dev_priv); - } -snb_gt_irq_handler (dev, dev_priv, gt_iir);if (de_iir &DE_GSE_IVB )
@@ -672,7 +664,6 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS)int ret =IRQ_NONE ;u32 de_iir, gt_iir, de_ier, pch_iir, pm_iir;u32 hotplug_mask; -struct drm_i915_master_private *master_priv;atomic_inc (&dev_priv->irq_received);
@@ -697,13 +688,6 @@ static irqreturn_t ironlake_irq_handler(DRM_IRQ_ARGS) ret =IRQ_HANDLED ; -if (dev->primary->master) { - master_priv = dev->primary->master->driver_priv; -if (master_priv->sarea_priv) - master_priv->sarea_priv->last_dispatch = -READ_BREADCRUMB (dev_priv); - } -if (IS_GEN5 (dev))ilk_gt_irq_handler (dev, dev_priv, gt_iir);else
Signature · 1 line
1.7.7.6
PATCH 8/17 drm/i915: move dri1 irq ioctl code to i915_dma.c
In reply to Daniel VetterLet's just get this out of the way.
v2: Rebase against ENODEV changes.
--- drivers/gpu/drm/i915/i915_dma.c | 110 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 4 -- drivers/gpu/drm/i915/i915_irq.c | 110 --------------------------------------- 3 files changed, 110 insertions(+), 114 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +110 -0
@@ -721,6 +721,116 @@ fail_batch_free:return ret; } +static int i915_emit_irq (struct drm_device * dev) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv; + +i915_kernel_lost_context (dev); + +DRM_DEBUG_DRIVER ("\n" ); + + dev_priv->counter++; +if (dev_priv->counter >0x7FFFFFFFUL ) + dev_priv->counter =1 ; +if (master_priv->sarea_priv) + master_priv->sarea_priv->last_enqueue = dev_priv->counter; + +if (BEGIN_LP_RING (4 ) ==0 ) { +OUT_RING (MI_STORE_DWORD_INDEX ); +OUT_RING (I915_BREADCRUMB_INDEX <<MI_STORE_DWORD_INDEX_SHIFT ); +OUT_RING (dev_priv->counter); +OUT_RING (MI_USER_INTERRUPT ); +ADVANCE_LP_RING (); + } + +return dev_priv->counter; +} + +static int i915_wait_irq (struct drm_device * dev,int irq_nr) +{ +drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; +struct drm_i915_master_private *master_priv = dev->primary->master->driver_priv; +int ret =0 ; +struct intel_ring_buffer *ring =LP_RING (dev_priv); + +DRM_DEBUG_DRIVER ("irq_nr=%d breadcrumb=%d\n" , irq_nr, +READ_BREADCRUMB (dev_priv)); + +if (READ_BREADCRUMB (dev_priv) >= irq_nr) { +if (master_priv->sarea_priv) + master_priv->sarea_priv->last_dispatch =READ_BREADCRUMB (dev_priv); +return 0 ; + } + +if (master_priv->sarea_priv) + master_priv->sarea_priv->perf_boxes |=I915_BOX_WAIT ; + +if (ring->irq_get (ring)) { +DRM_WAIT_ON (ret, ring->irq_queue,3 *DRM_HZ , +READ_BREADCRUMB (dev_priv) >= irq_nr); + ring->irq_put (ring); + }else if (wait_for (READ_BREADCRUMB (dev_priv) >= irq_nr,3000 )) + ret = -EBUSY ; + +if (ret == -EBUSY ) { +DRM_ERROR ("EBUSY -- rec: %d emitted: %d\n" , +READ_BREADCRUMB (dev_priv), (int )dev_priv->counter); + } + +return ret; +} + +/* Needs the lock as it touches the ring. +*/ +static int i915_irq_emit (struct drm_device *dev,void *data, +struct drm_file *file_priv) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +drm_i915_irq_emit_t *emit = data; +int result; + +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -ENODEV ; + +if (!dev_priv || !LP_RING (dev_priv)->virtual_start) { +DRM_ERROR ("called with no initialization\n" ); +return -EINVAL ; + } + +RING_LOCK_TEST_WITH_RETURN (dev, file_priv); + +mutex_lock (&dev->struct_mutex); + result =i915_emit_irq (dev); +mutex_unlock (&dev->struct_mutex); + +if (DRM_COPY_TO_USER (emit->irq_seq, &result,sizeof (int ))) { +DRM_ERROR ("copy_to_user\n" ); +return -EFAULT ; + } + +return 0 ; +} + +/* Doesn't need the hardware lock. +*/ +static int i915_irq_wait (struct drm_device *dev,void *data, +struct drm_file *file_priv) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +drm_i915_irq_wait_t *irqwait = data; + +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -ENODEV ; + +if (!dev_priv) { +DRM_ERROR ("called with no initialization\n" ); +return -EINVAL ; + } + +return i915_wait_irq (dev, irqwait->irq_seq); +} +static int i915_vblank_pipe_get (struct drm_device *dev,void *data,struct drm_file *file_priv) {
drivers/gpu/drm/i915/i915_drv.h +0 -4
@@ -1156,10 +1156,6 @@ extern void i915_update_gfx_val(struct drm_i915_private *dev_priv);/* i915_irq.c */ void i915_hangcheck_elapsed (unsigned long data);void i915_handle_error (struct drm_device *dev,bool wedged); -extern int i915_irq_emit (struct drm_device *dev,void *data, -struct drm_file *file_priv); -extern int i915_irq_wait (struct drm_device *dev,void *data, -struct drm_file *file_priv);extern void intel_irq_init (struct drm_device *dev);
drivers/gpu/drm/i915/i915_irq.c +0 -110
116 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 9/17 drm/i915: extract dri1 breadcrumb update from irq handler
In reply to Daniel Vetter... and hide it in i915_dma.c.
This way all the legacy stuff dealing with READ_BREADCRUMB and LP_RING and friends is in i915_dma.c.
v2: Rebase on top of Chris Wilson's rework irq handling code.
--- drivers/gpu/drm/i915/i915_dma.c | 13 +++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_irq.c | 24 +++--------------------- 3 files changed, 17 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +13 -0
@@ -47,6 +47,19 @@#include <acpi/video.h> #include <asm/pat.h> +void i915_update_dri1_breadcrumb (struct drm_device *dev) +{ +drm_i915_private_t *dev_priv = dev->dev_private; +struct drm_i915_master_private *master_priv; + +if (dev->primary->master) { + master_priv = dev->primary->master->driver_priv; +if (master_priv->sarea_priv) + master_priv->sarea_priv->last_dispatch = +READ_BREADCRUMB (dev_priv); + } +} +static void i915_write_hws_pga (struct drm_device *dev) {drm_i915_private_t *dev_priv = dev->dev_private;
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -1129,6 +1129,7 @@ extern int i915_master_create(struct drm_device *dev, struct drm_master *master)extern void i915_master_destroy (struct drm_device *dev,struct drm_master *master);/* i915_dma.c */ +void i915_update_dri1_breadcrumb (struct drm_device *dev);extern void i915_kernel_lost_context (struct drm_device * dev);extern int i915_driver_load (struct drm_device *,unsigned long flags);extern int i915_driver_unload (struct drm_device *);
drivers/gpu/drm/i915/i915_irq.c +3 -21
@@ -2014,7 +2014,6 @@ static irqreturn_t i8xx_irq_handler(DRM_IRQ_ARGS) {struct drm_device *dev = (struct drm_device *) arg;drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; -struct drm_i915_master_private *master_priv;u16 iir, new_iir;u32 pipe_stats[2 ];unsigned long irqflags;
@@ -2060,12 +2059,7 @@ static irqreturn_t i8xx_irq_handler(DRM_IRQ_ARGS)I915_WRITE16 (IIR , iir & ~flip_mask); new_iir =I915_READ16 (IIR );/* Flush posted writes */ -if (dev->primary->master) { - master_priv = dev->primary->master->driver_priv; -if (master_priv->sarea_priv) - master_priv->sarea_priv->last_dispatch = -READ_BREADCRUMB (dev_priv); - } +i915_update_dri1_breadcrumb (dev);if (iir &I915_USER_INTERRUPT )notify_ring (dev, &dev_priv->ring[RCS ]);
@@ -2202,7 +2196,6 @@ static irqreturn_t i915_irq_handler(DRM_IRQ_ARGS) {struct drm_device *dev = (struct drm_device *) arg;drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; -struct drm_i915_master_private *master_priv;u32 iir, new_iir, pipe_stats[I915_MAX_PIPES ];unsigned long irqflags; u32 flip_mask =
@@ -2308,12 +2301,7 @@ static irqreturn_t i915_irq_handler(DRM_IRQ_ARGS) iir = new_iir; }while (iir & ~flip_mask); -if (dev->primary->master) { - master_priv = dev->primary->master->driver_priv; -if (master_priv->sarea_priv) - master_priv->sarea_priv->last_dispatch = -READ_BREADCRUMB (dev_priv); - } +i915_update_dri1_breadcrumb (dev);return ret; }
@@ -2453,7 +2441,6 @@ static irqreturn_t i965_irq_handler(DRM_IRQ_ARGS) {struct drm_device *dev = (struct drm_device *) arg;drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; -struct drm_i915_master_private *master_priv;u32 iir, new_iir;u32 pipe_stats[I915_MAX_PIPES ];unsigned long irqflags;
@@ -2562,12 +2549,7 @@ static irqreturn_t i965_irq_handler(DRM_IRQ_ARGS) iir = new_iir; } -if (dev->primary->master) { - master_priv = dev->primary->master->driver_priv; -if (master_priv->sarea_priv) - master_priv->sarea_priv->last_dispatch = -READ_BREADCRUMB (dev_priv); - } +i915_update_dri1_breadcrumb (dev);return ret; }
Signature · 1 line
1.7.7.6
PATCH 10/17 drm/i915: move LP_RING&friends to i915_dma.c
In reply to Daniel VetterWohoo!
Now we only need to move all the gem/kms stuff that accidentally landed in i915_dma.c out of it, and this will be our legacy dri1 grave-yard.
--- drivers/gpu/drm/i915/i915_dma.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_drv.h | 22 ---------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 --- 3 files changed, 26 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +26 -0
@@ -47,6 +47,32 @@#include <acpi/video.h> #include <asm/pat.h> +#define LP_RING (d) (&((struct drm_i915_private *)(d))->ring[RCS]) + +#define BEGIN_LP_RING (n) \ + intel_ring_begin(LP_RING(dev_priv), (n)) + +#define OUT_RING (x) \ + intel_ring_emit(LP_RING(dev_priv), x) + +#define ADVANCE_LP_RING () \ + intel_ring_advance(LP_RING(dev_priv)) + +/** +* Lock test for when it's just for synchronization of ring access. +* +* In that case, we don't need to do it when GEM is initialized as nobody else +* has access to the ring. +*/ +#define RING_LOCK_TEST_WITH_RETURN (dev, file) do { \ + if (LP_RING(dev->dev_private)->obj == NULL) \ + LOCK_TEST_WITH_RETURN(dev, file); \ +} while (0) + +#define READ_HWSP (dev_priv, reg) intel_read_status_page(LP_RING(dev_priv), reg) +#define READ_BREADCRUMB (dev_priv) READ_HWSP(dev_priv, I915_BREADCRUMB_INDEX) +#define I915_BREADCRUMB_INDEX 0x21 +void i915_update_dri1_breadcrumb (struct drm_device *dev) {drm_i915_private_t *dev_priv = dev->dev_private;
drivers/gpu/drm/i915/i915_drv.h +0 -22
@@ -1472,28 +1472,6 @@ extern void intel_display_print_error_state(struct seq_file *m, struct intel_display_error_state *error);#endif -#define LP_RING (d) (&((struct drm_i915_private *)(d))->ring[RCS]) - -#define BEGIN_LP_RING (n) \ - intel_ring_begin(LP_RING(dev_priv), (n)) - -#define OUT_RING (x) \ - intel_ring_emit(LP_RING(dev_priv), x) - -#define ADVANCE_LP_RING () \ - intel_ring_advance(LP_RING(dev_priv)) - -/** -* Lock test for when it's just for synchronization of ring access. -* -* In that case, we don't need to do it when GEM is initialized as nobody else -* has access to the ring. -*/ -#define RING_LOCK_TEST_WITH_RETURN (dev, file) do { \ - if (LP_RING(dev->dev_private)->obj == NULL) \ - LOCK_TEST_WITH_RETURN(dev, file); \ -} while (0) -/* On SNB platform, before reading ring registers forcewake bit * must be set to prevent GT core from power down and stale values being * returned.
drivers/gpu/drm/i915/intel_ringbuffer.h +0 -3
@@ -169,10 +169,7 @@ intel_read_status_page(struct intel_ring_buffer *ring,* * The area from dword 0x20 to 0x3ff is available for driver usage. */ -#define READ_HWSP (dev_priv, reg) intel_read_status_page(LP_RING(dev_priv), reg) -#define READ_BREADCRUMB (dev_priv) READ_HWSP(dev_priv, I915_BREADCRUMB_INDEX)#define I915_GEM_HWS_INDEX 0x20 -#define I915_BREADCRUMB_INDEX 0x21void intel_cleanup_ring_buffer (struct intel_ring_buffer *ring);
Signature · 1 line
1.7.7.6
PATCH 11/17 drm/i915: disallow clip rects on gen5+
In reply to Daniel VetterUnfortunately there has been dri1 userspace that used gem to manage the gtt and hence also needed cliprects in the execbuf ioctl. So we can't ever remove that code without breaking the ioctl abi.
But at least we can disable it on gen5+, because these horrible versions of mesa have not supported these chips.
--- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +5 -0
@@ -1116,6 +1116,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,return -EINVAL ; } +if (INTEL_INFO (dev)->gen >=5 ) { +DRM_DEBUG ("clip rectangles are only valid on pre-gen5\n" ); +return -EINVAL ; + } + cliprects =kmalloc (args->num_cliprects *sizeof (*cliprects),GFP_KERNEL );if (cliprects ==NULL ) {
Signature · 1 line
1.7.7.6
PATCH 12/17 drm/i915: move the ips code to intel_pm.c
In reply to Daniel VetterWe now have a nice home for power management code, so let's use it!
--- drivers/gpu/drm/i915/i915_dma.c | 472 +------------------------------------- drivers/gpu/drm/i915/intel_drv.h | 3 + drivers/gpu/drm/i915/intel_pm.c | 478 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 483 insertions(+), 470 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +2 -470
@@ -36,14 +36,12 @@#include "i915_drm.h" #include "i915_drv.h" #include "i915_trace.h" -#include "../../../platform/x86/intel_ips.h" #include <linux/pci.h> #include <linux/vgaarb.h> #include <linux/acpi.h> #include <linux/pnp.h> #include <linux/vga_switcheroo.h> #include <linux/slab.h> -#include <linux/module.h> #include <acpi/video.h> #include <asm/pat.h>
@@ -1481,465 +1479,6 @@ static void i915_ironlake_get_mem_freq(struct drm_device *dev) } } -static const struct cparams { -u16 i; -u16 t; -u16 m; -u16 c; -} cparams[] = { - {1 ,1333 ,301 ,28664 }, - {1 ,1066 ,294 ,24460 }, - {1 ,800 ,294 ,25192 }, - {0 ,1333 ,276 ,27605 }, - {0 ,1066 ,276 ,27605 }, - {0 ,800 ,231 ,23784 }, -}; - -unsigned long i915_chipset_val (struct drm_i915_private *dev_priv) -{ -u64 total_count, diff, ret; -u32 count1, count2, count3, m =0 , c =0 ; -unsigned long now =jiffies_to_msecs (jiffies), diff1; -int i; - - diff1 = now - dev_priv->last_time1; - -/* Prevent division-by-zero if we are asking too fast. -* Also, we don't get interesting results if we are polling -* faster than once in 10ms, so just return the saved value -* in such cases. -*/ -if (diff1 <=10 ) -return dev_priv->chipset_power; - - count1 =I915_READ (DMIEC ); - count2 =I915_READ (DDREC ); - count3 =I915_READ (CSIEC ); - - total_count = count1 + count2 + count3; - -/* FIXME: handle per-counter overflow */ -if (total_count < dev_priv->last_count1) { - diff = ~0UL - dev_priv->last_count1; - diff += total_count; - }else { - diff = total_count - dev_priv->last_count1; - } - -for (i =0 ; i <ARRAY_SIZE (cparams); i++) { -if (cparams[i].i == dev_priv->c_m && - cparams[i].t == dev_priv->r_t) { - m = cparams[i].m; - c = cparams[i].c; -break ; - } - } - - diff =div_u64 (diff, diff1); - ret = ((m * diff) + c); - ret =div_u64 (ret,10 ); - - dev_priv->last_count1 = total_count; - dev_priv->last_time1 = now; - - dev_priv->chipset_power = ret; - -return ret; -} - -unsigned long i915_mch_val (struct drm_i915_private *dev_priv) -{ -unsigned long m, x, b; -u32 tsfs; - - tsfs =I915_READ (TSFS ); - - m = ((tsfs &TSFS_SLOPE_MASK ) >>TSFS_SLOPE_SHIFT ); - x =I915_READ8 (TR1 ); - - b = tsfs &TSFS_INTR_MASK ; - -return ((m * x) /127 ) - b; -} - -static u16 pvid_to_extvid (struct drm_i915_private *dev_priv,u8 pxvid) -{ -static const struct v_table { -u16 vd;/* in .1 mil */ -u16 vm;/* in .1 mil */ - } v_table[] = { - {0 ,0 , }, - {375 ,0 , }, - {500 ,0 , }, - {625 ,0 , }, - {750 ,0 , }, - {875 ,0 , }, - {1000 ,0 , }, - {1125 ,0 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4125 ,3000 , }, - {4250 ,3125 , }, - {4375 ,3250 , }, - {4500 ,3375 , }, - {4625 ,3500 , }, - {4750 ,3625 , }, - {4875 ,3750 , }, - {5000 ,3875 , }, - {5125 ,4000 , }, - {5250 ,4125 , }, - {5375 ,4250 , }, - {5500 ,4375 , }, - {5625 ,4500 , }, - {5750 ,4625 , }, - {5875 ,4750 , }, - {6000 ,4875 , }, - {6125 ,5000 , }, - {6250 ,5125 , }, - {6375 ,5250 , }, - {6500 ,5375 , }, - {6625 ,5500 , }, - {6750 ,5625 , }, - {6875 ,5750 , }, - {7000 ,5875 , }, - {7125 ,6000 , }, - {7250 ,6125 , }, - {7375 ,6250 , }, - {7500 ,6375 , }, - {7625 ,6500 , }, - {7750 ,6625 , }, - {7875 ,6750 , }, - {8000 ,6875 , }, - {8125 ,7000 , }, - {8250 ,7125 , }, - {8375 ,7250 , }, - {8500 ,7375 , }, - {8625 ,7500 , }, - {8750 ,7625 , }, - {8875 ,7750 , }, - {9000 ,7875 , }, - {9125 ,8000 , }, - {9250 ,8125 , }, - {9375 ,8250 , }, - {9500 ,8375 , }, - {9625 ,8500 , }, - {9750 ,8625 , }, - {9875 ,8750 , }, - {10000 ,8875 , }, - {10125 ,9000 , }, - {10250 ,9125 , }, - {10375 ,9250 , }, - {10500 ,9375 , }, - {10625 ,9500 , }, - {10750 ,9625 , }, - {10875 ,9750 , }, - {11000 ,9875 , }, - {11125 ,10000 , }, - {11250 ,10125 , }, - {11375 ,10250 , }, - {11500 ,10375 , }, - {11625 ,10500 , }, - {11750 ,10625 , }, - {11875 ,10750 , }, - {12000 ,10875 , }, - {12125 ,11000 , }, - {12250 ,11125 , }, - {12375 ,11250 , }, - {12500 ,11375 , }, - {12625 ,11500 , }, - {12750 ,11625 , }, - {12875 ,11750 , }, - {13000 ,11875 , }, - {13125 ,12000 , }, - {13250 ,12125 , }, - {13375 ,12250 , }, - {13500 ,12375 , }, - {13625 ,12500 , }, - {13750 ,12625 , }, - {13875 ,12750 , }, - {14000 ,12875 , }, - {14125 ,13000 , }, - {14250 ,13125 , }, - {14375 ,13250 , }, - {14500 ,13375 , }, - {14625 ,13500 , }, - {14750 ,13625 , }, - {14875 ,13750 , }, - {15000 ,13875 , }, - {15125 ,14000 , }, - {15250 ,14125 , }, - {15375 ,14250 , }, - {15500 ,14375 , }, - {15625 ,14500 , }, - {15750 ,14625 , }, - {15875 ,14750 , }, - {16000 ,14875 , }, - {16125 ,15000 , }, - }; -if (dev_priv->info->is_mobile) -return v_table[pxvid].vm; -else -return v_table[pxvid].vd; -} - -void i915_update_gfx_val (struct drm_i915_private *dev_priv) -{ -struct timespec now, diff1; -u64 diff; -unsigned long diffms; -u32 count; - -getrawmonotonic (&now); - diff1 =timespec_sub (now, dev_priv->last_time2); - -/* Don't divide by 0 */ - diffms = diff1.tv_sec *1000 + diff1.tv_nsec /1000000 ; -if (!diffms) -return ; - - count =I915_READ (GFXEC ); - -if (count < dev_priv->last_count2) { - diff = ~0UL - dev_priv->last_count2; - diff += count; - }else { - diff = count - dev_priv->last_count2; - } - - dev_priv->last_count2 = count; - dev_priv->last_time2 = now; - -/* More magic constants... */ - diff = diff *1181 ; - diff =div_u64 (diff, diffms *10 ); - dev_priv->gfx_power = diff; -} - -unsigned long i915_gfx_val (struct drm_i915_private *dev_priv) -{ -unsigned long t, corr, state1, corr2, state2; -u32 pxvid, ext_v; - - pxvid =I915_READ (PXVFREQ_BASE + (dev_priv->cur_delay *4 )); - pxvid = (pxvid >>24 ) &0x7f ; - ext_v =pvid_to_extvid (dev_priv, pxvid); - - state1 = ext_v; - - t =i915_mch_val (dev_priv); - -/* Revel in the empirically derived constants */ - -/* Correction factor in 1/100000 units */ -if (t >80 ) - corr = ((t *2349 ) +135940 ); -else if (t >=50 ) - corr = ((t *964 ) +29317 ); -else /* < 50 */ - corr = ((t *301 ) +1004 ); - - corr = corr * ((150142 * state1) /10000 -78642 ); - corr /=100000 ; - corr2 = (corr * dev_priv->corr); - - state2 = (corr2 * state1) /10000 ; - state2 /=100 ;/* convert to mW */ - -i915_update_gfx_val (dev_priv); - -return dev_priv->gfx_power + state2; -} - -/* Global for IPS driver to get at the current i915 device */ -static struct drm_i915_private *i915_mch_dev; -/* -* Lock protecting IPS related data structures -* - i915_mch_dev -* - dev_priv->max_delay -* - dev_priv->min_delay -* - dev_priv->fmax -* - dev_priv->gpu_busy -*/ -static DEFINE_SPINLOCK (mchdev_lock); - -/** -* i915_read_mch_val - return value for IPS use -* -* Calculate and return a value for the IPS driver to use when deciding whether -* we have thermal and power headroom to increase CPU or GPU power budget. -*/ -unsigned long i915_read_mch_val (void ) -{ -struct drm_i915_private *dev_priv; -unsigned long chipset_val, graphics_val, ret =0 ; - -spin_lock (&mchdev_lock); -if (!i915_mch_dev) - goto out_unlock; - dev_priv = i915_mch_dev; - - chipset_val =i915_chipset_val (dev_priv); - graphics_val =i915_gfx_val (dev_priv); - - ret = chipset_val + graphics_val; - -out_unlock: -spin_unlock (&mchdev_lock); - -return ret; -} -EXPORT_SYMBOL_GPL (i915_read_mch_val); - -/** -* i915_gpu_raise - raise GPU frequency limit -* -* Raise the limit; IPS indicates we have thermal headroom. -*/ -bool i915_gpu_raise (void ) -{ -struct drm_i915_private *dev_priv; -bool ret = true; - -spin_lock (&mchdev_lock); -if (!i915_mch_dev) { - ret = false; - goto out_unlock; - } - dev_priv = i915_mch_dev; - -if (dev_priv->max_delay > dev_priv->fmax) - dev_priv->max_delay--; - -out_unlock: -spin_unlock (&mchdev_lock); - -return ret; -} -EXPORT_SYMBOL_GPL (i915_gpu_raise); - -/** -* i915_gpu_lower - lower GPU frequency limit -* -* IPS indicates we're close to a thermal limit, so throttle back the GPU -* frequency maximum. -*/ -bool i915_gpu_lower (void ) -{ -struct drm_i915_private *dev_priv; -bool ret = true; - -spin_lock (&mchdev_lock); -if (!i915_mch_dev) { - ret = false; - goto out_unlock; - } - dev_priv = i915_mch_dev; - -if (dev_priv->max_delay < dev_priv->min_delay) - dev_priv->max_delay++; - -out_unlock: -spin_unlock (&mchdev_lock); - -return ret; -} -EXPORT_SYMBOL_GPL (i915_gpu_lower); - -/** -* i915_gpu_busy - indicate GPU business to IPS -* -* Tell the IPS driver whether or not the GPU is busy. -*/ -bool i915_gpu_busy (void ) -{ -struct drm_i915_private *dev_priv; -bool ret = false; - -spin_lock (&mchdev_lock); -if (!i915_mch_dev) - goto out_unlock; - dev_priv = i915_mch_dev; - - ret = dev_priv->busy; - -out_unlock: -spin_unlock (&mchdev_lock); - -return ret; -} -EXPORT_SYMBOL_GPL (i915_gpu_busy); - -/** -* i915_gpu_turbo_disable - disable graphics turbo -* -* Disable graphics turbo by resetting the max frequency and setting the -* current frequency to the default. -*/ -bool i915_gpu_turbo_disable (void ) -{ -struct drm_i915_private *dev_priv; -bool ret = true; - -spin_lock (&mchdev_lock); -if (!i915_mch_dev) { - ret = false; - goto out_unlock; - } - dev_priv = i915_mch_dev; - - dev_priv->max_delay = dev_priv->fstart; - -if (!ironlake_set_drps (dev_priv->dev, dev_priv->fstart)) - ret = false; - -out_unlock: -spin_unlock (&mchdev_lock); - -return ret; -} -EXPORT_SYMBOL_GPL (i915_gpu_turbo_disable); - -/** -* Tells the intel_ips driver that the i915 driver is now loaded, if -* IPS got loaded first. -* -* This awkward dance is so that neither module has to depend on the -* other in order for IPS to do the appropriate communication of -* GPU turbo limits to i915. -*/ -static void -ips_ping_for_i915_load (void ) -{ -void (*link)(void ); - - link =symbol_get (ips_link_to_i915_driver); -if (link) { -link (); -symbol_put (ips_link_to_i915_driver); - } -} -static void i915_mtrr_setup (struct drm_i915_private *dev_priv,unsigned long base,unsigned long size)
@@ -2149,12 +1688,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)setup_timer (&dev_priv->hangcheck_timer, i915_hangcheck_elapsed, (unsigned long ) dev); -spin_lock (&mchdev_lock); - i915_mch_dev = dev_priv; - dev_priv->mchdev_lock = &mchdev_lock; -spin_unlock (&mchdev_lock); - -ips_ping_for_i915_load (); +intel_gpu_ips_init (dev_priv);return 0 ;
@@ -2189,9 +1723,7 @@ int i915_driver_unload(struct drm_device *dev)struct drm_i915_private *dev_priv = dev->dev_private;int ret; -spin_lock (&mchdev_lock); - i915_mch_dev =NULL ; -spin_unlock (&mchdev_lock); +intel_gpu_ips_teardown ();i915_teardown_sysfs (dev);
drivers/gpu/drm/i915/intel_drv.h +3 -0
@@ -462,5 +462,8 @@ extern void intel_init_pm(struct drm_device *dev);extern bool intel_fbc_enabled (struct drm_device *dev);extern void intel_enable_fbc (struct drm_crtc *crtc,unsigned long interval);extern void intel_update_fbc (struct drm_device *dev); +/* IPS */ +extern void intel_gpu_ips_init (struct drm_i915_private *dev_priv); +extern void intel_gpu_ips_teardown (void );#endif /* __INTEL_DRV_H__ */
drivers/gpu/drm/i915/intel_pm.c +478 -0
490 lines not on this page · raw message
Signature · 1 line
1.7.7.6
PATCH 13/17 drm/i915: move rps/emon function declarations
In reply to Daniel VetterThey're now in intel_pm.c, so group them a bit better.
--- drivers/gpu/drm/i915/intel_drv.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +5 -4
@@ -401,10 +401,6 @@ extern void intel_enable_clock_gating(struct drm_device *dev);extern void ironlake_disable_rc6 (struct drm_device *dev);extern void ironlake_enable_drps (struct drm_device *dev);extern void ironlake_disable_drps (struct drm_device *dev); -extern void gen6_enable_rps (struct drm_i915_private *dev_priv); -extern void gen6_update_ring_freq (struct drm_i915_private *dev_priv); -extern void gen6_disable_rps (struct drm_device *dev); -extern void intel_init_emon (struct drm_device *dev); extern int intel_pin_and_fence_fb_obj(struct drm_device *dev, struct drm_i915_gem_object *obj,
@@ -466,4 +462,9 @@ extern void intel_update_fbc(struct drm_device *dev);extern void intel_gpu_ips_init (struct drm_i915_private *dev_priv);extern void intel_gpu_ips_teardown (void ); +extern void gen6_enable_rps (struct drm_i915_private *dev_priv); +extern void gen6_update_ring_freq (struct drm_i915_private *dev_priv); +extern void gen6_disable_rps (struct drm_device *dev); +extern void intel_init_emon (struct drm_device *dev); +#endif /* __INTEL_DRV_H__ */
Signature · 1 line
1.7.7.6
PATCH 14/17 drm/i915: kill pointless clearing of dev_priv->hws_map
In reply to Daniel VetterWe kzalloc dev_priv, and we never use hws_map in intel_ringbuffer.c.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -5
@@ -890,7 +890,6 @@ i915_dispatch_execbuffer(struct intel_ring_buffer *ring,static void cleanup_status_page (struct intel_ring_buffer *ring) { -drm_i915_private_t *dev_priv = ring->dev->dev_private;struct drm_i915_gem_object *obj; obj = ring->status_page.obj;
@@ -901,14 +900,11 @@ static void cleanup_status_page(struct intel_ring_buffer *ring)i915_gem_object_unpin (obj);drm_gem_object_unreference (&obj->base); ring->status_page.obj =NULL ; - -memset (&dev_priv->hws_map,0 ,sizeof (dev_priv->hws_map)); }static int init_status_page (struct intel_ring_buffer *ring) {struct drm_device *dev = ring->dev; -drm_i915_private_t *dev_priv = dev->dev_private;struct drm_i915_gem_object *obj;int ret;
@@ -929,7 +925,6 @@ static int init_status_page(struct intel_ring_buffer *ring) ring->status_page.gfx_addr = obj->gtt_offset; ring->status_page.page_addr =kmap (obj->pages[0 ]);if (ring->status_page.page_addr ==NULL ) { -memset (&dev_priv->hws_map,0 ,sizeof (dev_priv->hws_map)); goto err_unpin; } ring->status_page.obj = obj;
Signature · 1 line
1.7.7.6
PATCH 15/17 drm/i915: rework legacy GFX HWS handling
In reply to Daniel VetterTo get the fun stuff out of the way, the legacy hws is allocated by userspace when the gpu needs a gfx hws. And there's no reference-counting going on, so userspace can simply screw everyone over.
At least it's not as horrible as i810, where the ringbuffer is allocated by userspace ...
We can't fix this disaster, but we can at least clean up the code a bit to clean things up:
- Drop the drm ioremap indirection.
- Add a new new read_legacy_status_page to paper over the differences between the legacy gfx hws and the physical hws shared with the new ringbuffer code.
- Add a pointer in dev_priv->dri1 for the cpu addresss - that one is an iomem remapping as opposed to all other hw status pages. This is just prep work to make sparse happy.
--- drivers/gpu/drm/i915/i915_dma.c | 29 ++++++++++++++++------------- drivers/gpu/drm/i915/i915_drv.h | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +16 -13
@@ -67,7 +67,16 @@LOCK_TEST_WITH_RETURN (dev, file); \ }while (0 ) -#define READ_HWSP (dev_priv, reg) intel_read_status_page(LP_RING(dev_priv), reg) +static inline u32 +intel_read_legacy_status_page (struct drm_i915_private *dev_priv,int reg) +{ +if (I915_NEED_GFX_HWS (dev_priv->dev)) +return ioread32 (dev_priv->dri1.gfx_hws_cpu_addr + reg); +else +return intel_read_status_page (LP_RING (dev_priv), reg); +} + +#define READ_HWSP (dev_priv, reg) intel_read_legacy_status_page(dev_priv, reg)#define READ_BREADCRUMB (dev_priv) READ_HWSP(dev_priv, I915_BREADCRUMB_INDEX)#define I915_BREADCRUMB_INDEX 0x21
@@ -137,7 +146,7 @@ static void i915_free_hws(struct drm_device *dev)if (ring->status_page.gfx_addr) { ring->status_page.gfx_addr =0 ; -drm_core_ioremapfree (&dev_priv->hws_map, dev); +iounmap (dev_priv->dri1.gfx_hws_cpu_addr); }/* Need to rewrite hardware status page */
@@ -1073,23 +1082,17 @@ static int i915_set_status_page(struct drm_device *dev, void *data, ring->status_page.gfx_addr = hws->addr & (0x1ffff <<12 ); - dev_priv->hws_map.offset = dev->agp->base + hws->addr; - dev_priv->hws_map.size =4 *1024 ; - dev_priv->hws_map.type =0 ; - dev_priv->hws_map.flags =0 ; - dev_priv->hws_map.mtrr =0 ; - -drm_core_ioremap_wc (&dev_priv->hws_map, dev); -if (dev_priv->hws_map.handle ==NULL ) { + dev_priv->dri1.gfx_hws_cpu_addr =ioremap_wc (dev->agp->base + hws->addr, +4096 ); +if (dev_priv->dri1.gfx_hws_cpu_addr ==NULL ) {i915_dma_cleanup (dev); ring->status_page.gfx_addr =0 ;DRM_ERROR ("can not ioremap virtual address for" " G33 hw status page\n" );return -ENOMEM ; } - ring->status_page.page_addr = - (void __force __iomem *)dev_priv->hws_map.handle; -memset_io (ring->status_page.page_addr,0 ,PAGE_SIZE ); + +memset_io (dev_priv->dri1.gfx_hws_cpu_addr,0 ,PAGE_SIZE );I915_WRITE (HWS_PGA , ring->status_page.gfx_addr); DRM_DEBUG_DRIVER("load hws HWS_PGA with gfx mem 0x%x\n",
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -367,7 +367,6 @@ typedef struct drm_i915_private {drm_dma_handle_t *status_page_dmah;uint32_t counter; -drm_local_map_t hws_map;struct drm_i915_gem_object *pwrctx;struct drm_i915_gem_object *renderctx;
@@ -743,6 +742,7 @@ typedef struct drm_i915_private {* here! */ struct {unsigned allow_batchbuffer :1 ; +u32 __iomem *gfx_hws_cpu_addr; } dri1;/* Kernel Modesetting */
Signature · 1 line
1.7.7.6
PATCH 16/17 drm/i915: fixup __iomem mixups in ringbuffer.c
In reply to Daniel VetterTwo things:
- ring->virtual start is an __iomem pointer, treat it accordingly.
- dev_priv->status_page.page_addr is now always a cpu addr, no pointer casting needed for that.
Take the opportunity to remove the unnecessary drm indirection when setting up the ringbuffer iomapping.
--- drivers/gpu/drm/i915/i915_dma.c | 2 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 39 +++++++++--------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 +-- 3 files changed, 15 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +1 -1
@@ -256,7 +256,7 @@ static int i915_dma_resume(struct drm_device * dev)DRM_DEBUG_DRIVER ("%s\n" , __func__); -if (ring->map.handle ==NULL ) { +if (ring->virtual_start ==NULL ) {DRM_ERROR ("can not ioremap virtual address for" " ring buffer\n" );return -ENOMEM ;
drivers/gpu/drm/i915/intel_ringbuffer.c +12 -27
@@ -977,20 +977,14 @@ static int intel_init_ring_buffer(struct drm_device *dev,if (ret) goto err_unref; - ring->map.size = ring->size; - ring->map.offset = dev->agp->base + obj->gtt_offset; - ring->map.type =0 ; - ring->map.flags =0 ; - ring->map.mtrr =0 ; - -drm_core_ioremap_wc (&ring->map, dev); -if (ring->map.handle ==NULL ) { + ring->virtual_start =ioremap_wc (dev->agp->base + obj->gtt_offset, + ring->size); +if (ring->virtual_start ==NULL ) {DRM_ERROR ("Failed to map ringbuffer.\n" ); ret = -EINVAL ; goto err_unpin; } - ring->virtual_start = ring->map.handle; ret = ring->init (ring);if (ret) goto err_unmap;
@@ -1006,7 +1000,7 @@ static int intel_init_ring_buffer(struct drm_device *dev,return 0 ; err_unmap: -drm_core_ioremapfree (&ring->map, dev); +iounmap (ring->virtual_start); err_unpin:i915_gem_object_unpin (obj); err_unref:
@@ -1034,7 +1028,7 @@ void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring)I915_WRITE_CTL (ring,0 ); -drm_core_ioremapfree (&ring->map, ring->dev); +iounmap (ring->virtual_start);i915_gem_object_unpin (ring->obj);drm_gem_object_unreference (&ring->obj->base);
@@ -1048,7 +1042,7 @@ void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring)static int intel_wrap_ring_buffer (struct intel_ring_buffer *ring) { -unsigned int *virt; +uint32_t __iomem *virt;int rem = ring->size - ring->tail;if (ring->space < rem) {
@@ -1057,12 +1051,10 @@ static int intel_wrap_ring_buffer(struct intel_ring_buffer *ring)return ret; } - virt = (unsigned int *)(ring->virtual_start + ring->tail); - rem /=8 ; -while (rem--) { - *virt++ =MI_NOOP ; - *virt++ =MI_NOOP ; - } + virt = ring->virtual_start + ring->tail; + rem /=4 ; +while (rem--) +iowrite32 (MI_NOOP , virt++); ring->tail =0 ; ring->space =ring_space (ring);
@@ -1425,20 +1417,13 @@ int intel_render_ring_init_dri(struct drm_device *dev, u64 start, u32 size)if (IS_I830 (ring->dev)) ring->effective_size -=128 ; - ring->map.offset = start; - ring->map.size = size; - ring->map.type =0 ; - ring->map.flags =0 ; - ring->map.mtrr =0 ; - -drm_core_ioremap_wc (&ring->map, dev); -if (ring->map.handle ==NULL ) { + ring->virtual_start =ioremap_wc (start, size); +if (ring->virtual_start ==NULL ) {DRM_ERROR ("can not ioremap virtual address for" " ring buffer\n" );return -ENOMEM ; } - ring->virtual_start = (void __force __iomem *)ring->map.handle;return 0 ; }
drivers/gpu/drm/i915/intel_ringbuffer.h +2 -3
@@ -2,7 +2,7 @@#define _INTEL_RINGBUFFER_H_struct intel_hw_status_page { -u32 __iomem *page_addr; +u32 *page_addr;unsigned int gfx_addr;struct drm_i915_gem_object *obj; };
@@ -117,7 +117,6 @@ struct intel_ring_buffer {u32 outstanding_lazy_request;wait_queue_head_t irq_queue; -drm_local_map_t map;void *private; };
@@ -151,7 +150,7 @@ static inline u32 intel_read_status_page(struct intel_ring_buffer *ring, int reg) { -return ioread32 (ring->status_page.page_addr + reg); +return ring->status_page.page_addr[reg]; }/**
Signature · 1 line
1.7.7.6
PATCH 17/17 drm/i915: move pnv|ilk_gem_mem_freq to intel_pm.c
In reply to Daniel VetterBecause this is the place where we actually use the results of them.
--- drivers/gpu/drm/i915/i915_dma.c | 112 -------------------------------------- drivers/gpu/drm/i915/intel_pm.c | 113 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 112 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +0 -112
@@ -1375,113 +1375,6 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) master->driver_priv =NULL ; } -static void i915_pineview_get_mem_freq (struct drm_device *dev) -{ -drm_i915_private_t *dev_priv = dev->dev_private; -u32 tmp; - - tmp =I915_READ (CLKCFG ); - -switch (tmp &CLKCFG_FSB_MASK ) { -case CLKCFG_FSB_533 : - dev_priv->fsb_freq =533 ;/* 133*4 */ -break ; -case CLKCFG_FSB_800 : - dev_priv->fsb_freq =800 ;/* 200*4 */ -break ; -case CLKCFG_FSB_667 : - dev_priv->fsb_freq =667 ;/* 167*4 */ -break ; -case CLKCFG_FSB_400 : - dev_priv->fsb_freq =400 ;/* 100*4 */ -break ; - } - -switch (tmp &CLKCFG_MEM_MASK ) { -case CLKCFG_MEM_533 : - dev_priv->mem_freq =533 ; -break ; -case CLKCFG_MEM_667 : - dev_priv->mem_freq =667 ; -break ; -case CLKCFG_MEM_800 : - dev_priv->mem_freq =800 ; -break ; - } - -/* detect pineview DDR3 setting */ - tmp =I915_READ (CSHRDDR3CTL ); - dev_priv->is_ddr3 = (tmp &CSHRDDR3CTL_DDR3 ) ?1 :0 ; -} - -static void i915_ironlake_get_mem_freq (struct drm_device *dev) -{ -drm_i915_private_t *dev_priv = dev->dev_private; -u16 ddrpll, csipll; - - ddrpll =I915_READ16 (DDRMPLL1 ); - csipll =I915_READ16 (CSIPLL0 ); - -switch (ddrpll &0xff ) { -case 0xc : - dev_priv->mem_freq =800 ; -break ; -case 0x10 : - dev_priv->mem_freq =1066 ; -break ; -case 0x14 : - dev_priv->mem_freq =1333 ; -break ; -case 0x18 : - dev_priv->mem_freq =1600 ; -break ; -default : -DRM_DEBUG_DRIVER ("unknown memory frequency 0x%02x\n" , - ddrpll &0xff ); - dev_priv->mem_freq =0 ; -break ; - } - - dev_priv->r_t = dev_priv->mem_freq; - -switch (csipll &0x3ff ) { -case 0x00c : - dev_priv->fsb_freq =3200 ; -break ; -case 0x00e : - dev_priv->fsb_freq =3733 ; -break ; -case 0x010 : - dev_priv->fsb_freq =4266 ; -break ; -case 0x012 : - dev_priv->fsb_freq =4800 ; -break ; -case 0x014 : - dev_priv->fsb_freq =5333 ; -break ; -case 0x016 : - dev_priv->fsb_freq =5866 ; -break ; -case 0x018 : - dev_priv->fsb_freq =6400 ; -break ; -default : -DRM_DEBUG_DRIVER ("unknown fsb frequency 0x%04x\n" , - csipll &0x3ff ); - dev_priv->fsb_freq =0 ; -break ; - } - -if (dev_priv->fsb_freq ==3200 ) { - dev_priv->c_m =0 ; - }else if (dev_priv->fsb_freq >3200 && dev_priv->fsb_freq <=4800 ) { - dev_priv->c_m =1 ; - }else { - dev_priv->c_m =2 ; - } -} -static void i915_mtrr_setup (struct drm_i915_private *dev_priv,unsigned long base,unsigned long size)
@@ -1634,11 +1527,6 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) goto out_gem_unload; } -if (IS_PINEVIEW (dev)) -i915_pineview_get_mem_freq (dev); -else if (IS_GEN5 (dev)) -i915_ironlake_get_mem_freq (dev); -/* On the 945G/GM, the chipset reports the MSI capability on the * integrated graphics even though the support isn't actually there * according to the published specs. It doesn't appear to function
drivers/gpu/drm/i915/intel_pm.c +113 -0
125 lines not on this page · raw message
Signature · 1 line
1.7.7.6
Quoted 3 lines · Daniel Vetter
Hi all,
Essentially just rebased on top of latest dinq. Happy bikeshedding!
I've queued up the entire patchs series for -next with Jesse's irc-ack added.
-Daniel
Signature · 3 lines
Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48