Message ID | 20241105071600.235338-4-vinod.govindapillai@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | use hw support for min/interim ddb allocation for async flip | expand |
On Tue, 05 Nov 2024, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote: > Avoid using struct drm_i915_private reference and use intel_display > instead. This is in preparation for the rest of the patches in this > series where hw support for the minimum and interim ddb allocations > for async flip is added This is technically correct, but it's self-contained in a single function. I've preferred two approaches over this: - Convert entire files (sometimes internally first, with the external interface changes in a separate patch, depending on how big the patch becomes). - Convert single functions which are widely used and have struct intel_display as parameter, to limit the size of the patch (as opposed to doing the conversion as part of an entire file change). I think Ville said he's had a go at converting skl_watermark.c. Ville, do you have a patch for that? BR, Jani. > > Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> > --- > drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c > index 2afc95e7533c..2018abc35c8a 100644 > --- a/drivers/gpu/drm/i915/display/skl_watermark.c > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c > @@ -1372,9 +1372,9 @@ static bool > use_minimal_wm0_only(const struct intel_crtc_state *crtc_state, > struct intel_plane *plane) > { > - struct drm_i915_private *i915 = to_i915(plane->base.dev); > + struct intel_display *display = to_intel_display(plane); > > - return DISPLAY_VER(i915) >= 13 && > + return DISPLAY_VER(display) >= 13 && > crtc_state->uapi.async_flip && > plane->async_flip; > }
On Tue, Nov 05, 2024 at 11:08:40AM +0200, Jani Nikula wrote: > On Tue, 05 Nov 2024, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote: > > Avoid using struct drm_i915_private reference and use intel_display > > instead. This is in preparation for the rest of the patches in this > > series where hw support for the minimum and interim ddb allocations > > for async flip is added > > This is technically correct, but it's self-contained in a single > function. I've preferred two approaches over this: > > - Convert entire files (sometimes internally first, with the external > interface changes in a separate patch, depending on how big the patch > becomes). > > - Convert single functions which are widely used and have struct > intel_display as parameter, to limit the size of the patch (as opposed > to doing the conversion as part of an entire file change). > > I think Ville said he's had a go at converting skl_watermark.c. Ville, > do you have a patch for that? Nothing usable atm. The unconverted dependecies at the time were rather extensive so it became a bit of a mess. I might have decent conversions for some of the dependencies though. I'll have a look around and post them if I see anything sane.
On Wed, 2024-11-06 at 16:06 +0200, Ville Syrjälä wrote: > On Tue, Nov 05, 2024 at 11:08:40AM +0200, Jani Nikula wrote: > > On Tue, 05 Nov 2024, Vinod Govindapillai <vinod.govindapillai@intel.com> wrote: > > > Avoid using struct drm_i915_private reference and use intel_display > > > instead. This is in preparation for the rest of the patches in this > > > series where hw support for the minimum and interim ddb allocations > > > for async flip is added > > > > This is technically correct, but it's self-contained in a single > > function. I've preferred two approaches over this: > > > > - Convert entire files (sometimes internally first, with the external > > interface changes in a separate patch, depending on how big the patch > > becomes). > > > > - Convert single functions which are widely used and have struct > > intel_display as parameter, to limit the size of the patch (as opposed > > to doing the conversion as part of an entire file change). > > > > I think Ville said he's had a go at converting skl_watermark.c. Ville, > > do you have a patch for that? > > Nothing usable atm. The unconverted dependecies at the time > were rather extensive so it became a bit of a mess. I might > have decent conversions for some of the dependencies though. > I'll have a look around and post them if I see anything sane. > I had done few more on top of my series - Jani has this https://patchwork.freedesktop.org/series/140886/ which has many SAGV related updates which will help cleaning up of skl_watermarks.c better. So I can update my changes on top of that, But Ville, could you please review these patches which mainly has the logic for this minimal/interim DDB config for async flip. i will update the intel_display related changes on top of Jani's series. https://patchwork.freedesktop.org/patch/622987/?series=140927&rev=1 https://patchwork.freedesktop.org/patch/622988/?series=140927&rev=1 https://patchwork.freedesktop.org/patch/622990/?series=140927&rev=1 BR Vinod
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c index 2afc95e7533c..2018abc35c8a 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -1372,9 +1372,9 @@ static bool use_minimal_wm0_only(const struct intel_crtc_state *crtc_state, struct intel_plane *plane) { - struct drm_i915_private *i915 = to_i915(plane->base.dev); + struct intel_display *display = to_intel_display(plane); - return DISPLAY_VER(i915) >= 13 && + return DISPLAY_VER(display) >= 13 && crtc_state->uapi.async_flip && plane->async_flip; }
Avoid using struct drm_i915_private reference and use intel_display instead. This is in preparation for the rest of the patches in this series where hw support for the minimum and interim ddb allocations for async flip is added Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> --- drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)