Ivy Bridge supprt v2
Subsystems (3)
Updated with review comments, just need to check and make sure all the rebasing didn't mess anything up, and of course testing is always needed.
Thanks,
Jesse
PATCH 1/19 drm/i915: make FDI training a display function
Rather than branching in ironlake_pch_enable, add a new train_fdi function to the display function pointer struct and use it instead.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_display.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -209,7 +209,7 @@ struct drm_i915_display_funcs {struct drm_display_mode *adjusted_mode, int x, int y, struct drm_framebuffer *old_fb); - +void (*fdi_link_train)(struct drm_crtc *crtc);/* clock updates for mode set */ /* cursor updates */ /* render clock increase/decrease */
drivers/gpu/drm/i915/intel_display.c +3 -4
@@ -2465,10 +2465,7 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)u32 reg, temp;/* For PCH output, training FDI link */ -if (IS_GEN6 (dev)) -gen6_fdi_link_train (crtc); -else -ironlake_fdi_link_train (crtc); + dev_priv->display.fdi_link_train (crtc);intel_enable_pch_pll (dev_priv, pipe);
@@ -7290,6 +7287,7 @@ static void intel_init_display(struct drm_device *dev) "Disable CxSR\n"); dev_priv->display.update_wm =NULL ; } + dev_priv->display.fdi_link_train = ironlake_fdi_link_train; }else if (IS_GEN6 (dev)) {if (SNB_READ_WM0_LATENCY ()) { dev_priv->display.update_wm = sandybridge_update_wm;
@@ -7298,6 +7296,7 @@ static void intel_init_display(struct drm_device *dev) "Disable CxSR\n"); dev_priv->display.update_wm =NULL ; } + dev_priv->display.fdi_link_train = gen6_fdi_link_train; }else dev_priv->display.update_wm =NULL ; }else if (IS_PINEVIEW (dev)) {
Signature · 1 line
1.7.4.1
Re: [PATCH 01/19] drm/i915: make FDI training a display function
Quoted 4 lines · Jesse Barnes
Rather than branching in
ironlake_pch_enable, add a newtrain_fdifunction to the display function pointer struct and use it instead.Signed-off-by Jesse Barnes <[email protected]>
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/19 drm/i915: split irq handling into per-chipset functions
In reply to Jesse BarnesSet the IRQ handling functions in driver load so they'll just be used directly, rather than branching over most of the code in the chipset functions.
--- drivers/gpu/drm/i915/i915_dma.c | 12 ++++++++++ drivers/gpu/drm/i915/i915_drv.h | 6 +++++ drivers/gpu/drm/i915/i915_irq.c | 45 +++++++++++++++++++++----------------- 3 files changed, 43 insertions(+), 20 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +12 -0
@@ -1253,6 +1253,18 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_init (dev); +if (HAS_PCH_SPLIT (dev)) { + dev->driver->irq_handler = ironlake_irq_handler; + dev->driver->irq_preinstall = ironlake_irq_preinstall; + dev->driver->irq_postinstall = ironlake_irq_postinstall; + dev->driver->irq_uninstall = ironlake_irq_uninstall; + }else { + dev->driver->irq_preinstall = i915_driver_irq_preinstall; + dev->driver->irq_postinstall = i915_driver_irq_postinstall; + dev->driver->irq_uninstall = i915_driver_irq_uninstall; + dev->driver->irq_handler = i915_driver_irq_handler; + } + ret =drm_irq_install (dev);if (ret) goto cleanup_vga_switcheroo;
drivers/gpu/drm/i915/i915_drv.h +6 -0
@@ -1024,6 +1024,12 @@ extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS);extern void i915_driver_irq_preinstall (struct drm_device * dev);extern int i915_driver_irq_postinstall (struct drm_device *dev);extern void i915_driver_irq_uninstall (struct drm_device * dev); + +extern irqreturn_t ironlake_irq_handler (DRM_IRQ_ARGS ); +extern void ironlake_irq_preinstall (struct drm_device *dev); +extern int ironlake_irq_postinstall (struct drm_device *dev); +extern void ironlake_irq_uninstall (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,
drivers/gpu/drm/i915/i915_irq.c +25 -20
111 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH 02/19] drm/i915: split irq handling into per-chipset functions
Quoted 3 lines · Jesse Barnes
Set the IRQ handling functions in driver load so they'll just be used directly, rather than branching over most of the code in the chipset functions.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
[SNB: Regression] Re: [PATCH 02/19] drm/i915: split irq handling into per-chipset functions
In reply to Jesse BarnesQuoted 3 lines · Jesse Barnes
Set the IRQ handling functions in driver load so they'll just be used directly, rather than branching over most of the code in the chipset functions.
I'm seeing a kernel panic on my SNB i7-2600K with keithp/drm-intel-next (61e499b). I've bisected to 4697995 -- the commit mentioned in the subject.
My photo of the stack trace is a bit blurry, but below is my attempted transcription of the the stack. I can't read the addresses at all; please let me know if you'd like me to obtain a better dump.
Call Trace: <IRQ> queue_work_op+0x1d/0x30 queue_work+0x35/0x50 ironlake_irq_handler+0xec9/0xfa0 [i915] handle_irq_event_percpu+0x75/0x260 handle_edge_irq+0x6f/0x110 handle_irq+0x1d/0x30 do_IRQ+0x58/0xe9 common_interrupt+0x13/0x13 ... more stuff that I assume is irrelevent ...
Please let me know if I can provide additional useful information.
Thanks,
-Ted
Re: [SNB: Regression] Re: [PATCH 02/19] drm/i915: split irq handling into per-chipset functions
Quoted 26 lines · On Wed, 18 May 2011 21:51:23 +1000 Ted Phelps <[email protected]> wrote:
Quoted 3 lines · Jesse Barnes
Set the IRQ handling functions in driver load so they'll just be used directly, rather than branching over most of the code in the chipset functions.
I'm seeing a kernel panic on my SNB i7-2600K with keithp/drm-intel-next (61e499b). I've bisected to 4697995 -- the commit mentioned in the subject.
My photo of the stack trace is a bit blurry, but below is my attempted transcription of the the stack. I can't read the addresses at all; please let me know if you'd like me to obtain a better dump.
Call Trace: <IRQ> queue_work_op+0x1d/0x30 queue_work+0x35/0x50 ironlake_irq_handler+0xec9/0xfa0 [i915] handle_irq_event_percpu+0x75/0x260 handle_edge_irq+0x6f/0x110 handle_irq+0x1d/0x30 do_IRQ+0x58/0xe9 common_interrupt+0x13/0x13 ... more stuff that I assume is irrelevent ...
Quoted 1 line
Please let me know if I can provide additional useful information.
Please try this patch.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
drivers/gpu/drm/i915/i915_irq.c +1 -0
@@ -1736,6 +1736,7 @@ void ironlake_irq_preinstall(struct drm_device *dev)INIT_WORK (&dev_priv->hotplug_work, i915_hotplug_work_func);INIT_WORK (&dev_priv->error_work, i915_error_work_func); +INIT_WORK (&dev_priv->rps_work, gen6_pm_rps_work);I915_WRITE (HWSTAM ,0xeffe );
Re: [SNB: Regression] Re: [PATCH 02/19] drm/i915: split irq handling into per-chipset functions
Quoted 1 line · Jesse Barnes
Please try this patch.
Works a treat, as does the one that Keith merged into drm-intel-next.
Thanks for the speedy patch!
-Ted
PATCH 3/19 drm/i915: split enable/disable vblank code into chipset specific functions
In reply to Jesse BarnesThis makes the Ironlake+ code trivial and generally simplifies things.
--- drivers/gpu/drm/i915/i915_dma.c | 4 +++ drivers/gpu/drm/i915/i915_drv.h | 2 + drivers/gpu/drm/i915/i915_irq.c | 42 ++++++++++++++++++++++++++++---------- 3 files changed, 37 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +4 -0
@@ -1258,11 +1258,15 @@ static int i915_load_modeset_init(struct drm_device *dev) dev->driver->irq_preinstall = ironlake_irq_preinstall; dev->driver->irq_postinstall = ironlake_irq_postinstall; dev->driver->irq_uninstall = ironlake_irq_uninstall; + dev->driver->enable_vblank = ironlake_enable_vblank; + dev->driver->disable_vblank = ironlake_disable_vblank; }else { dev->driver->irq_preinstall = i915_driver_irq_preinstall; dev->driver->irq_postinstall = i915_driver_irq_postinstall; dev->driver->irq_uninstall = i915_driver_irq_uninstall; dev->driver->irq_handler = i915_driver_irq_handler; + dev->driver->enable_vblank = i915_enable_vblank; + dev->driver->disable_vblank = i915_disable_vblank; } ret =drm_irq_install (dev);
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -1036,6 +1036,8 @@ extern int i915_vblank_pipe_get(struct drm_device *dev, void *data, struct drm_file *file_priv);extern int i915_enable_vblank (struct drm_device *dev,int crtc);extern void i915_disable_vblank (struct drm_device *dev,int crtc); +extern int ironlake_enable_vblank (struct drm_device *dev,int crtc); +extern void ironlake_disable_vblank (struct drm_device *dev,int crtc);extern u32 i915_get_vblank_counter (struct drm_device *dev,int crtc);extern u32 gm45_get_vblank_counter (struct drm_device *dev,int crtc); extern int i915_vblank_swap(struct drm_device *dev, void *data,
drivers/gpu/drm/i915/i915_irq.c +31 -11
60 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH 03/19] drm/i915: split enable/disable vblank code into chipset specific functions
Quoted 3 lines · Jesse Barnes
This makes the Ironlake+ code trivial and generally simplifies things.
Signed-off-by Jesse Barnes <[email protected]>
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/19 drm/i915: add IS_GEN7 macro to cover Ivy Bridge and later
In reply to Jesse BarnesNote: IS_GEN* are for render related checks. Display and other checks should use IS_MOBILE, IS_$CHIPSET or test for specific features.
--- drivers/gpu/drm/i915/i915_drv.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +7 -0
@@ -931,11 +931,18 @@ enum intel_chip_family {#define IS_IRONLAKE_M (dev) ((dev)->pci_device == 0x0046)#define IS_MOBILE (dev) (INTEL_INFO(dev)->is_mobile) +/* +* The genX designation typically refers to the render engine, so render +* capability related checks should use IS_GEN, while display and other checks +* have their own (e.g. HAS_PCH_SPLIT for ILK+ display, IS_foo for particular +* chips, etc.). +*/ #define IS_GEN2 (dev) (INTEL_INFO(dev)->gen == 2)#define IS_GEN3 (dev) (INTEL_INFO(dev)->gen == 3)#define IS_GEN4 (dev) (INTEL_INFO(dev)->gen == 4)#define IS_GEN5 (dev) (INTEL_INFO(dev)->gen == 5)#define IS_GEN6 (dev) (INTEL_INFO(dev)->gen == 6) +#define IS_GEN7 (dev) (INTEL_INFO(dev)->gen == 7)#define HAS_BSD (dev) (INTEL_INFO(dev)->has_bsd_ring)#define HAS_BLT (dev) (INTEL_INFO(dev)->has_blt_ring)
Signature · 1 line
1.7.4.1
Re: [PATCH 04/19] drm/i915: add IS_GEN7 macro to cover Ivy Bridge and later
Quoted 4 lines · Jesse Barnes
Note: IS_GEN* are for render related checks. Display and other checks should use
IS_MOBILE, IS_$CHIPSET or test for specific features.Signed-off-by Jesse Barnes <[email protected]>
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/19 drm/i915: add IS_IVYBRIDGE macro for checks
In reply to Jesse Barnes--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -230,6 +230,7 @@ struct intel_device_info { u8 is_pineview : 1; u8 is_broadwater : 1; u8 is_crestline : 1; + u8 is_ivybridge : 1; u8 has_fbc : 1; u8 has_pipe_cxsr : 1; u8 has_hotplug : 1;
@@ -929,6 +930,7 @@ enum intel_chip_family {#define IS_G33 (dev) (INTEL_INFO(dev)->is_g33)#define IS_IRONLAKE_D (dev) ((dev)->pci_device == 0x0042)#define IS_IRONLAKE_M (dev) ((dev)->pci_device == 0x0046) +#define IS_IVYBRIDGE (dev) (INTEL_INFO(dev)->is_ivybridge)#define IS_MOBILE (dev) (INTEL_INFO(dev)->is_mobile)/*
Signature · 1 line
1.7.4.1
Re: [PATCH 05/19] drm/i915: add IS_IVYBRIDGE macro for checks
On Thu, 28 Apr 2011 15:12:51 -0700, Jesse Barnes <[email protected]> wrote:
I don't see a patch in this series that sets this value from the PCI ids. Is that still pending?
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/19 drm/i915: Ivy Bridge has split display and pipe control
In reply to Jesse BarnesIvy Bridge has a similar split display controller to Sandy Bridge, so use HAS_PCH_SPLIT. And gen7 also has the pipe control instruction, so use HAS_PIPE_CONTROL as well.
--- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +2 -2
@@ -971,8 +971,8 @@ enum intel_chip_family {#define HAS_PIPE_CXSR (dev) (INTEL_INFO(dev)->has_pipe_cxsr)#define I915_HAS_FBC (dev) (INTEL_INFO(dev)->has_fbc) -#define HAS_PCH_SPLIT (dev) (IS_GEN5(dev) || IS_GEN6(dev)) -#define HAS_PIPE_CONTROL (dev) (IS_GEN5(dev) || IS_GEN6(dev)) +#define HAS_PCH_SPLIT (dev) (IS_GEN5(dev) || IS_GEN6(dev) || IS_IVYBRIDGE(dev)) +#define HAS_PIPE_CONTROL (dev) (INTEL_INFO(dev)->gen >= 5)#define INTEL_PCH_TYPE (dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)#define HAS_PCH_CPT (dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
Signature · 1 line
1.7.4.1
Re: [PATCH 06/19] drm/i915: Ivy Bridge has split display and pipe control
Quoted 5 lines · Jesse Barnes
Ivy Bridge has a similar split display controller to Sandy Bridge, so use
HAS_PCH_SPLIT. And gen7 also has the pipe control instruction, so useHAS_PIPE_CONTROLas well.Signed-off-by Jesse Barnes <[email protected]>
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/19 drm/i915: add swizzle/tiling support for Ivy Bridge
In reply to Jesse BarnesTreat it like Ironlake and Sandy Bridge.
--- drivers/gpu/drm/i915/i915_gem_tiling.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_gem_tiling.c +1 -1
@@ -92,7 +92,7 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)uint32_t swizzle_x =I915_BIT_6_SWIZZLE_UNKNOWN ;uint32_t swizzle_y =I915_BIT_6_SWIZZLE_UNKNOWN ; -if (IS_GEN5 (dev) ||IS_GEN6 (dev)) { +if (IS_GEN5 (dev) ||IS_GEN6 (dev) ||IS_GEN7 (dev)) {/* On Ironlake whatever DRAM config, GPU always do * same swizzling setup. */
Signature · 1 line
1.7.4.1
Re: [PATCH 07/19] drm/i915: add swizzle/tiling support for Ivy Bridge
Quoted 3 lines · Jesse Barnes
Treat it like Ironlake and Sandy Bridge.
Signed-off-by Jesse Barnes <[email protected]>
Should use gen >= 5?
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/19] drm/i915: add swizzle/tiling support for Ivy Bridge
Quoted 6 lines · On Thu, 28 Apr 2011 15:42:13 -0700 Keith Packard <[email protected]> wrote:
Quoted 3 lines · Jesse Barnes
Treat it like Ironlake and Sandy Bridge.
Signed-off-by Jesse Barnes <[email protected]>Should use gen >= 5?
Yeah, probably better.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
PATCH 8/19 drm/i915: manual FDI training for Ivy Bridge
In reply to Jesse BarnesA0 stepping chips need to use manual training, but the bits have all moved. So fix things up so we can at least train FDI for VGA links.
--- drivers/gpu/drm/i915/i915_reg.h | 10 +++ drivers/gpu/drm/i915/intel_display.c | 128 +++++++++++++++++++++++++++++++++- 2 files changed, 135 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +10 -0
@@ -3105,7 +3105,15 @@#define FDI_TX_ENHANCE_FRAME_ENABLE (1<<18)/* Ironlake: hardwired to 1 */ #define FDI_TX_PLL_ENABLE (1<<14) + +/* Ivybridge has different bits for lolz */ +#define FDI_LINK_TRAIN_PATTERN_1_IVB (0<<8) +#define FDI_LINK_TRAIN_PATTERN_2_IVB (1<<8) +#define FDI_LINK_TRAIN_PATTERN_IDLE_IVB (2<<8) +#define FDI_LINK_TRAIN_NONE_IVB (3<<8) +/* both Tx and Rx */ +#define FDI_LINK_TRAIN_AUTO (1<<10)#define FDI_SCRAMBLING_ENABLE (0<<7)#define FDI_SCRAMBLING_DISABLE (1<<7)
@@ -3115,6 +3123,8 @@#define FDI_RX_CTL (pipe) _PIPE(pipe, _FDI_RXA_CTL, _FDI_RXB_CTL)#define FDI_RX_ENABLE (1<<31)/* train, dp width same as FDI_TX */ +#define FDI_FS_ERRC_ENABLE (1<<27) +#define FDI_FE_ERRC_ENABLE (1<<26)#define FDI_DP_PORT_WIDTH_X8 (7<<19)#define FDI_8BPC (0<<16)#define FDI_10BPC (1<<16)
drivers/gpu/drm/i915/intel_display.c +125 -3
152 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH 08/19] drm/i915: manual FDI training for Ivy Bridge
drivers/gpu/drm/i915/intel_display.c static void intel_fdi_normal_train(struct drm_crtc *crtc) · line 2056
Quoted 7 lines · Jesse Barnes
drivers/gpu/drm/i915/intel_display.c +7
-0+if (IS_GEN6 (dev)) { + temp &= ~FDI_LINK_TRAIN_NONE ; + temp |=FDI_LINK_TRAIN_NONE |FDI_TX_ENHANCE_FRAME_ENABLE ; + }else if (IS_IVYBRIDGE (dev)) { + temp &= ~FDI_LINK_TRAIN_NONE_IVB ; + temp |=FDI_LINK_TRAIN_NONE_IVB |FDI_TX_ENHANCE_FRAME_ENABLE ; + }
This seems inconsistent using IS_GEN6 for SNB and IS_IVYBRIDGE for IVB?
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 08/19] drm/i915: manual FDI training for Ivy Bridge
Quoted 11 lines · On Thu, 28 Apr 2011 15:43:10 -0700 Keith Packard <[email protected]> wrote:
drivers/gpu/drm/i915/intel_display.c static void intel_fdi_normal_train(struct drm_crtc *crtc) · line 2056
Quoted 7 lines · Jesse Barnes
drivers/gpu/drm/i915/intel_display.c +7
-0+if (IS_GEN6 (dev)) { + temp &= ~FDI_LINK_TRAIN_NONE ; + temp |=FDI_LINK_TRAIN_NONE |FDI_TX_ENHANCE_FRAME_ENABLE ; + }else if (IS_IVYBRIDGE (dev)) { + temp &= ~FDI_LINK_TRAIN_NONE_IVB ; + temp |=FDI_LINK_TRAIN_NONE_IVB |FDI_TX_ENHANCE_FRAME_ENABLE ; + }This seems inconsistent using
IS_GEN6for SNB andIS_IVYBRIDGEfor IVB?
Yes, there are several IS_GEN checks that I'd argue are wrong, I can clean them up in a subsequent.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
PATCH 9/19 drm/i915: automatic FDI training support for Ivy Bridge
In reply to Jesse BarnesIvy Bridge supports auto-training on the CPU side, so add a separate training function to handle it.
--- drivers/gpu/drm/i915/i915_reg.h | 2 + drivers/gpu/drm/i915/intel_display.c | 82 +++++++++++++++++++++++++++++++-- 2 files changed, 79 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -3116,6 +3116,8 @@#define FDI_LINK_TRAIN_AUTO (1<<10)#define FDI_SCRAMBLING_ENABLE (0<<7)#define FDI_SCRAMBLING_DISABLE (1<<7) +/* Ivybridge */ +#define FDI_AUTO_TRAIN_DONE (1<<1)/* FDI_RX, FDI_X is hard-wired to Transcoder_X */ #define _FDI_RXA_CTL 0xf000c
drivers/gpu/drm/i915/intel_display.c +77 -5
113 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Re: [PATCH 09/19] drm/i915: automatic FDI training support for Ivy Bridge
Quoted 124 lines · On Thu, 28 Apr 2011 15:12:55 -0700 Jesse Barnes <[email protected]>…
Ivy Bridge supports auto-training on the CPU side, so add a separate training function to handle it.
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 + drivers/gpu/drm/i915/intel_display.c | 82 +++++++++++++++++++++++++++++++-- 2 files changed, 79 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -3116,6 +3116,8 @@#define FDI_LINK_TRAIN_AUTO (1<<10)#define FDI_SCRAMBLING_ENABLE (0<<7)#define FDI_SCRAMBLING_DISABLE (1<<7) +/* Ivybridge */ +#define FDI_AUTO_TRAIN_DONE (1<<1)/* FDI_RX, FDI_X is hard-wired to Transcoder_X */ #define _FDI_RXA_CTL 0xf000cdrivers/gpu/drm/i915/intel_display.c +72
-3@@ -2411,6 +2411,75 @@ static void ivb_manual_fdi_link_train(struct drm_crtc *crtc)DRM_DEBUG_KMS ("FDI train done.\n" ); } +/* On Ivybridge we can use auto training */ +static void ivb_fdi_link_train (struct drm_crtc *crtc) +{ +struct drm_device *dev = crtc->dev; +struct drm_i915_private *dev_priv = dev->dev_private; +struct intel_crtc *intel_crtc =to_intel_crtc (crtc); +unsigned long start =jiffies_to_msecs (jiffies); +int pipe = intel_crtc->pipe; +u32 reg, temp, i, j; + +/* Can't pair IVB & Ibex Peak */ +BUG_ON (HAS_PCH_IBX (dev)); + + reg =FDI_TX_CTL (pipe); + temp =I915_READ (reg); + temp &= ~(7 <<19 ); + temp |= (intel_crtc->fdi_lanes -1 ) <<19 ; + temp &= ~FDI_LINK_TRAIN_NONE ; +I915_WRITE (reg, temp); + +/* Enable auto training on TX and RX */ +for (i =0 ; i <ARRAY_SIZE (snb_b_fdi_train_param); i++) { +/* Try each vswing/pre-emphasis pair twice */ +for (j =0 ; j <2 ; j++) { + reg =FDI_TX_CTL (pipe); + temp =I915_READ (reg); + temp |=FDI_AUTO_TRAINING ; + temp &= ~FDI_LINK_TRAIN_VOL_EMP_MASK ; + temp |= snb_b_fdi_train_param[i]; +I915_WRITE (reg, temp |FDI_TX_ENABLE ); + + reg =FDI_RX_CTL (pipe); + temp =I915_READ (reg); +I915_WRITE (reg, temp |FDI_RX_ENABLE ); +POSTING_READ (reg); + +udelay (5 ); + + reg =FDI_TX_CTL (pipe); + temp =I915_READ (reg); +if ((temp &FDI_AUTO_TRAIN_DONE ) || + (I915_READ (reg) &FDI_AUTO_TRAIN_DONE )) { +DRM_DEBUG_KMS ("FDI auto train complete in %d ms\n" , +jiffies_to_msecs (jiffies) - start); + goto done; + } + + reg =FDI_TX_CTL (pipe); + temp =I915_READ (reg); +I915_WRITE (reg, temp & ~FDI_TX_ENABLE ); + + reg =FDI_RX_CTL (pipe); + temp =I915_READ (reg); +I915_WRITE (reg, temp & ~FDI_RX_ENABLE ); +POSTING_READ (reg); +udelay (31 );/* wait idle time before retrying */ + } + } +DRM_ERROR ("FDI auto train failed\n" ); +return ; + +done: + reg =FDI_RX_CTL (pipe); + temp =I915_READ (reg); + temp |=FDI_FS_ERR_CORRECT_ENABLE |FDI_FE_ERR_CORRECT_ENABLE ; +I915_WRITE (reg, temp); +POSTING_READ (reg); +} +static void ironlake_fdi_pll_enable (struct drm_crtc *crtc) {struct drm_device *dev = crtc->dev;@@ -2452,7 +2521,7 @@ static void ironlake_fdi_pll_enable(struct drm_crtc *crtc) } } -static void ironlake_fdi_disable (struct drm_crtc *crtc) +static void ironlake_fdi_pll_disable (struct drm_crtc *crtc) {struct drm_device *dev = crtc->dev;struct drm_i915_private *dev_priv = dev->dev_private;@@ -2674,9 +2743,9 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) is_pch_port =intel_crtc_driving_pch (crtc);if (is_pch_port) -ironlake_fdi_enable (crtc); +ironlake_fdi_pll_enable (crtc);else -ironlake_fdi_disable (crtc); +ironlake_fdi_pll_disable (crtc);/* Enable panel fitting for LVDS */ if (dev_priv->pch_pf_size &&
drivers/gpu/drm/i915/intel_display.c static void ironlake_crtc_disable(struct drm_crtc *crtc) · line 2801
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -2729,7 +2798,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)I915_WRITE (PF_CTL (pipe),0 );I915_WRITE (PF_WIN_SZ (pipe),0 ); -ironlake_fdi_disable (crtc); +ironlake_fdi_pll_disable (crtc);
arg, screwed up the rebase here; the fdi_pll name change needs to stay together.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Re: [PATCH 09/19] drm/i915: automatic FDI training support for Ivy Bridge
In reply to Jesse BarnesQuoted 2 lines · Jesse Barnes
Ivy Bridge supports auto-training on the CPU side, so add a separate training function to handle it.
Let's leave this out of the kernel until we have hardware that actually uses it.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/19 drm/i915: treat Ivy Bridge watermarks like Sandy Bridge
In reply to Jesse BarnesNot fully tested.
--- drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_display.c +8 -1
@@ -7229,7 +7229,7 @@ void intel_enable_clock_gating(struct drm_device *dev) _3D_CHICKEN2_WM_READ_PIPELINED); } -if (IS_GEN6 (dev)) { +if (IS_GEN6 (dev) ||IS_IVYBRIDGE (dev)) {I915_WRITE (WM3_LP_ILK ,0 );I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 );
@@ -7491,6 +7491,13 @@ static void intel_init_display(struct drm_device *dev) dev_priv->display.fdi_link_train = ivb_fdi_link_train; else dev_priv->display.fdi_link_train = ivb_manual_fdi_link_train; +if (SNB_READ_WM0_LATENCY ()) { + dev_priv->display.update_wm = sandybridge_update_wm; + }else { +DRM_DEBUG_KMS ("Failed to read display plane latency. " +"Disable CxSR\n" ); + dev_priv->display.update_wm =NULL ; + } }else dev_priv->display.update_wm =NULL ; }else if (IS_PINEVIEW (dev)) {
Signature · 1 line
1.7.4.1
Re: [PATCH 10/19] drm/i915: treat Ivy Bridge watermarks like Sandy Bridge
drivers/gpu/drm/i915/intel_display.c void intel_enable_clock_gating(struct drm_device *dev) · line 7232
Quoted 2 lines · Jesse Barnes
drivers/gpu/drm/i915/intel_display.c +1
-1-if (IS_GEN6 (dev)) { +if (IS_GEN6 (dev) ||IS_IVYBRIDGE (dev)) {
IS_GEN6 for SNB and IS_IVYBRIDGE for IVB? More consistency, please.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 10/19] drm/i915: treat Ivy Bridge watermarks like Sandy Bridge
Quoted 7 lines · On Thu, 28 Apr 2011 15:46:06 -0700 Keith Packard <[email protected]> wrote:
drivers/gpu/drm/i915/intel_display.c void intel_enable_clock_gating(struct drm_device *dev) · line 7232
Quoted 2 lines · Jesse Barnes
drivers/gpu/drm/i915/intel_display.c +1
-1-if (IS_GEN6 (dev)) { +if (IS_GEN6 (dev) ||IS_IVYBRIDGE (dev)) {
IS_GEN6for SNB andIS_IVYBRIDGEfor IVB? More consistency, please.
See earlier mail; GEN6 is the wrong one to use here imo.
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
PATCH 11/19 drm/i915: interrupt & vblank support for Ivy Bridge
In reply to Jesse BarnesAdd new interrupt handling functions for Ivy Bridge.
--- drivers/gpu/drm/i915/i915_dma.c | 12 +++- drivers/gpu/drm/i915/i915_drv.h | 7 ++ drivers/gpu/drm/i915/i915_irq.c | 156 +++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_reg.h | 13 +++ 4 files changed, 186 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_dma.c +10 -2
@@ -1253,7 +1253,15 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_modeset_init (dev); -if (HAS_PCH_SPLIT (dev)) { +if (IS_IVYBRIDGE (dev)) { +/* Share pre & uninstall handlers with ILK/SNB */ + dev->driver->irq_handler = ivybridge_irq_handler; + dev->driver->irq_preinstall = ironlake_irq_preinstall; + dev->driver->irq_postinstall = ivybridge_irq_postinstall; + dev->driver->irq_uninstall = ironlake_irq_uninstall; + dev->driver->enable_vblank = ivybridge_enable_vblank; + dev->driver->disable_vblank = ivybridge_disable_vblank; + }else if (HAS_PCH_SPLIT (dev)) { dev->driver->irq_handler = ironlake_irq_handler; dev->driver->irq_preinstall = ironlake_irq_preinstall; dev->driver->irq_postinstall = ironlake_irq_postinstall;
@@ -1998,7 +2006,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) dev->driver->get_vblank_counter = i915_get_vblank_counter; dev->max_vblank_count =0xffffff ;/* only 24 bits of frame count */ -if (IS_G4X (dev) ||IS_GEN5 (dev) ||IS_GEN6 (dev)) { +if (IS_G4X (dev) ||IS_GEN5 (dev) ||IS_GEN6 (dev) ||IS_IVYBRIDGE (dev)) { dev->max_vblank_count =0xffffffff ;/* full 32 bit counter */ dev->driver->get_vblank_counter = gm45_get_vblank_counter; }
drivers/gpu/drm/i915/i915_drv.h +7 -0
@@ -1039,6 +1039,11 @@ extern void ironlake_irq_preinstall(struct drm_device *dev);extern int ironlake_irq_postinstall (struct drm_device *dev);extern void ironlake_irq_uninstall (struct drm_device *dev); +extern irqreturn_t ivybridge_irq_handler (DRM_IRQ_ARGS ); +extern void ivybridge_irq_preinstall (struct drm_device *dev); +extern int ivybridge_irq_postinstall (struct drm_device *dev); +extern void ivybridge_irq_uninstall (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,
@@ -1047,6 +1052,8 @@ extern int i915_enable_vblank(struct drm_device *dev, int crtc);extern void i915_disable_vblank (struct drm_device *dev,int crtc);extern int ironlake_enable_vblank (struct drm_device *dev,int crtc);extern void ironlake_disable_vblank (struct drm_device *dev,int crtc); +extern int ivybridge_enable_vblank (struct drm_device *dev,int crtc); +extern void ivybridge_disable_vblank (struct drm_device *dev,int crtc);extern u32 i915_get_vblank_counter (struct drm_device *dev,int crtc);extern u32 gm45_get_vblank_counter (struct drm_device *dev,int crtc); extern int i915_vblank_swap(struct drm_device *dev, void *data,
drivers/gpu/drm/i915/i915_irq.c +156 -0
180 lines not on this page · raw message
drivers/gpu/drm/i915/i915_reg.h +13 -0
@@ -2779,6 +2779,19 @@#define DE_PIPEA_VSYNC (1 << 3)#define DE_PIPEA_FIFO_UNDERRUN (1 << 0) +/* More Ivybridge lolz */ +#define DE_ERR_DEBUG_IVB (1<<30) +#define DE_GSE_IVB (1<<29) +#define DE_PCH_EVENT_IVB (1<<28) +#define DE_DP_A_HOTPLUG_IVB (1<<27) +#define DE_AUX_CHANNEL_A_IVB (1<<26) +#define DE_SPRITEB_FLIP_DONE_IVB (1<<9) +#define DE_SPRITEA_FLIP_DONE_IVB (1<<4) +#define DE_PLANEB_FLIP_DONE_IVB (1<<8) +#define DE_PLANEA_FLIP_DONE_IVB (1<<3) +#define DE_PIPEB_VBLANK_IVB (1<<5) +#define DE_PIPEA_VBLANK_IVB (1<<0) +#define DEISR 0x44000#define DEIMR 0x44004#define DEIIR 0x44008
Signature · 1 line
1.7.4.1
Re: [PATCH 11/19] drm/i915: interrupt & vblank support for Ivy Bridge
drivers/gpu/drm/i915/i915_dma.c int i915_driver_load(struct drm_device *dev, unsigned long flags) · line 2009
Quoted 2 lines · Jesse Barnes
drivers/gpu/drm/i915/i915_dma.c +1
-1-if (IS_G4X (dev) ||IS_GEN5 (dev) ||IS_GEN6 (dev)) { +if (IS_G4X (dev) ||IS_GEN5 (dev) ||IS_GEN6 (dev) ||IS_IVYBRIDGE (dev)) {
IS_G4X || gen >= 5 ?
Otherwise, this looks good (seems like it's just bit shuffling from SNB, right?)
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 11/19] drm/i915: interrupt & vblank support for Ivy Bridge
In reply to Jesse BarnesQuoted 1 line · Jesse Barnes
Add new interrupt handling functions for Ivy Bridge.
There's a slight discrepancy here:
drivers/gpu/drm/i915/i915_dma.c static int i915_load_modeset_init(struct drm_device *dev) · line 1263
Quoted 8 lines
drivers/gpu/drm/i915/i915_dma.c +8
-0+if (IS_IVYBRIDGE (dev)) { +/* Share pre & uninstall handlers with ILK/SNB */ + dev->driver->irq_handler = ivybridge_irq_handler; + dev->driver->irq_preinstall = ironlake_irq_preinstall; + dev->driver->irq_postinstall = ivybridge_irq_postinstall; + dev->driver->irq_uninstall = ironlake_irq_uninstall; + dev->driver->enable_vblank = ivybridge_enable_vblank; + dev->driver->disable_vblank = ivybridge_disable_vblank;
and later you say:
drivers/gpu/drm/i915/i915_drv.h extern void ironlake_irq_preinstall(struct drm_device *dev); · line 1045
Quoted 4 lines
drivers/gpu/drm/i915/i915_drv.h +4
-0+extern irqreturn_t ivybridge_irq_handler (DRM_IRQ_ARGS ); +extern void ivybridge_irq_preinstall (struct drm_device *dev); +extern int ivybridge_irq_postinstall (struct drm_device *dev); +extern void ivybridge_irq_uninstall (struct drm_device *dev);
Can you please tidy up this latter bit of copy'n'paste, it scared me whilst running git grep ;-)
I'd like to move those declarations out of the header, make the functions static and just export a single function from i915_irq.c to i915_dma.c that set the irq_handlers on the driver vfunc table and so prevent the possibility of any further confusion like Konstantin pointed out. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
PATCH 12/19 drm/i915: page flip support for Ivy Bridge
In reply to Jesse BarnesTreat Ivy Bridge like previous chips as far as flip submission is concerned.
--- drivers/gpu/drm/i915/intel_display.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -0
@@ -6362,6 +6362,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,break ;case 6 : +case 7 :OUT_RING (MI_DISPLAY_FLIP |MI_DISPLAY_FLIP_PLANE (intel_crtc->plane));OUT_RING (fb->pitch | obj->tiling_mode);
Signature · 1 line
1.7.4.1
PATCH 13/19 drm/i915: untested DP support for Ivy Bridge
In reply to Jesse BarnesTreat it like Sandy Bridge in a few places.
--- drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +3 -3
@@ -312,7 +312,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,else aux_clock_divider =intel_hrawclk (dev) /2 ; -if (IS_GEN6 (dev)) +if (IS_GEN6 (dev) ||IS_GEN7 (dev)) precharge =3 ;else precharge =5 ;
@@ -1302,7 +1302,7 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)for (;;) {/* Use intel_dp->train_set[0] to set the voltage and pre emphasis values */ uint32_t signal_levels; -if (IS_GEN6 (dev) &&is_edp (intel_dp)) { +if ((IS_GEN6 (dev) ||IS_GEN7 (dev)) &&is_edp (intel_dp)) { signal_levels =intel_gen6_edp_signal_levels (intel_dp->train_set[0 ]);DP = (DP & ~EDP_LINK_TRAIN_VOL_EMP_MASK_SNB ) | signal_levels; }else {
@@ -1376,7 +1376,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)break ; } -if (IS_GEN6 (dev) &&is_edp (intel_dp)) { +if ((IS_GEN6 (dev) ||IS_GEN7 (dev)) &&is_edp (intel_dp)) { signal_levels =intel_gen6_edp_signal_levels (intel_dp->train_set[0 ]);DP = (DP & ~EDP_LINK_TRAIN_VOL_EMP_MASK_SNB ) | signal_levels; }else {
Signature · 1 line
1.7.4.1
Re: [PATCH 13/19] drm/i915: untested DP support for Ivy Bridge
Quoted 1 line · Jesse Barnes
Treat it like Sandy Bridge in a few places.
gen >= 6?
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 13/19] drm/i915: untested DP support for Ivy Bridge
In reply to Jesse BarnesQuoted 12 lines · Jesse Barnes
Treat it like Sandy Bridge in a few places.
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +0
-0
drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 315
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1@@ -312,7 +312,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,else aux_clock_divider =intel_hrawclk (dev) /2 ; -if (IS_GEN6 (dev)) +if (IS_GEN6 (dev) ||IS_GEN7 (dev))
Shouldn't these be IS_SANDYBRIDGE(dev) || IS_IVYBRIDGE(dev) following the convention that info->gen is reserved for the render engine.
Perhaps if you do the s/IS_GEN6/IS_SNADYBRIDGE/ fixes first it will become much clearer? :)
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 13/19] drm/i915: untested DP support for Ivy Bridge
Quoted 2 lines · Chris Wilson
Perhaps if you do the s/IS_GEN6/IS_SNADYBRIDGE/ fixes first it will become much clearer? :)
The only question is one of regressions; getting the cleanups tested in isolation from the IVB patches. That seems do-able for the 2.6.40 merge window.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 13/19] drm/i915: untested DP support for Ivy Bridge
In reply to Chris WilsonQuoted 16 lines · On Sun, 01 May 2011 17:26:11 +0100 Chris Wilson <[email protected]>…
Quoted 15 lines · Jesse Barnes
Treat it like Sandy Bridge in a few places.
Signed-off-by Jesse Barnes <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +0
-0@@ -312,7 +312,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,else aux_clock_divider =intel_hrawclk (dev) /2 ;
Quoted 8 lines
drivers/gpu/drm/i915/intel_dp.c intel_dp_aux_ch(struct intel_dp *intel_dp, · line 315
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp.c +1
-1-if (IS_GEN6 (dev)) +if (IS_GEN6 (dev) ||IS_GEN7 (dev))Shouldn't these be
IS_SANDYBRIDGE(dev)||IS_IVYBRIDGE(dev)following the convention thatinfo->genis reserved for the render engine.Perhaps if you do the s/IS_GEN6/IS_SNADYBRIDGE/ fixes first it will become much clearer? :)
Yeah, sorry I violated my own rule, will fix (this one can be delayed until I can test it anyway).
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
PATCH 14/19 drm/i915: ring support for Ivy Bridge
In reply to Jesse BarnesUse Sandy Bridge paths in a few places.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +3 -3
@@ -287,7 +287,7 @@ static int init_render_ring(struct intel_ring_buffer *ring)if (INTEL_INFO (dev)->gen >3 ) {int mode =VS_TIMER_DISPATCH <<16 |VS_TIMER_DISPATCH ; -if (IS_GEN6 (dev)) +if (IS_GEN6 (dev) ||IS_GEN7 (dev)) mode |=MI_FLUSH_ENABLE <<16 |MI_FLUSH_ENABLE ;I915_WRITE (MI_MODE , mode); }
@@ -553,7 +553,7 @@ render_ring_put_irq(struct intel_ring_buffer *ring)void intel_ring_setup_status_page (struct intel_ring_buffer *ring) {drm_i915_private_t *dev_priv = ring->dev->dev_private; -u32 mmio =IS_GEN6 (ring->dev) ? +u32 mmio = (IS_GEN6 (ring->dev) ||IS_GEN7 (ring->dev)) ?RING_HWS_PGA_GEN6 (ring->mmio_base) :RING_HWS_PGA (ring->mmio_base);I915_WRITE (mmio, (u32 )ring->status_page.gfx_addr);
@@ -1335,7 +1335,7 @@ int intel_init_bsd_ring_buffer(struct drm_device *dev)drm_i915_private_t *dev_priv = dev->dev_private;struct intel_ring_buffer *ring = &dev_priv->ring[VCS ]; -if (IS_GEN6 (dev)) +if (IS_GEN6 (dev) ||IS_GEN7 (dev)) *ring = gen6_bsd_ring;else *ring = bsd_ring;
Signature · 1 line
1.7.4.1
Re: [PATCH 14/19] drm/i915: ring support for Ivy Bridge
Quoted 1 line · Jesse Barnes
Use Sandy Bridge paths in a few places.
gen >= 6 ?
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 15/19 agp/intel: add Ivy Bridge support
In reply to Jesse BarnesJust use the Sandy Bridge routines.
--- drivers/char/agp/intel-agp.c | 3 +++ drivers/char/agp/intel-agp.h | 8 ++++++++ drivers/char/agp/intel-gtt.c | 10 ++++++++++ 3 files changed, 21 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +3 -0
@@ -903,6 +903,9 @@ static struct pci_device_id agp_intel_pci_table[] = {ID (PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB ),ID (PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB ),ID (PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_HB ), +ID (PCI_DEVICE_ID_INTEL_IVYBRIDGE_HB ), +ID (PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_HB ), + ID(PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB), { } };
drivers/char/agp/intel-agp.h +8 -0
@@ -225,6 +225,14 @@#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_GT2_PLUS_IG 0x0126#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_HB 0x0108/* Server */ #define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_IG 0x010A +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_HB 0x0150/* Desktop */ +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_GT1_IG 0x0152 +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_GT2_IG 0x0162 +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_HB 0x0154/* Mobile */ +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT1_IG 0x0156 +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG 0x0166 +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_HB 0x0158/* Server */ +#define PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG 0x015Aint intel_gmch_probe (struct pci_dev *pdev,struct agp_bridge_data *bridge);
drivers/char/agp/intel-gtt.c +10 -0
@@ -1420,6 +1420,16 @@ static const struct intel_gtt_driver_description { "Sandybridge", &sandybridge_gtt_driver }, {PCI_DEVICE_ID_INTEL_SANDYBRIDGE_S_IG , "Sandybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_GT1_IG, + "Ivybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_GT2_IG, + "Ivybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT1_IG, + "Ivybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_M_GT2_IG, + "Ivybridge", &sandybridge_gtt_driver }, + { PCI_DEVICE_ID_INTEL_IVYBRIDGE_S_GT1_IG, + "Ivybridge", &sandybridge_gtt_driver }, { 0, NULL, NULL } };
Signature · 1 line
1.7.4.1
PATCH 16/19 drm/i915: add PantherPoint PCH ID
In reply to Jesse BarnesWe can treat PantherPoint as CougarPoint as far as display goes.
--- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -0
@@ -236,6 +236,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist);#define INTEL_PCH_DEVICE_ID_MASK 0xff00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00 +#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00void intel_detect_pch (struct drm_device *dev) {
@@ -257,6 +258,10 @@ void intel_detect_pch (struct drm_device *dev)if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" ); + }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) { +/* PantherPoint is CPT compatible */ + dev_priv->pch_type =PCH_CPT ; +DRM_DEBUG_KMS ("Found PatherPoint PCH\n" ); } }pci_dev_put (pch);
Signature · 1 line
1.7.4.1
PATCH 17/19 drm/i915: add Ivy Bridge PCI IDs and driver feature structs
In reply to Jesse BarnesThere are several variants, set feature bits appropriately for both mobile and desktop parts.
--- drivers/gpu/drm/i915/i915_drv.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +19 -0
@@ -188,6 +188,20 @@ static const struct intel_device_info intel_sandybridge_m_info = { .has_blt_ring = 1, }; +static const struct intel_device_info intel_ivybridge_d_info = { + .is_ivybridge =1 , .gen =7 , + .need_gfx_hws =1 , .has_hotplug =1 , + .has_bsd_ring =1 , + .has_blt_ring =1 , +}; + +static const struct intel_device_info intel_ivybridge_m_info = { + .is_ivybridge =1 , .gen =7 , .is_mobile =1 , + .need_gfx_hws =1 , .has_hotplug =1 , + .has_bsd_ring =1 , + .has_blt_ring =1 , +}; +static const struct pci_device_id pciidlist[] = {/* aka */ INTEL_VGA_DEVICE (0x3577 , &intel_i830_info),/* I830_M */ INTEL_VGA_DEVICE (0x2562 , &intel_845g_info),/* 845_G */
@@ -227,6 +241,11 @@ static const struct pci_device_id pciidlist[] = { /* aka */INTEL_VGA_DEVICE (0x0116 , &intel_sandybridge_m_info),INTEL_VGA_DEVICE (0x0126 , &intel_sandybridge_m_info),INTEL_VGA_DEVICE (0x010A , &intel_sandybridge_d_info), +INTEL_VGA_DEVICE (0x0156 , &intel_ivybridge_m_info),/* GT1 mobile */ +INTEL_VGA_DEVICE (0x0166 , &intel_ivybridge_m_info),/* GT2 mobile */ +INTEL_VGA_DEVICE (0x0152 , &intel_ivybridge_d_info),/* GT1 desktop */ +INTEL_VGA_DEVICE (0x0162 , &intel_ivybridge_d_info),/* GT2 desktop */ +INTEL_VGA_DEVICE (0x015a , &intel_ivybridge_d_info),/* GT1 server */ {0, 0, 0} };
Signature · 1 line
1.7.4.1
Re: [PATCH 17/19] drm/i915: add Ivy Bridge PCI IDs and driver feature structs
Quoted 4 lines · Jesse Barnes
There are several variants, set feature bits appropriately for both mobile and desktop parts.
Signed-off-by Jesse Barnes <[email protected]>
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 18/19 drm/i915: set IBX pch type explicitly
In reply to Jesse BarnesThis is a little less confusing than relying on the implicit zeroing of the dev_priv.
--- drivers/gpu/drm/i915/i915_drv.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -1
@@ -254,6 +254,7 @@ MODULE_DEVICE_TABLE(pci, pciidlist);#endif #define INTEL_PCH_DEVICE_ID_MASK 0xff00 +#define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00#define INTEL_PCH_CPT_DEVICE_ID_TYPE 0x1c00#define INTEL_PCH_PPT_DEVICE_ID_TYPE 0x1e00
@@ -274,7 +275,10 @@ void intel_detect_pch (struct drm_device *dev)int id; id = pch->device &INTEL_PCH_DEVICE_ID_MASK ; -if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { +if (id ==INTEL_PCH_IBX_DEVICE_ID_TYPE ) { + dev_priv->pch_type =PCH_IBX ; +DRM_DEBUG_KMS ("Found Ibex Peak PCH\n" ); + }else if (id ==INTEL_PCH_CPT_DEVICE_ID_TYPE ) { dev_priv->pch_type =PCH_CPT ;DRM_DEBUG_KMS ("Found CougarPoint PCH\n" ); }else if (id ==INTEL_PCH_PPT_DEVICE_ID_TYPE ) {
Signature · 1 line
1.7.4.1
Re: [PATCH 18/19] drm/i915: set IBX pch type explicitly
Quoted 2 lines · Jesse Barnes
This is a little less confusing than relying on the implicit zeroing of the
dev_priv.
Thanks.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 19/19 drm/i915: split clock gating init into per-chipset functions
In reply to Jesse BarnesThis helps contain the mess to init_display() instead.
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_suspend.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 337 +++++++++++++++++++--------------- 3 files changed, 195 insertions(+), 146 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -210,12 +210,12 @@ struct drm_i915_display_funcs { int x, int y, struct drm_framebuffer *old_fb);void (*fdi_link_train)(struct drm_crtc *crtc); +void (*init_clock_gating)(struct drm_device *dev);/* clock updates for mode set */ /* cursor updates */ /* render clock increase/decrease */ /* display clock increase/decrease */ /* pll clock increase/decrease */ -/* clock gating init */ };struct intel_device_info {
drivers/gpu/drm/i915/i915_suspend.c +1 -1
@@ -864,7 +864,7 @@ int i915_restore_state(struct drm_device *dev) }/* Clock gating state */ -intel_enable_clock_gating (dev); + dev_priv->display.init_clock_gating (dev);if (IS_IRONLAKE_M (dev)) {ironlake_enable_drps (dev);
drivers/gpu/drm/i915/intel_display.c +193 -144
397 lines not on this page · raw message
Signature · 1 line
1.7.4.1