* [PATCH 1/7] drm/i915: Allowing changing of wm latencies for valid platforms
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 2/7] drm/i915: Returning the right VGA control reg for platforms sonika.jindal
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index fc39610..ffb83e0 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -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);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/7] drm/i915: Returning the right VGA control reg for platforms
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
2014-07-18 5:34 ` [PATCH 1/7] drm/i915: Allowing changing of wm latencies for valid platforms sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 3/7] drm/i915: Setting legacy palette correctly for different platforms sonika.jindal
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/i915_drv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 991b663..90a682c 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 3/7] drm/i915: Setting legacy palette correctly for different platforms
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
2014-07-18 5:34 ` [PATCH 1/7] drm/i915: Allowing changing of wm latencies for valid platforms sonika.jindal
2014-07-18 5:34 ` [PATCH 2/7] drm/i915: Returning the right VGA control reg for platforms sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 4/7] drm/i915: Returning from increase/decrease of pllclock when invalid sonika.jindal
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c89b4ac..d1c7105 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 4/7] drm/i915: Returning from increase/decrease of pllclock when invalid
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
` (2 preceding siblings ...)
2014-07-18 5:34 ` [PATCH 3/7] drm/i915: Setting legacy palette correctly for different platforms sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 5/7] drm/i915: Writing proper check for reading of pipe status reg sonika.jindal
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d1c7105..e259c41 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 5/7] drm/i915: Writing proper check for reading of pipe status reg
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
` (3 preceding siblings ...)
2014-07-18 5:34 ` [PATCH 4/7] drm/i915: Returning from increase/decrease of pllclock when invalid sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 6/7] drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in sonika.jindal
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e259c41..3f7089c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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));
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 6/7] drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
` (4 preceding siblings ...)
2014-07-18 5:34 ` [PATCH 5/7] drm/i915: Writing proper check for reading of pipe status reg sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 5:34 ` [PATCH 7/7] drm/i915: Avoid incorrect returning for some platforms sonika.jindal
2014-07-18 10:56 ` [PATCH 0/7] Future preparation patches Damien Lespiau
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5f8f4ca..2e70132 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -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)) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 7/7] drm/i915: Avoid incorrect returning for some platforms
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
` (5 preceding siblings ...)
2014-07-18 5:34 ` [PATCH 6/7] drm/i915: Replace HAS_PCH_SPLIT which incorrectly lets some platforms in sonika.jindal
@ 2014-07-18 5:34 ` sonika.jindal
2014-07-18 10:56 ` [PATCH 0/7] Future preparation patches Damien Lespiau
7 siblings, 0 replies; 13+ messages in thread
From: sonika.jindal @ 2014-07-18 5:34 UTC (permalink / raw)
To: intel-gfx
From: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 2e70132..a15fc47 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -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) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 0/7] Future preparation patches
2014-07-18 5:34 [PATCH 0/7] Future preparation patches sonika.jindal
` (6 preceding siblings ...)
2014-07-18 5:34 ` [PATCH 7/7] drm/i915: Avoid incorrect returning for some platforms sonika.jindal
@ 2014-07-18 10:56 ` Damien Lespiau
2014-07-18 11:23 ` Jindal, Sonika
7 siblings, 1 reply; 13+ messages in thread
From: Damien Lespiau @ 2014-07-18 10:56 UTC (permalink / raw)
To: sonika.jindal; +Cc: intel-gfx
On Fri, Jul 18, 2014 at 11:04:03AM +0530, sonika.jindal@intel.com wrote:
> From: Sonika Jindal <sonika.jindal@intel.com>
>
> 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.
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.
--
Damien
> 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(-)
>
> --
> 1.7.10.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH 0/7] Future preparation patches
2014-07-18 10:56 ` [PATCH 0/7] Future preparation patches Damien Lespiau
@ 2014-07-18 11:23 ` Jindal, Sonika
2014-07-18 13:04 ` Damien Lespiau
0 siblings, 1 reply; 13+ messages in thread
From: Jindal, Sonika @ 2014-07-18 11:23 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On 7/18/2014 4:26 PM, Damien Lespiau wrote:
> On Fri, Jul 18, 2014 at 11:04:03AM +0530, sonika.jindal@intel.com wrote:
>> From: Sonika Jindal <sonika.jindal@intel.com>
>>
>> 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.
>
> 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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/7] Future preparation patches
2014-07-18 11:23 ` Jindal, Sonika
@ 2014-07-18 13:04 ` Damien Lespiau
2014-07-18 13:30 ` Daniel Vetter
0 siblings, 1 reply; 13+ messages in thread
From: Damien Lespiau @ 2014-07-18 13:04 UTC (permalink / raw)
To: Jindal, Sonika; +Cc: intel-gfx
On Fri, Jul 18, 2014 at 04:53:34PM +0530, Jindal, Sonika wrote:
>
>
> On 7/18/2014 4:26 PM, Damien Lespiau wrote:
> >On Fri, Jul 18, 2014 at 11:04:03AM +0530, sonika.jindal@intel.com wrote:
> >>From: Sonika Jindal <sonika.jindal@intel.com>
> >>
> >>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.
> >
> >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))
Yes, indeed!
--
Damien
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/7] Future preparation patches
2014-07-18 13:04 ` Damien Lespiau
@ 2014-07-18 13:30 ` Daniel Vetter
2014-07-21 5:46 ` Jindal, Sonika
0 siblings, 1 reply; 13+ messages in thread
From: Daniel Vetter @ 2014-07-18 13:30 UTC (permalink / raw)
To: Damien Lespiau; +Cc: intel-gfx
On Fri, Jul 18, 2014 at 02:04:56PM +0100, Damien Lespiau wrote:
> On Fri, Jul 18, 2014 at 04:53:34PM +0530, Jindal, Sonika wrote:
> >
> >
> > On 7/18/2014 4:26 PM, Damien Lespiau wrote:
> > >On Fri, Jul 18, 2014 at 11:04:03AM +0530, sonika.jindal@intel.com wrote:
> > >>From: Sonika Jindal <sonika.jindal@intel.com>
> > >>
> > >>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.
> > >
> > >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))
>
> 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
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/7] Future preparation patches
2014-07-18 13:30 ` Daniel Vetter
@ 2014-07-21 5:46 ` Jindal, Sonika
0 siblings, 0 replies; 13+ messages in thread
From: Jindal, Sonika @ 2014-07-21 5:46 UTC (permalink / raw)
To: Daniel Vetter, Damien Lespiau; +Cc: intel-gfx
On 7/18/2014 7:00 PM, Daniel Vetter wrote:
> On Fri, Jul 18, 2014 at 02:04:56PM +0100, Damien Lespiau wrote:
>> On Fri, Jul 18, 2014 at 04:53:34PM +0530, Jindal, Sonika wrote:
>>>
>>>
>>> On 7/18/2014 4:26 PM, Damien Lespiau wrote:
>>>> On Fri, Jul 18, 2014 at 11:04:03AM +0530, sonika.jindal@intel.com wrote:
>>>>> From: Sonika Jindal <sonika.jindal@intel.com>
>>>>>
>>>>> 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.
>>>>
>>>> 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))
>>
>> 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
>
Ok, I will add this and send the patches again.
-Sonika
^ permalink raw reply [flat|nested] 13+ messages in thread