Future preparation patches
Subsystems (2)
v2 cover Future preparation patches
From: Sonika Jindal <[email protected]>
This series prepares future platform enabling by changing HAS_PCH_SPLIT to more appropriate check since the code accessed may not have anything to do with having PCH or not.
v2: Adding new HAS_GMCH_DISPLAY macro suggested by Daniel. Also taking care of Ironlake(gen 5), by making gen < 5 check suggested by Damien. Effectively, !HAS_PCH_SPLIT is equivalent to HAS_GMCH_DISPLAY
and HAS_PCH_SPLIT is equivalent to gen >= 5 && !(VALLEYVIEW).
Sonika Jindal (8):
drm/i915: Adding HAS_GMCH_DISPLAY macro
drm/i915: Allowing changing of wm latencies for valid platforms drm/i915: Returning the right VGA control reg for platforms drm/i915: Setting legacy palette correctly for different platforms drm/i915: Returning from increase/decrease of pllclock when invalid drm/i915: Writing proper check for reading of pipe status reg drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms
in
drm/i915: Avoid incorrect returning for some platforms
drivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- drivers/gpu/drm/i915/i915_drv.h | 8 +++++--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.10.4
PATCH v2 1/8 drm/i915: Adding HAS_GMCH_DISPLAY macro
From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -2092,6 +2092,8 @@ struct drm_i915_cmd_table {#define HAS_PCH_NOP (dev) (INTEL_PCH_TYPE(dev) == PCH_NOP)#define HAS_PCH_SPLIT (dev) (INTEL_PCH_TYPE(dev) != PCH_NONE) +#define HAS_GMCH_DISPLAY (dev) (INTEL_INFO(dev)->gen < 5 || IS_VALLEYVIEW(dev)) +/* DPF == dynamic parity feature */ #define HAS_L3_DPF (dev) (IS_IVYBRIDGE(dev) || IS_HASWELL(dev))#define NUM_L3_SLICES (dev) (IS_HSW_GT3(dev) ? 2 : HAS_L3_DPF(dev))
Signature · 1 line
1.7.10.4
PATCH v2 2/8 drm/i915: Allowing changing of wm latencies for valid platforms
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +3 -3
@@ -3267,7 +3267,7 @@ static int pri_wm_latency_open(struct inode *inode, struct file *file) {struct drm_device *dev = inode->i_private; -if (!HAS_PCH_SPLIT (dev)) +if (HAS_GMCH_DISPLAY (dev))return -ENODEV ;return single_open (file, pri_wm_latency_show, dev);
@@ -3277,7 +3277,7 @@ static int spr_wm_latency_open(struct inode *inode, struct file *file) {struct drm_device *dev = inode->i_private; -if (!HAS_PCH_SPLIT (dev)) +if (HAS_GMCH_DISPLAY (dev))return -ENODEV ;return single_open (file, spr_wm_latency_show, dev);
@@ -3287,7 +3287,7 @@ static int cur_wm_latency_open(struct inode *inode, struct file *file) {struct drm_device *dev = inode->i_private; -if (!HAS_PCH_SPLIT (dev)) +if (HAS_GMCH_DISPLAY (dev))return -ENODEV ;return single_open (file, cur_wm_latency_show, dev);
Signature · 1 line
1.7.10.4
PATCH v2 3/8 drm/i915: Returning the right VGA control reg for platforms
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/i915_drv.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +3 -3
@@ -2802,10 +2802,10 @@ int vlv_freq_opcode(struct drm_i915_private *dev_priv, int val);static inline uint32_t i915_vgacntrl_reg (struct drm_device *dev) { -if (HAS_PCH_SPLIT (dev)) -return CPU_VGACNTRL ; -else if (IS_VALLEYVIEW (dev)) +if (IS_VALLEYVIEW (dev))return VLV_VGACNTRL ; +else if (INTEL_INFO (dev)->gen >=5 ) +return CPU_VGACNTRL ;else return VGACNTRL ; }
Signature · 1 line
1.7.10.4
PATCH v2 4/8 drm/i915: Setting legacy palette correctly for different platforms
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -3847,7 +3847,7 @@ static void intel_crtc_load_lut(struct drm_crtc *crtc) }/* use legacy palette for Ironlake */ -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev)) palreg =LGC_PALETTE (pipe);/* Workaround : Do not read or write the pipe palette/gamma data while
Signature · 1 line
1.7.10.4
Re: [PATCH 4/8] drm/i915: Setting legacy palette correctly for different platforms
Quoted 12 lines · On Mon, Jul 21, 2014 at 03:23:41PM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static void intel_crtc_load_lut(struct drm_crtc *crtc) · line 3850
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -3847,7 +3847,7 @@ static void intel_crtc_load_lut(struct drm_crtc *crtc) }/* use legacy palette for Ironlake */ -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev))
Imo we should check for !HAS_GMCH_DISPLAY here.
-Daniel
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +0
-0palreg =LGC_PALETTE (pipe);/* Workaround : Do not read or write the pipe palette/gamma data while Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH v2 1/1 drm/i915: Setting legacy palette correctly for different platforms
From: Sonika Jindal <[email protected]>
v2: Adding !HAS_GMCH_DISPLAY(dev)
--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -3847,7 +3847,7 @@ static void intel_crtc_load_lut(struct drm_crtc *crtc) }/* use legacy palette for Ironlake */ -if (HAS_PCH_SPLIT (dev)) +if (!HAS_GMCH_DISPLAY (dev)) palreg =LGC_PALETTE (pipe);/* Workaround : Do not read or write the pipe palette/gamma data while
Signature · 1 line
1.7.10.4
PATCH v2 5/8 drm/i915: Returning from increase/decrease of pllclock when invalid
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -8783,7 +8783,7 @@ static void intel_increase_pllclock(struct drm_device *dev,int dpll_reg =DPLL (pipe);int dpll; -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev))return ;if (!dev_priv->lvds_downclock_avail)
@@ -8811,7 +8811,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc); -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev))return ;if (!dev_priv->lvds_downclock_avail)
Signature · 1 line
1.7.10.4
Re: [PATCH 5/8] drm/i915: Returning from increase/decrease of pllclock when invalid
Quoted 12 lines · On Mon, Jul 21, 2014 at 03:23:42PM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static void intel_increase_pllclock(struct drm_device *dev, · line 8786
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -8783,7 +8783,7 @@ static void intel_increase_pllclock(struct drm_device *dev,int dpll_reg =DPLL (pipe);int dpll; -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev))
Same as with the previous patch.
-Daniel
Quoted 19 lines
drivers/gpu/drm/i915/intel_display.c +1
-1return ;if (!dev_priv->lvds_downclock_avail)@@ -8811,7 +8811,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc); -if (HAS_PCH_SPLIT (dev)) +if (INTEL_INFO (dev)->gen >=5 && !IS_VALLEYVIEW (dev))return ;if (!dev_priv->lvds_downclock_avail)Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH v2 1/1 drm/i915: Returning from increase/decrease of pllclock when invalid
From: Sonika Jindal <[email protected]>
v2: Adding !HAS_GMCH_DISPLAY(dev)
--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -8783,7 +8783,7 @@ static void intel_increase_pllclock(struct drm_device *dev,int dpll_reg =DPLL (pipe);int dpll; -if (HAS_PCH_SPLIT (dev)) +if (!HAS_GMCH_DISPLAY (dev))return ;if (!dev_priv->lvds_downclock_avail)
@@ -8811,7 +8811,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)struct drm_i915_private *dev_priv = dev->dev_private;struct intel_crtc *intel_crtc =to_intel_crtc (crtc); -if (HAS_PCH_SPLIT (dev)) +if (!HAS_GMCH_DISPLAY (dev))return ;if (!dev_priv->lvds_downclock_avail)
Signature · 1 line
1.7.10.4
PATCH v2 6/8 drm/i915: Writing proper check for reading of pipe status reg
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -13244,7 +13244,7 @@ intel_display_capture_error_state(struct drm_device *dev) error->pipe[i].source =I915_READ (PIPESRC (i)); -if (!HAS_PCH_SPLIT (dev)) +if (HAS_GMCH_DISPLAY (dev)) error->pipe[i].stat =I915_READ (PIPESTAT (i)); }
Signature · 1 line
1.7.10.4
PATCH v2 7/8 drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdmi.c +1 -1
@@ -1562,7 +1562,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,if (IS_VALLEYVIEW (dev)) { intel_hdmi->write_infoframe = vlv_write_infoframe; intel_hdmi->set_infoframes = vlv_set_infoframes; - }else if (!HAS_PCH_SPLIT (dev)) { + }else if (INTEL_INFO (dev)->gen <5 ) { intel_hdmi->write_infoframe = g4x_write_infoframe; intel_hdmi->set_infoframes = g4x_set_infoframes; }else if (HAS_DDI (dev)) {
Signature · 1 line
1.7.10.4
Re: [PATCH 7/8] drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in
Quoted 12 lines · On Mon, Jul 21, 2014 at 03:23:44PM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hdmi.c +0
-0
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1565
Quoted 5 lines
drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1562,7 +1562,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,if (IS_VALLEYVIEW (dev)) { intel_hdmi->write_infoframe = vlv_write_infoframe; intel_hdmi->set_infoframes = vlv_set_infoframes; - }else if (!HAS_PCH_SPLIT (dev)) { + }else if (INTEL_INFO (dev)->gen <5 ) {
Maybe make this explicit and check for IS_G4X(dev) instead? It's the only platform where this case applies, and also nicely highlights how the g4x_ prefix of the functions matches.
-Daniel
Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +0
-0intel_hdmi->write_infoframe = g4x_write_infoframe; intel_hdmi->set_infoframes = g4x_set_infoframes; }else if (HAS_DDI (dev)) {Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH v2 1/1 drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in
From: Sonika Jindal <[email protected]>
v2: Adding IS_G4X instead of gen < 5 as suggested by Daniel
--- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdmi.c +1 -1
@@ -1562,7 +1562,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,if (IS_VALLEYVIEW (dev)) { intel_hdmi->write_infoframe = vlv_write_infoframe; intel_hdmi->set_infoframes = vlv_set_infoframes; - }else if (!HAS_PCH_SPLIT (dev)) { + }else if (IS_G4X (dev)) { intel_hdmi->write_infoframe = g4x_write_infoframe; intel_hdmi->set_infoframes = g4x_set_infoframes; }else if (HAS_DDI (dev)) {
Signature · 1 line
1.7.10.4
Re: [PATCH v2] drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in
Quoted 5 lines · On Tue, Jul 22, 2014 at 11:13:46AM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
v2: Adding
IS_G4Xinstead of gen < 5 as suggested by DanielSigned-off-by Sonika Jindal <[email protected]>
Merged the remaining patches, thanks.
-Daniel
Quoted 24 lines
--- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1562,7 +1562,7 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port,if (IS_VALLEYVIEW (dev)) { intel_hdmi->write_infoframe = vlv_write_infoframe; intel_hdmi->set_infoframes = vlv_set_infoframes; - }else if (!HAS_PCH_SPLIT (dev)) { + }else if (IS_G4X (dev)) { intel_hdmi->write_infoframe = g4x_write_infoframe; intel_hdmi->set_infoframes = g4x_set_infoframes; }else if (HAS_DDI (dev)) {Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH v2 8/8 drm/i915: Avoid incorrect returning for some platforms
In reply to [email protected]From: Sonika Jindal <[email protected]>
--- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_hdmi.c +1 -1
@@ -882,7 +882,7 @@ static bool hdmi_12bpc_possible(struct intel_crtc *crtc)struct intel_encoder *encoder;int count =0 , count_hdmi =0 ; -if (!HAS_PCH_SPLIT (dev)) +if (HAS_GMCH_DISPLAY (dev))return false;list_for_each_entry (encoder, &dev->mode_config.encoder_list, base.head) {
Signature · 1 line
1.7.10.4
Quoted 11 lines · On Mon, Jul 21, 2014 at 03:23:37PM +0530, [email protected] wrote:
From: Sonika Jindal <[email protected]>
This series prepares future platform enabling by changing
HAS_PCH_SPLITto more appropriate check since the code accessed may not have anything to do with having PCH or not.v2: Adding new
HAS_GMCH_DISPLAYmacro suggested by Daniel. Also taking care of Ironlake(gen 5), by making gen < 5 check suggested by Damien. Effectively, !HAS_PCH_SPLIT is equivalent toHAS_GMCH_DISPLAY
andHAS_PCH_SPLITis equivalent to gen >= 5 && !(VALLEYVIEW).
Quoted 10 lines
Sonika Jindal (8):
drm/i915: AddingHAS_GMCH_DISPLAYmacro
drm/i915: Allowing changing of wm latencies for valid platforms drm/i915: Returning the right VGA control reg for platforms drm/i915: Setting legacy palette correctly for different platforms drm/i915: Returning from increase/decrease of pllclock when invalid drm/i915: Writing proper check for reading of pipe status reg drm/i915: ReplaceHAS_PCH_SPLITwhich incorrectly lets some platforms
in
drm/i915: Avoid incorrect returning for some platforms
I commented on a few patches, all others merged to dinq.
Thanks, Daniel
Quoted 14 lines
drivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- drivers/gpu/drm/i915/i915_drv.h | 8 +++++--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-)Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch