From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>, intel-xe@lists.freedesktop.org
Cc: Nemesa Garg <nemesa.garg@intel.com>
Subject: Re: [PATCH] drm/i915/display: Workaround for odd panning for planar yuv
Date: Wed, 25 Sep 2024 16:09:28 +0300 [thread overview]
Message-ID: <874j633mnr.fsf@intel.com> (raw)
In-Reply-To: <20240925122513.2455181-1-nemesa.garg@intel.com>
On Wed, 25 Sep 2024, Nemesa Garg <nemesa.garg@intel.com> wrote:
> Disable the support for odd x pan for NV12 format as underrun
> issue is seen.
>
> WA: 16024459452
>
> v2: Replace HSD with WA in commit message [Suraj]
> Modified the condition for handling odd panning
>
> v3: Simplified the condition for checking hsub
> Using older framework for wa as rev1[Jani]
>
> v4: Modify the condition for hsub [Sai Teja]
> Initialize hsub in else path [Dan]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_atomic_plane.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index e979786aa5cf..dfe795b8e917 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -1029,8 +1029,16 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
> * This allows NV12 and P0xx formats to have odd size and/or odd
> * source coordinates on DISPLAY_VER(i915) >= 20
> */
Okay, sorry, nitpicks galore. :/
> - hsub = 1;
> vsub = 1;
If we are going to return with an error, why break the hsub/vsub
assignments apart? Maybe add the check as the first thing, and keep
these together?
> + /*
> + * Wa_16023981245 for display version 20.
> + * Do not support odd x-panning for even xsize for NV12.
> + */
> + if (IS_LUNARLAKE(i915) && fb->format->format == DRM_FORMAT_NV12
The comment and the code are contradictory. We're already in a display
version >= 20 block. Why do we have the separate IS_LUNARLAKE() check?
Should it be a version check for == 20, or nothing at all? Is the code
or the comment wrong?
> + && src_w % 2 == 0)
I kernel code the && usually belongs at the end of the previous line.
BR,
Jani.
> + return -EINVAL;
> +
> + hsub = 1;
> } else {
> hsub = fb->format->hsub;
> vsub = fb->format->vsub;
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-09-25 13:09 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 12:25 [PATCH] drm/i915/display: Workaround for odd panning for planar yuv Nemesa Garg
2024-09-25 13:09 ` Jani Nikula [this message]
2024-09-25 13:57 ` Pottumuttu, Sai Teja
2024-09-26 13:34 ` ✓ CI.Patch_applied: success for drm/i915/display: Workaround for odd panning for planar yuv (rev4) Patchwork
2024-09-26 13:34 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-26 13:36 ` ✓ CI.KUnit: success " Patchwork
2024-09-26 13:53 ` ✓ CI.Build: " Patchwork
2024-09-26 13:55 ` ✓ CI.Hooks: " Patchwork
2024-09-26 13:56 ` ✗ CI.checksparse: warning " Patchwork
2024-09-26 14:38 ` ✗ CI.BAT: failure " Patchwork
2024-09-27 9:59 ` ✗ CI.FULL: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-09-30 11:23 [PATCH] drm/i915/display: Workaround for odd panning for planar yuv Nemesa Garg
2024-10-15 9:02 ` Kandpal, Suraj
2024-10-15 13:21 ` Garg, Nemesa
2024-10-15 14:53 ` Kandpal, Suraj
2024-10-15 16:23 ` Garg, Nemesa
2024-10-16 4:25 ` Kandpal, Suraj
2024-10-16 6:26 ` Garg, Nemesa
2024-10-15 9:25 ` Kandpal, Suraj
2024-10-15 13:23 ` Garg, Nemesa
2024-10-15 14:47 ` Kandpal, Suraj
2024-10-16 7:22 ` Nemesa Garg
2024-09-30 11:21 Nemesa Garg
2024-10-16 7:24 ` Nemesa Garg
2024-10-17 8:05 ` Kandpal, Suraj
2024-10-17 16:53 ` Pottumuttu, Sai Teja
2024-10-18 5:04 ` Garg, Nemesa
2024-10-18 5:05 ` Garg, Nemesa
2024-10-18 5:44 ` Chauhan, Shekhar
2024-10-18 17:36 ` Matt Roper
2024-09-25 12:23 Nemesa Garg
2024-09-15 8:15 kernel test robot
2024-09-10 14:37 Nemesa Garg
2024-09-10 16:36 ` Pottumuttu, Sai Teja
2024-09-25 7:49 ` Garg, Nemesa
2024-09-10 14:36 Nemesa Garg
2024-09-15 12:20 ` Dan Carpenter
2024-09-06 7:01 Nemesa Garg
2024-09-06 8:51 ` Jani Nikula
2024-09-06 9:07 ` Jani Nikula
2024-09-06 13:51 ` Lucas De Marchi
2024-09-06 14:18 ` Jani Nikula
2024-09-06 15:33 ` Rodrigo Vivi
2024-09-06 7:00 Nemesa Garg
2024-07-24 13:06 Nemesa Garg
2024-07-24 17:01 ` Kandpal, Suraj
2024-07-25 2:59 ` Kandpal, Suraj
2024-08-12 5:18 ` Garg, Nemesa
2024-07-24 11:30 Nemesa Garg
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=874j633mnr.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=nemesa.garg@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 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.