Message ID | 20240829122928.423456-1-juhapekka.heikkila@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/display: Fix BMG CCS modifiers | expand |
On Thu, Aug 29, 2024 at 03:29:28PM +0300, Juha-Pekka Heikkila wrote: > Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier > doh! I just did the pull-request with that... I guess this is one extra pull request next week or the first patch of -next-fixes :/ Fixes: 97c6efb36497 ("drm/i915/display: Plane capability for 64k phys alignment") > Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> > --- > drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c > index 9452cad41d07..d28b98e7cbd7 100644 > --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c > +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c > @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, > if (gen12_plane_has_mc_ccs(i915, plane_id)) > caps |= INTEL_PLANE_CAP_CCS_MC; > > + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) we should be using display version here, no?! > + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; > + > return caps; > } > > -- > 2.45.2 >
Hey, D'oh, serves me right for changing patch around at last moment. :) Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cheers, ~Maarten Den 2024-08-29 kl. 16:29, skrev Rodrigo Vivi: > On Thu, Aug 29, 2024 at 03:29:28PM +0300, Juha-Pekka Heikkila wrote: >> Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier >> > > doh! I just did the pull-request with that... I guess this is one extra > pull request next week or the first patch of -next-fixes :/ > > Fixes: 97c6efb36497 ("drm/i915/display: Plane capability for 64k phys alignment") > >> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> >> --- >> drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c >> index 9452cad41d07..d28b98e7cbd7 100644 >> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c >> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c >> @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, >> if (gen12_plane_has_mc_ccs(i915, plane_id)) >> caps |= INTEL_PLANE_CAP_CCS_MC; >> >> + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) > > we should be using display version here, no?! > >> + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; >> + >> return caps; >> } >> >> -- >> 2.45.2 >>
Den 2024-08-29 kl. 16:29, skrev Rodrigo Vivi: > On Thu, Aug 29, 2024 at 03:29:28PM +0300, Juha-Pekka Heikkila wrote: >> Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier >> > > doh! I just did the pull-request with that... I guess this is one extra > pull request next week or the first patch of -next-fixes :/ > > Fixes: 97c6efb36497 ("drm/i915/display: Plane capability for 64k phys alignment") > >> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> >> --- >> drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c >> index 9452cad41d07..d28b98e7cbd7 100644 >> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c >> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c >> @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, >> if (gen12_plane_has_mc_ccs(i915, plane_id)) >> caps |= INTEL_PLANE_CAP_CCS_MC; >> >> + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) > > we should be using display version here, no?! > >> + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; Just set it unconditionally if you want to change it IMO, it's a workaround not an actual capability, rest should filter...
On Thu, Aug 29, 2024 at 04:36:52PM +0200, Maarten Lankhorst wrote: > > > Den 2024-08-29 kl. 16:29, skrev Rodrigo Vivi: > > On Thu, Aug 29, 2024 at 03:29:28PM +0300, Juha-Pekka Heikkila wrote: > >> Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier > >> > > > > doh! I just did the pull-request with that... I guess this is one extra > > pull request next week or the first patch of -next-fixes :/ > > > > Fixes: 97c6efb36497 ("drm/i915/display: Plane capability for 64k phys alignment") > > > >> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> > >> --- > >> drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c > >> index 9452cad41d07..d28b98e7cbd7 100644 > >> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c > >> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c > >> @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, > >> if (gen12_plane_has_mc_ccs(i915, plane_id)) > >> caps |= INTEL_PLANE_CAP_CCS_MC; > >> > >> + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) > > > > we should be using display version here, no?! > > > >> + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; > > Just set it unconditionally if you want to change it IMO, it's a > workaround not an actual capability, rest should filter... I think it should be set only on platforms that actually require 64K pages. So IIUC simply IS_BATTLEMAGE() or if it's known that future DGFX has this restriction too IS_BATTLEMAGE() || (DISPLAY_VER() >= 20 && IS_DGFX()) ? Then the BMG and LNL checks in plane_has_modifier() wouldn't be needed either. --Imre
On 29.8.2024 18.13, Imre Deak wrote: > On Thu, Aug 29, 2024 at 04:36:52PM +0200, Maarten Lankhorst wrote: >> >> >> Den 2024-08-29 kl. 16:29, skrev Rodrigo Vivi: >>> On Thu, Aug 29, 2024 at 03:29:28PM +0300, Juha-Pekka Heikkila wrote: >>>> Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier >>>> >>> >>> doh! I just did the pull-request with that... I guess this is one extra >>> pull request next week or the first patch of -next-fixes :/ >>> >>> Fixes: 97c6efb36497 ("drm/i915/display: Plane capability for 64k phys alignment") >>> >>>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> >>>> --- >>>> drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ >>>> 1 file changed, 3 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c >>>> index 9452cad41d07..d28b98e7cbd7 100644 >>>> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c >>>> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c >>>> @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, >>>> if (gen12_plane_has_mc_ccs(i915, plane_id)) >>>> caps |= INTEL_PLANE_CAP_CCS_MC; >>>> >>>> + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) >>> >>> we should be using display version here, no?! >>> >>>> + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; >> >> Just set it unconditionally if you want to change it IMO, it's a >> workaround not an actual capability, rest should filter... > > I think it should be set only on platforms that actually require 64K > pages. So IIUC simply > IS_BATTLEMAGE() > or if it's known that future DGFX has this restriction too > IS_BATTLEMAGE() || (DISPLAY_VER() >= 20 && IS_DGFX()) > ? Then the BMG and LNL checks in plane_has_modifier() wouldn't be > needed either. This sound good idea for this case. It's bit of a trick to check with display versions we're on Xe2 which to me is synonym to gfx ver >= 20 but I'll make v2 with this change. It is expected future dgfx will have same 64K requirement. /Juha-Pekka
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index 9452cad41d07..d28b98e7cbd7 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -2453,6 +2453,9 @@ static u8 skl_get_plane_caps(struct drm_i915_private *i915, if (gen12_plane_has_mc_ccs(i915, plane_id)) caps |= INTEL_PLANE_CAP_CCS_MC; + if (GRAPHICS_VER(i915) >= 20 && IS_DGFX(i915)) + caps |= INTEL_PLANE_CAP_NEED64K_PHYS; + return caps; }
Let I915_FORMAT_MOD_4_TILED_BMG_CCS show up as supported modifier Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> --- drivers/gpu/drm/i915/display/skl_universal_plane.c | 3 +++ 1 file changed, 3 insertions(+)