]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/dp: Change argument type of drm_edp_backlight_enable
authorSuraj Kandpal <suraj.kandpal@intel.com>
Fri, 20 Jun 2025 06:34:41 +0000 (12:04 +0530)
committerSuraj Kandpal <suraj.kandpal@intel.com>
Mon, 30 Jun 2025 15:11:47 +0000 (20:41 +0530)
Change the argument type to u32 for the default level being sent
since it has to now account for luminance value which has to be
set for DP_EDP_PANEL_LUMINANCE_TARGET_VALUE.

--v2
-No need to typecast [Jani]

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com>
Link: https://lore.kernel.org/r/20250620063445.3603086-10-suraj.kandpal@intel.com
drivers/gpu/drm/display/drm_dp_helper.c
drivers/gpu/drm/nouveau/dispnv50/disp.c
include/drm/display/drm_dp_helper.h

index c29c327a72afc5d1e2ae0bae1daeb51c4c7af5dd..f30a041ec29be9eb019e41c06d3a37e988ced3d7 100644 (file)
@@ -4028,7 +4028,7 @@ drm_edp_backlight_set_enable(struct drm_dp_aux *aux, const struct drm_edp_backli
  * Returns: %0 on success, negative error code on failure.
  */
 int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
-                            const u16 level)
+                            const u32 level)
 {
        int ret;
        u8 dpcd_buf;
index e5d37eee4301f122b1c21447b86dc01d219e33c5..e97e39abf3a22368e4884c4db740a9d62acebdd0 100644 (file)
@@ -1839,7 +1839,7 @@ nv50_sor_atomic_enable(struct drm_encoder *encoder, struct drm_atomic_state *sta
                backlight = nv_connector->backlight;
                if (backlight && backlight->uses_dpcd)
                        drm_edp_backlight_enable(&nv_connector->aux, &backlight->edp_info,
-                                                (u16)backlight->dev->props.brightness);
+                                                backlight->dev->props.brightness);
 #endif
 
                break;
index e2ffbd5c1cbdac2657e1104fe90554b346acf9aa..c6c2ba68fb16041c07c7a0a784fd5abc10c7c9f0 100644 (file)
@@ -860,7 +860,7 @@ drm_edp_backlight_init(struct drm_dp_aux *aux, struct drm_edp_backlight_info *bl
 int drm_edp_backlight_set_level(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
                                u32 level);
 int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl,
-                            u16 level);
+                            u32 level);
 int drm_edp_backlight_disable(struct drm_dp_aux *aux, const struct drm_edp_backlight_info *bl);
 
 #if IS_ENABLED(CONFIG_DRM_KMS_HELPER) && (IS_BUILTIN(CONFIG_BACKLIGHT_CLASS_DEVICE) || \