Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Giedrius Statkevičius" <giedriuswork@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/lspcon: do not hardcode settle timeout
Date: Wed, 16 Oct 2024 10:16:40 +0530	[thread overview]
Message-ID: <31c2fe01-f1c8-4dc8-a38f-ef20dcf42717@intel.com> (raw)
In-Reply-To: <20241014093914.109162-1-giedriuswork@gmail.com>


On 10/14/2024 3:09 PM, Giedrius Statkevičius wrote:
> Avoid hardcoding the LSPCON settle timeout because it takes a longer
> time on certain chips made by certain vendors. Use the function that
> already exists to determine the timeout.
>
> Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
> ---
>   drivers/gpu/drm/display/drm_dp_dual_mode_helper.c | 3 +--
>   drivers/gpu/drm/i915/display/intel_lspcon.c       | 2 +-
>   include/drm/display/drm_dp_dual_mode_helper.h     | 2 +-
>   3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> index 14a2a8473682..ae9d6b93136b 100644
> --- a/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_dual_mode_helper.c
> @@ -491,11 +491,10 @@ EXPORT_SYMBOL(drm_lspcon_get_mode);
>    * 0 on success, -error on failure/timeout
>    */
>   int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapter,
> -			enum drm_lspcon_mode mode)
> +			enum drm_lspcon_mode mode, int time_out)

Add documentation for new argument 'time_out', as also reported by 
kernel test robot.

Otherwise looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

>   {
>   	u8 data = 0;
>   	int ret;
> -	int time_out = 200;
>   	enum drm_lspcon_mode current_mode;
>   
>   	if (mode == DRM_LSPCON_MODE_PCON)
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index f9db867fae89..764cf4898364 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -211,7 +211,7 @@ static int lspcon_change_mode(struct intel_lspcon *lspcon,
>   		return 0;
>   	}
>   
> -	err = drm_lspcon_set_mode(intel_dp->aux.drm_dev, ddc, mode);
> +	err = drm_lspcon_set_mode(intel_dp->aux.drm_dev, ddc, mode, lspcon_get_mode_settle_timeout(lspcon));
>   	if (err < 0) {
>   		drm_err(display->drm, "LSPCON mode change failed\n");
>   		return err;
> diff --git a/include/drm/display/drm_dp_dual_mode_helper.h b/include/drm/display/drm_dp_dual_mode_helper.h
> index 7ee482265087..7ac6969db935 100644
> --- a/include/drm/display/drm_dp_dual_mode_helper.h
> +++ b/include/drm/display/drm_dp_dual_mode_helper.h
> @@ -117,5 +117,5 @@ const char *drm_dp_get_dual_mode_type_name(enum drm_dp_dual_mode_type type);
>   int drm_lspcon_get_mode(const struct drm_device *dev, struct i2c_adapter *adapter,
>   			enum drm_lspcon_mode *current_mode);
>   int drm_lspcon_set_mode(const struct drm_device *dev, struct i2c_adapter *adapter,
> -			enum drm_lspcon_mode reqd_mode);
> +			enum drm_lspcon_mode reqd_mode, int time_out);
>   #endif

  parent reply	other threads:[~2024-10-16  4:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  9:39 [PATCH] drm/i915/lspcon: do not hardcode settle timeout Giedrius Statkevičius
2024-10-15 10:13 ` kernel test robot
2024-10-15 14:13 ` ✓ CI.Patch_applied: success for " Patchwork
2024-10-15 14:14 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-15 14:15 ` ✓ CI.KUnit: success " Patchwork
2024-10-15 14:26 ` ✓ CI.Build: " Patchwork
2024-10-15 14:29 ` ✓ CI.Hooks: " Patchwork
2024-10-15 14:30 ` ✗ CI.checksparse: warning " Patchwork
2024-10-15 23:52 ` ✗ CI.FULL: failure " Patchwork
2024-10-16  4:46 ` Nautiyal, Ankit K [this message]
2024-10-16  7:05 ` ✓ CI.Patch_applied: success for drm/i915/lspcon: do not hardcode settle timeout (rev2) Patchwork
2024-10-16  7:06 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-16  7:07 ` ✓ CI.KUnit: success " Patchwork
2024-10-16  7:18 ` ✓ CI.Build: " Patchwork
2024-10-16  7:20 ` ✓ CI.Hooks: " Patchwork
2024-10-16  7:22 ` ✗ CI.checksparse: warning " Patchwork
2024-10-16  7:46 ` ✓ CI.BAT: success " Patchwork
2024-10-16 16:34 ` ✗ CI.FULL: failure " 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=31c2fe01-f1c8-4dc8-a38f-ef20dcf42717@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=giedriuswork@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    /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