Future preparation patches
Subsystems (2)
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.
Sonika Jindal (7):
drm/i915: Allowing changing of wm latencies for other valid platforms drm/i915: Returning the right VGA control reg for other 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 | 6 +++--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.10.4
PATCH 1/7 drm/i915: Allowing changing of wm latencies for valid platforms
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 (INTEL_INFO (dev)->gen <=5 ||IS_VALLEYVIEW (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 (INTEL_INFO (dev)->gen <=5 ||IS_VALLEYVIEW (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 (INTEL_INFO (dev)->gen <=5 ||IS_VALLEYVIEW (dev))return -ENODEV ;return single_open (file, cur_wm_latency_show, dev);
Signature · 1 line
1.7.10.4
PATCH 2/7 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
@@ -2800,10 +2800,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 3/7 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
PATCH 4/7 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
PATCH 5/7 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 (INTEL_INFO (dev)->gen <=5 ||IS_VALLEYVIEW (dev)) error->pipe[i].stat =I915_READ (PIPESTAT (i)); }
Signature · 1 line
1.7.10.4
PATCH 6/7 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
PATCH 7/7 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 (INTEL_INFO (dev)->gen <=5 ||IS_VALLEYVIEW (dev))return false;list_for_each_entry (encoder, &dev->mode_config.encoder_list, base.head) {
Signature · 1 line
1.7.10.4
Quoted 5 lines · On Fri, Jul 18, 2014 at 11:04:03AM +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.
Hi Sonika,
HAS_PCH_SPLIT() is true for Ironlake (gen 5) as it's paired with the Ibex Peak PCH.
In various patches, the condition needs to be INTEL_INFO(dev)->gen < 5 then.
Signature · 1 line
Damien
Quoted 23 lines
Sonika Jindal (7):
drm/i915: Allowing changing of wm latencies for other valid platforms drm/i915: Returning the right VGA control reg for other 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 platformsdrivers/gpu/drm/i915/i915_debugfs.c | 6 +++--- drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/intel_display.c | 8 ++++---- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-)Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Damien Lespiau
Quoted 5 lines · On Fri, Jul 18, 2014 at 11:04:03AM +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.
Quoted 8 lines
Hi Sonika,
HAS_PCH_SPLIT()is true for Ironlake (gen 5) as it's paired with the Ibex Peak PCH.In various patches, the condition needs to be INTEL_INFO(dev)->gen < 5 then.
I am sorry, my understanding was that HAS_PCH_SPLIT is equivalent to (gen > 5 && !(IS_VALLEYVIEW) ) So, is it like, HAS_PCH_SPLIT is equivalent to (gen >=5 && !(IS_VALEYVIEW))
-Sonika
Quoted 15 lines · Sonika
Quoted 12 lines · Damien Lespiau
Quoted 5 lines · On Fri, Jul 18, 2014 at 11:04:03AM +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.Hi Sonika,
HAS_PCH_SPLIT()is true for Ironlake (gen 5) as it's paired with the Ibex Peak PCH.
Quoted 6 lines
Quoted 3 lines
In various patches, the condition needs to be INTEL_INFO(dev)->gen < 5 then.
I am sorry, my understanding was that
HAS_PCH_SPLITis equivalent to (gen > 5 && !(IS_VALLEYVIEW) )
So, is it like,HAS_PCH_SPLITis equivalent to (gen >=5 && !(IS_VALEYVIEW))
Yes, indeed!
Signature · 1 line
Damien
Quoted 16 lines · Damien Lespiau
Quoted 15 lines · Sonika
Quoted 12 lines · Damien Lespiau
Quoted 5 lines · On Fri, Jul 18, 2014 at 11:04:03AM +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.Hi Sonika,
HAS_PCH_SPLIT()is true for Ironlake (gen 5) as it's paired with the Ibex Peak PCH.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
In various patches, the condition needs to be INTEL_INFO(dev)->gen < 5 then.
I am sorry, my understanding was that
HAS_PCH_SPLITis equivalent to (gen > 5 && !(IS_VALLEYVIEW) )
So, is it like,HAS_PCH_SPLITis equivalent to (gen >=5 && !(IS_VALEYVIEW))Yes, indeed!
Since the patches need to be respun anyway, I vote for the introduction of HAS_GMCH_DISPLAY for the gen < 5 || IS_VLV condition. Since vlv (i.e. byt
+ chv) have essentially inherited the gmch display block from gen3/4. I think that would help the readability of the code quite a bit.
Comments?
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 26 lines · Daniel Vetter
Quoted 16 lines · Damien Lespiau
Quoted 15 lines · Sonika
Quoted 12 lines · Damien Lespiau
Quoted 5 lines · On Fri, Jul 18, 2014 at 11:04:03AM +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.Hi Sonika,
HAS_PCH_SPLIT()is true for Ironlake (gen 5) as it's paired with the Ibex Peak PCH.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
In various patches, the condition needs to be INTEL_INFO(dev)->gen < 5 then.
I am sorry, my understanding was that
HAS_PCH_SPLITis equivalent to (gen > 5 && !(IS_VALLEYVIEW) )
So, is it like,HAS_PCH_SPLITis equivalent to (gen >=5 && !(IS_VALEYVIEW))Yes, indeed!
Quoted 8 lines
Since the patches need to be respun anyway, I vote for the introduction of
HAS_GMCH_DISPLAYfor the gen < 5 ||IS_VLVcondition. Since vlv (i.e. byt
+ chv) have essentially inherited the gmch display block from gen3/4. I think that would help the readability of the code quite a bit.Comments?
-Daniel
Ok, I will add this and send the patches again.
-Sonika