dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Clinton Taylor <Clinton.A.Taylor@intel.com>
To: Manasi Navare <manasi.d.navare@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/edid: Add a EDID edp panel quirk for forcing max lane count
Date: Tue, 2 Apr 2019 14:08:59 -0700	[thread overview]
Message-ID: <f0bdabeb-ea45-3fe7-4024-ab09011d3618@intel.com> (raw)
In-Reply-To: <20190402215235.29895-1-manasi.d.navare@intel.com>


On 4/2/19 2:52 PM, Manasi Navare wrote:
> For certain eDP 1.4 panels, we need to use max lane count for the
> link training to succeed.
>
> This patch adds a EDID quirk for such eDP panels using
> their vendor ID and product ID to force using max lane count in the driver.
>
> Cc: Clint Taylor <Clinton.A.Taylor@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Tested-by: Albert Astals Cid <aacid@kde.org>
> Tested-by: Emanuele Panigati <ilpanich@gmail.com>
> Tested-by: Ralgor <ralgorfdb@compuspex.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109959
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
>   drivers/gpu/drm/drm_edid.c  | 10 ++++++++++
>   include/drm/drm_connector.h |  5 +++++
>   2 files changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 2c22ea446075..fbc661806484 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -82,6 +82,8 @@
>   #define EDID_QUIRK_FORCE_10BPC			(1 << 11)
>   /* Non desktop display (i.e. HMD) */
>   #define EDID_QUIRK_NON_DESKTOP			(1 << 12)
> +/* Force max lane count */

Nit. Would like a little more descriptive comment about this quirk. 
Maybe even /* Force use of max lane count for link training */

> +#define EDID_QUIRK_FORCE_MAX_LANE_COUNT		(1 << 13)
>   
>   struct detailed_mode_closure {
>   	struct drm_connector *connector;
> @@ -189,6 +191,10 @@ static const struct edid_quirk {
>   
>   	/* OSVR HDK and HDK2 VR Headsets */
>   	{ "SVR", 0x1019, EDID_QUIRK_NON_DESKTOP },
> +
> +	/* SHP eDP 1.4 panel only works with max lane count */
> +	{ "SHP", 0x149a, EDID_QUIRK_FORCE_MAX_LANE_COUNT },
> +	{ "SHP", 0x148e, EDID_QUIRK_FORCE_MAX_LANE_COUNT },
>   };
>   
>   /*
> @@ -4463,6 +4469,7 @@ drm_reset_display_info(struct drm_connector *connector)
>   	memset(&info->hdmi, 0, sizeof(info->hdmi));
>   
>   	info->non_desktop = 0;
> +	info->force_max_lane_count = 0;
>   }
>   
>   u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edid)
> @@ -4744,6 +4751,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
>   	if (quirks & EDID_QUIRK_FORCE_12BPC)
>   		connector->display_info.bpc = 12;
>   
> +	if (quirks & EDID_QUIRK_FORCE_MAX_LANE_COUNT)
> +		connector->display_info.force_max_lane_count = true;
> +
>   	return num_modes;
>   }
>   EXPORT_SYMBOL(drm_add_edid_modes);
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 02a131202add..45436d40ffe3 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -457,6 +457,11 @@ struct drm_display_info {
>   	 * @non_desktop: Non desktop display (HMD).
>   	 */
>   	bool non_desktop;
> +
> +	/**
> +	 * @force_max_lane_count: Link training requires max lane count to pass
> +	 */
> +	bool force_max_lane_count;
>   };
>   
>   int drm_display_info_set_bus_formats(struct drm_display_info *info,

Rest of the patch appears sane for a quirk.

Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>

-Clint



_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-04-02 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 21:52 [PATCH 1/2] drm/edid: Add a EDID edp panel quirk for forcing max lane count Manasi Navare
2019-04-02 21:08 ` Clinton Taylor [this message]
2019-04-02 21:52 ` [PATCH 2/2] drm/i915/edp: Use max link rate and lane count if eDP EDID quirk Manasi Navare
2019-04-02 21:11   ` Clinton Taylor
2019-04-03 12:14 ` [PATCH 1/2] drm/edid: Add a EDID edp panel quirk for forcing max lane count Ville Syrjälä
2019-04-03 13:19   ` Daniel Vetter
2019-04-03 18:37   ` Manasi Navare
2019-04-03 18:55     ` Ville Syrjälä
2019-04-03 19:07       ` Manasi Navare
2019-04-03 19:22         ` Ville Syrjälä
2019-04-03 19:52           ` Manasi Navare

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=f0bdabeb-ea45-3fe7-4024-ab09011d3618@intel.com \
    --to=clinton.a.taylor@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=manasi.d.navare@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;
as well as URLs for NNTP newsgroup(s).