All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
@ 2017-11-07 18:27 Chris Wilson
  2017-11-07 18:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2017-11-07 18:27 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

clang spots

drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (INTEL_GEN(dev_priv) >= 10)

but fortunately for us we skip the function unless on a gen10+ device.
However, to keep the function generic in case we do want to re-enable it
for gen9 again, initialise trans_min to 0.

References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition WM")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b75c4cf074ff..40da5001be28 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4652,6 +4652,7 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
 	if (!dev_priv->ipc_enabled)
 		goto exit;
 
+	trans_min = 0;
 	if (INTEL_GEN(dev_priv) >= 10)
 		trans_min = 4;
 
-- 
2.15.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✗ Fi.CI.BAT: warning for drm/i915/: Initialise trans_min for skl_compute_transition_wm()
  2017-11-07 18:27 [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm() Chris Wilson
@ 2017-11-07 18:45 ` Patchwork
  2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-11-07 18:45 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/: Initialise trans_min for skl_compute_transition_wm()
URL   : https://patchwork.freedesktop.org/series/33364/
State : warning

== Summary ==

Series 33364v1 drm/i915/: Initialise trans_min for skl_compute_transition_wm()
https://patchwork.freedesktop.org/api/1.0/series/33364/revisions/1/mbox/

Test chamelium:
        Subgroup dp-crc-fast:
                pass       -> FAIL       (fi-kbl-7500u) fdo#102514
Test gem_ctx_param:
        Subgroup basic-default:
                pass       -> DMESG-WARN (fi-bsw-n3050)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b:
                skip       -> PASS       (fi-hsw-4770r)

fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:446s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:456s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:384s
fi-bsw-n3050     total:289  pass:242  dwarn:1   dfail:0   fail:0   skip:46  time:542s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:277s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:506s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:509s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:505s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:484s
fi-cfl-s         total:289  pass:254  dwarn:3   dfail:0   fail:0   skip:32  time:558s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:612s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:433s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:263s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:585s
fi-glk-dsi       total:289  pass:258  dwarn:0   dfail:0   fail:1   skip:30  time:494s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:431s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:431s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:427s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:486s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:459s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:483s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:576s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:479s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:582s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:578s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:593s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:651s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:521s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:513s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:465s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:565s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:426s

eb031b266f224a2b9ded3b0b5c425991fea8f8c5 drm-tip: 2017y-11m-07d-14h-27m-25s UTC integration manifest
36478d122847 drm/i915/: Initialise trans_min for skl_compute_transition_wm()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6997/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
  2017-11-07 18:27 [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm() Chris Wilson
  2017-11-07 18:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2017-11-08  5:09 ` Mahesh Kumar
  2017-11-08 20:00   ` Ville Syrjälä
  1 sibling, 1 reply; 6+ messages in thread
From: Mahesh Kumar @ 2017-11-08  5:09 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: Rodrigo Vivi

Hi,


On Tuesday 07 November 2017 11:57 PM, Chris Wilson wrote:
> clang spots
>
> drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>          if (INTEL_GEN(dev_priv) >= 10)
>
> but fortunately for us we skip the function unless on a gen10+ device.
> However, to keep the function generic in case we do want to re-enable it
> for gen9 again, initialise trans_min to 0.
>
> References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition WM")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_pm.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b75c4cf074ff..40da5001be28 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4652,6 +4652,7 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
>   	if (!dev_priv->ipc_enabled)
>   		goto exit;
>   
> +	trans_min = 0;
>   	if (INTEL_GEN(dev_priv) >= 10)
>   		trans_min = 4;
BSpec WA section tells not to enable transition watermark for any GEN-9 
platforms (that was the assumption with this patch)
But anyway trans_min value for GEN9 is 14 blocks, IMO adding else case 
with trans_min = 14; will be logical solution to this.

-Mahesh
>   

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
  2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
@ 2017-11-08 20:00   ` Ville Syrjälä
  2017-11-09  3:49     ` Mahesh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2017-11-08 20:00 UTC (permalink / raw)
  To: Mahesh Kumar; +Cc: intel-gfx, Rodrigo Vivi

On Wed, Nov 08, 2017 at 10:39:59AM +0530, Mahesh Kumar wrote:
> Hi,
> 
> 
> On Tuesday 07 November 2017 11:57 PM, Chris Wilson wrote:
> > clang spots
> >
> > drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
> >          if (INTEL_GEN(dev_priv) >= 10)
> >
> > but fortunately for us we skip the function unless on a gen10+ device.
> > However, to keep the function generic in case we do want to re-enable it
> > for gen9 again, initialise trans_min to 0.
> >
> > References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition WM")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >   drivers/gpu/drm/i915/intel_pm.c | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index b75c4cf074ff..40da5001be28 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -4652,6 +4652,7 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
> >   	if (!dev_priv->ipc_enabled)
> >   		goto exit;
> >   
> > +	trans_min = 0;
> >   	if (INTEL_GEN(dev_priv) >= 10)
> >   		trans_min = 4;
> BSpec WA section tells not to enable transition watermark for any GEN-9 
> platforms (that was the assumption with this patch)
> But anyway trans_min value for GEN9 is 14 blocks, IMO adding else case 
> with trans_min = 14; will be logical solution to this.

Bspec is telling me that 14 is the correct value for gen10 as well.
Looks like the 4 came back from the future.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
  2017-11-08 20:00   ` Ville Syrjälä
@ 2017-11-09  3:49     ` Mahesh Kumar
  2017-11-09 14:16       ` Mahesh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Mahesh Kumar @ 2017-11-09  3:49 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, Rodrigo Vivi

Hi,


On Thursday 09 November 2017 01:30 AM, Ville Syrjälä wrote:
> On Wed, Nov 08, 2017 at 10:39:59AM +0530, Mahesh Kumar wrote:
>> Hi,
>>
>>
>> On Tuesday 07 November 2017 11:57 PM, Chris Wilson wrote:
>>> clang spots
>>>
>>> drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 'trans_min' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
>>>           if (INTEL_GEN(dev_priv) >= 10)
>>>
>>> but fortunately for us we skip the function unless on a gen10+ device.
>>> However, to keep the function generic in case we do want to re-enable it
>>> for gen9 again, initialise trans_min to 0.
>>>
>>> References: ca47667f523e ("drm/i915/gen10: Calculate and enable transition WM")
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/intel_pm.c | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>>> index b75c4cf074ff..40da5001be28 100644
>>> --- a/drivers/gpu/drm/i915/intel_pm.c
>>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>>> @@ -4652,6 +4652,7 @@ static void skl_compute_transition_wm(struct intel_crtc_state *cstate,
>>>    	if (!dev_priv->ipc_enabled)
>>>    		goto exit;
>>>    
>>> +	trans_min = 0;
>>>    	if (INTEL_GEN(dev_priv) >= 10)
>>>    		trans_min = 4;
>> BSpec WA section tells not to enable transition watermark for any GEN-9
>> platforms (that was the assumption with this patch)
>> But anyway trans_min value for GEN9 is 14 blocks, IMO adding else case
>> with trans_min = 14; will be logical solution to this.
> Bspec is telling me that 14 is the correct value for gen10 as well.
> Looks like the 4 came back from the future.
Thanks Ville for correcting this, I checked the BSpec again, yes for 
gen-10 as well value is 14, looks like I read 4 instead of 14 earlier.
So we can always init trans_min = 14.

-Mahesh
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm()
  2017-11-09  3:49     ` Mahesh Kumar
@ 2017-11-09 14:16       ` Mahesh Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Mahesh Kumar @ 2017-11-09 14:16 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, Rodrigo Vivi


On Thursday 09 November 2017 09:19 AM, Mahesh Kumar wrote:
> Hi,
>
>
> On Thursday 09 November 2017 01:30 AM, Ville Syrjälä wrote:
>> On Wed, Nov 08, 2017 at 10:39:59AM +0530, Mahesh Kumar wrote:
>>> Hi,
>>>
>>>
>>> On Tuesday 07 November 2017 11:57 PM, Chris Wilson wrote:
>>>> clang spots
>>>>
>>>> drivers/gpu/drm/i915/intel_pm.c:4655:6: warning: variable 
>>>> 'trans_min' is used uninitialized whenever 'if' condition is false 
>>>> [-Wsometimes-uninitialized]
>>>>           if (INTEL_GEN(dev_priv) >= 10)
>>>>
>>>> but fortunately for us we skip the function unless on a gen10+ device.
>>>> However, to keep the function generic in case we do want to 
>>>> re-enable it
>>>> for gen9 again, initialise trans_min to 0.
>>>>
>>>> References: ca47667f523e ("drm/i915/gen10: Calculate and enable 
>>>> transition WM")
>>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>>> Cc: Mahesh Kumar <mahesh1.kumar@intel.com>
>>>> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>> ---
>>>>    drivers/gpu/drm/i915/intel_pm.c | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/intel_pm.c 
>>>> b/drivers/gpu/drm/i915/intel_pm.c
>>>> index b75c4cf074ff..40da5001be28 100644
>>>> --- a/drivers/gpu/drm/i915/intel_pm.c
>>>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>>>> @@ -4652,6 +4652,7 @@ static void skl_compute_transition_wm(struct 
>>>> intel_crtc_state *cstate,
>>>>        if (!dev_priv->ipc_enabled)
>>>>            goto exit;
>>>>    +    trans_min = 0;
>>>>        if (INTEL_GEN(dev_priv) >= 10)
>>>>            trans_min = 4;
>>> BSpec WA section tells not to enable transition watermark for any GEN-9
>>> platforms (that was the assumption with this patch)
>>> But anyway trans_min value for GEN9 is 14 blocks, IMO adding else case
>>> with trans_min = 14; will be logical solution to this.
>> Bspec is telling me that 14 is the correct value for gen10 as well.
>> Looks like the 4 came back from the future.
> Thanks Ville for correcting this, I checked the BSpec again, yes for 
> gen-10 as well value is 14, looks like I read 4 instead of 14 earlier.
> So we can always init trans_min = 14.
Further debugging reveals this is a nasty BSpec update, until GEN9/10 WM 
programming was is same page this value was 4 for GEN-10 but after 
moving it to new page the value is updated to 14.
anyway I sent a query to HW team regarding same.
>
> -Mahesh
>>
>

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-09 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 18:27 [PATCH] drm/i915/: Initialise trans_min for skl_compute_transition_wm() Chris Wilson
2017-11-07 18:45 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-08  5:09 ` [PATCH] " Mahesh Kumar
2017-11-08 20:00   ` Ville Syrjälä
2017-11-09  3:49     ` Mahesh Kumar
2017-11-09 14:16       ` Mahesh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.