All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, arun.r.murthy@intel.com,
	Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level
Date: Fri, 11 Apr 2025 13:39:03 +0300	[thread overview]
Message-ID: <87zfgnt22g.fsf@intel.com> (raw)
In-Reply-To: <20250411042909.2626807-8-suraj.kandpal@intel.com>

On Fri, 11 Apr 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> Use u32 for level variable as one may need to pass value for
> DP_EDP_PANEL_TARGET_LUMINANCE_VALUE.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>  drivers/gpu/drm/display/drm_dp_helper.c | 6 +++---
>  include/drm/display/drm_dp_helper.h     | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index bb1242a1bf6b..895ed4a22fc3 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -3933,7 +3933,7 @@ EXPORT_SYMBOL(drm_dp_pcon_convert_rgb_to_ycbcr);
>   * Returns: %0 on success, negative error code on failure
>   */
>  int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
> -				u16 level)
> +				u32 level)
>  {
>  	int ret;
>  	u8 buf[2] = { 0 };
> @@ -4047,7 +4047,7 @@ int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backli
>  		return ret < 0 ? ret : -EIO;
>  	}
>  
> -	ret = drm_edp_backlight_set_level(aux, bl, level);
> +	ret = drm_edp_backlight_set_level(aux, bl, (u32)level);

What difference do you think the cast makes?

>  	if (ret < 0)
>  		return ret;
>  	ret = drm_edp_backlight_set_enable(aux, bl, true);
> @@ -4327,7 +4327,7 @@ static int dp_aux_backlight_update_status(struct backlight_device *bd)
>  			bl->enabled = true;
>  			return 0;
>  		}
> -		ret = drm_edp_backlight_set_level(bl->aux, &bl->info, brightness);
> +		ret = drm_edp_backlight_set_level(bl->aux, &bl->info, (u32)brightness);

Ditto.

>  	} else {
>  		if (bl->enabled) {
>  			drm_edp_backlight_disable(bl->aux, &bl->info);
> diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h
> index 62be80417ded..6bce0176efd3 100644
> --- a/include/drm/display/drm_dp_helper.h
> +++ b/include/drm/display/drm_dp_helper.h
> @@ -853,7 +853,7 @@ drm_edp_backlight_init(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl
>  		       u16 driver_pwm_freq_hz, const u8 edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE],
>  		       u32 *current_level, u8 *current_mode, bool need_luminance);
>  int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
> -				u16 level);
> +				u32 level);
>  int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
>  			     u16 level);
>  int drm_edp_backlight_disable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl);

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-04-11 10:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  4:28 [PATCH 00/13] Modify drm helpers to use luminance Suraj Kandpal
2025-04-11  4:28 ` [PATCH 01/13] drm/dp: Introduce new member in drm_backlight_info Suraj Kandpal
2025-04-11  4:28 ` [PATCH 02/13] drm/dp: Add argument in drm_edp_backlight_init Suraj Kandpal
2025-04-11  4:28 ` [PATCH 03/13] drm/dp: Add argument for luminance range info " Suraj Kandpal
2025-04-11  4:29 ` [PATCH 04/13] drm/dp: Move from u16 to u32 for max in drm_edp_backlight_info Suraj Kandpal
2025-04-11  4:29 ` [PATCH 05/13] drm/dp: Change current_level argument type to u32 Suraj Kandpal
2025-04-11  4:29 ` [PATCH 06/13] drm/dp: Modify drm_edp_probe_state Suraj Kandpal
2025-04-11  4:29 ` [PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level Suraj Kandpal
2025-04-11 10:39   ` Jani Nikula [this message]
2025-04-14  4:16     ` Kandpal, Suraj
2025-04-11  4:29 ` [PATCH 08/13] drm/dp: Modify drm_edp_backlight_set_level Suraj Kandpal
2025-04-11  4:29 ` [PATCH 09/13] drm/dp: Change argument type of drm_edp_backlight_enable Suraj Kandpal
2025-04-11  4:29 ` [PATCH 10/13] drm/dp: Enable backlight control using luminance Suraj Kandpal
2025-04-11  4:29 ` [PATCH 11/13] drm/i915/backlight: Use drm helper to initialize edp backlight Suraj Kandpal
2025-04-11  4:29 ` [PATCH 12/13] drm/i915/backlight: Use drm helper to set " Suraj Kandpal
2025-04-11  4:29 ` [PATCH 13/13] drm/i915/backlight: Use drm_edp_backlight_enable Suraj Kandpal
2025-04-11  4:36 ` ✓ CI.Patch_applied: success for Modify drm helpers to use luminance Patchwork
2025-04-11  4:36 ` ✓ CI.checkpatch: " Patchwork
2025-04-11  4:37 ` ✓ CI.KUnit: " Patchwork
2025-04-11  4:46 ` ✓ CI.Build: " Patchwork
2025-04-11  4:48 ` ✓ CI.Hooks: " Patchwork
2025-04-11  4:49 ` ✗ CI.checksparse: warning " Patchwork
2025-04-11  5:00 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-04-11  5:27 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-11  5:35 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-11  7:08 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-11  8:12 ` ✗ Xe.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-04-14  4:16 [PATCH 00/13] " Suraj Kandpal
2025-04-14  4:16 ` [PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level Suraj Kandpal
2025-06-20  5:42   ` Murthy, Arun R
2025-05-09  5:18 [PATCH 00/13] Modify drm helpers to use luminance Suraj Kandpal
2025-05-09  5:18 ` [PATCH 07/13] drm/dp: Change argument type for drm_edp_backlight_set_level Suraj Kandpal
2025-06-20  5:39   ` Kandpal, Suraj

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=87zfgnt22g.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=suraj.kandpal@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.