All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Sean Paul <seanpaul@chromium.org>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/bridge: analogix_dp: Improve panel on time
Date: Mon, 12 Sep 2016 14:22:24 +0530	[thread overview]
Message-ID: <57D66CC8.3090504@codeaurora.org> (raw)
In-Reply-To: <1473247395-38489-1-git-send-email-seanpaul@chromium.org>



On 09/07/2016 04:53 PM, Sean Paul wrote:
> In order to reduce the time required to turn on the panel, this patch
> makes 2 assumptions:
> 1- In detect(): if there's a panel, we're connected.
> 2- In get_modes(): if there's a panel, let the panel driver decide if
>     it should prepare/unprepare in order to get the modes.
>
> The first is straightforward, and shouldn't need further explanation. The
> second should eliminate the prepare/unprepare delays from get_modes() in
> most cases, since panels generally hardcode their modes in the driver as
> opposed to reading EDID. If a panel does need to read EDID, it should be
> responsible for ensuring it's in a state in which it can.

Looks fine to me. I'll queue it to drm-misc if there are no comments on
it in the next couple days.

Thanks,
Archit

>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>   drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 23 ++++++++++++----------
>   1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index e9c9aeb..18f622a 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -924,15 +924,15 @@ int analogix_dp_get_modes(struct drm_connector *connector)
>   	struct edid *edid;
>   	int ret, num_modes = 0;
>
> -	ret = analogix_dp_prepare_panel(dp, true, false);
> -	if (ret) {
> -		DRM_ERROR("Failed to prepare panel (%d)\n", ret);
> -		return 0;
> -	}
> -
>   	if (dp->plat_data->panel) {
>   		num_modes += drm_panel_get_modes(dp->plat_data->panel);
>   	} else {
> +		ret = analogix_dp_prepare_panel(dp, true, false);
> +		if (ret) {
> +			DRM_ERROR("Failed to prepare panel (%d)\n", ret);
> +			return 0;
> +		}
> +
>   		edid = drm_get_edid(connector, &dp->aux.ddc);
>   		if (edid) {
>   			drm_mode_connector_update_edid_property(&dp->connector,
> @@ -940,15 +940,15 @@ int analogix_dp_get_modes(struct drm_connector *connector)
>   			num_modes += drm_add_edid_modes(&dp->connector, edid);
>   			kfree(edid);
>   		}
> +
> +		ret = analogix_dp_prepare_panel(dp, false, false);
> +		if (ret)
> +			DRM_ERROR("Failed to unprepare panel (%d)\n", ret);
>   	}
>
>   	if (dp->plat_data->get_modes)
>   		num_modes += dp->plat_data->get_modes(dp->plat_data, connector);
>
> -	ret = analogix_dp_prepare_panel(dp, false, false);
> -	if (ret)
> -		DRM_ERROR("Failed to unprepare panel (%d)\n", ret);
> -
>   	return num_modes;
>   }
>
> @@ -972,6 +972,9 @@ analogix_dp_detect(struct drm_connector *connector, bool force)
>   	enum drm_connector_status status = connector_status_disconnected;
>   	int ret;
>
> +	if (dp->plat_data->panel)
> +		return connector_status_connected;
> +
>   	ret = analogix_dp_prepare_panel(dp, true, false);
>   	if (ret) {
>   		DRM_ERROR("Failed to prepare panel (%d)\n", ret);
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2016-09-12  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 11:23 [PATCH] drm/bridge: analogix_dp: Improve panel on time Sean Paul
2016-09-12  8:52 ` Archit Taneja [this message]

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=57D66CC8.3090504@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    /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.