From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH 2/4] drm/i915: abstract plane protection check
Date: Thu, 9 Nov 2023 14:08:34 -0500 [thread overview]
Message-ID: <ZU0uMlkDYWI60x52@intel.com> (raw)
In-Reply-To: <f64007a104d52c769e19da0fcdcb5a2b6e1f9d78.1699546565.git.jani.nikula@intel.com>
On Thu, Nov 09, 2023 at 06:17:56PM +0200, Jani Nikula wrote:
> Centralize the conditions in a function.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Link: https://patchwork.freedesktop.org/patch/msgid/20231109160722.3372379-1-jani.nikula@intel.com
> ---
> .../gpu/drm/i915/display/skl_universal_plane.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index a4d0e2ede2f7..c1d426dbcc62 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -1870,6 +1870,19 @@ static bool pxp_is_borked(struct drm_i915_gem_object *obj)
> return i915_gem_object_is_protected(obj) && !bo_has_valid_encryption(obj);
> }
>
> +static void check_protection(struct intel_plane_state *plane_state)
only not sure about this function name. maybe something with content_protection on it?!
but on the lack of a better suggestion:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
(for the series)
> +{
> + struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
> + struct drm_i915_private *i915 = to_i915(plane->base.dev);
> + const struct drm_framebuffer *fb = plane_state->hw.fb;
> +
> + if (DISPLAY_VER(i915) < 11)
> + return;
> +
> + plane_state->decrypt = bo_has_valid_encryption(intel_fb_obj(fb));
> + plane_state->force_black = pxp_is_borked(intel_fb_obj(fb));
> +}
> +
> static int skl_plane_check(struct intel_crtc_state *crtc_state,
> struct intel_plane_state *plane_state)
> {
> @@ -1914,10 +1927,7 @@ static int skl_plane_check(struct intel_crtc_state *crtc_state,
> if (ret)
> return ret;
>
> - if (DISPLAY_VER(dev_priv) >= 11) {
> - plane_state->decrypt = bo_has_valid_encryption(intel_fb_obj(fb));
> - plane_state->force_black = pxp_is_borked(intel_fb_obj(fb));
> - }
> + check_protection(plane_state);
>
> /* HW only has 8 bits pixel precision, disable plane if invisible */
> if (!(plane_state->hw.alpha >> 8))
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-11-09 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 16:17 [Intel-xe] [PATCH 0/4] xe&i915 display pxp cleanup Jani Nikula
2023-11-09 16:17 ` [Intel-xe] [PATCH 1/4] Revert "FIXME: drm/i915/pxp: some hack to bypass pxp" Jani Nikula
2023-11-09 16:17 ` [Intel-xe] [PATCH 2/4] drm/i915: abstract plane protection check Jani Nikula
2023-11-09 19:08 ` Rodrigo Vivi [this message]
2023-11-09 16:17 ` [Intel-xe] [PATCH 3/4] drm/i915: remove excess functions from " Jani Nikula
2023-11-09 16:17 ` [Intel-xe] [PATCH 4/4] fixup! drm/xe/display: Implement display support Jani Nikula
2023-11-09 16:21 ` [Intel-xe] ✗ CI.Patch_applied: failure for xe&i915 display pxp cleanup Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZU0uMlkDYWI60x52@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox