From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Allow panel fixed modes to have differing sync polarities
Date: Thu, 13 Oct 2022 09:46:27 +0300 [thread overview]
Message-ID: <8735bste4c.fsf@intel.com> (raw)
In-Reply-To: <20221006225413.27731-1-ville.syrjala@linux.intel.com>
On Fri, 07 Oct 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Apparently some panels declare multiple modes with random
> sync polarities. Seems a bit weird, but looks like Windows/GOP
> doesn't care, so let follow suit and accept alternate fixed
> modes regardless of their sync polarities.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6968
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_panel.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 2b4b359b8342..fdeb1cd608c3 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -82,12 +82,16 @@ static bool is_alt_drrs_mode(const struct drm_display_mode *mode,
> mode->clock != preferred_mode->clock;
> }
>
> +#define DRM_MODE_FLAG_SYNC_MASK (DRM_MODE_FLAG_PHSYNC | \
> + DRM_MODE_FLAG_NHSYNC | \
> + DRM_MODE_FLAG_PVSYNC | \
> + DRM_MODE_FLAG_NVSYNC)
Maybe not the best to name the macro in the DRM_MODE_* "namespace"?
Other than that,
Acked-by: Jani Nikula <jani.nikula@intel.com>
> +
> static bool is_alt_fixed_mode(const struct drm_display_mode *mode,
> const struct drm_display_mode *preferred_mode)
> {
> - return drm_mode_match(mode, preferred_mode,
> - DRM_MODE_MATCH_FLAGS |
> - DRM_MODE_MATCH_3D_FLAGS) &&
> + return (mode->flags & ~DRM_MODE_FLAG_SYNC_MASK) ==
> + (preferred_mode->flags & ~DRM_MODE_FLAG_SYNC_MASK) &&
> mode->hdisplay == preferred_mode->hdisplay &&
> mode->vdisplay == preferred_mode->vdisplay;
> }
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-10-13 6:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-06 22:54 [Intel-gfx] [PATCH] drm/i915: Allow panel fixed modes to have differing sync polarities Ville Syrjala
2022-10-07 0:28 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-10-07 10:43 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-10-13 6:46 ` Jani Nikula [this message]
2022-10-20 8:33 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2022-10-20 9:39 ` [Intel-gfx] [PATCH v2] " Ville Syrjala
2022-10-20 11:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Allow panel fixed modes to have differing sync polarities (rev2) Patchwork
2022-10-20 13:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=8735bste4c.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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.