lkml.org 
[lkml]   [2023]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 1/3] pwm: make it possible to apply pwm changes in atomic context
Date
On Tue, 17 Oct 2023, Sean Young <sean@mess.org> wrote:
> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
> index 2e8f17c045222..cf516190cde8f 100644
> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
> @@ -274,7 +274,7 @@ static void ext_pwm_set_backlight(const struct drm_connector_state *conn_state,
> struct intel_panel *panel = &to_intel_connector(conn_state->connector)->panel;
>
> pwm_set_relative_duty_cycle(&panel->backlight.pwm_state, level, 100);
> - pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state);
> + pwm_apply_cansleep(panel->backlight.pwm, &panel->backlight.pwm_state);
> }
>
> static void
> @@ -427,7 +427,7 @@ static void ext_pwm_disable_backlight(const struct drm_connector_state *old_conn
> intel_backlight_set_pwm_level(old_conn_state, level);
>
> panel->backlight.pwm_state.enabled = false;
> - pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state);
> + pwm_apply_cansleep(panel->backlight.pwm, &panel->backlight.pwm_state);
> }
>
> void intel_backlight_disable(const struct drm_connector_state *old_conn_state)
> @@ -749,7 +749,7 @@ static void ext_pwm_enable_backlight(const struct intel_crtc_state *crtc_state,
>
> pwm_set_relative_duty_cycle(&panel->backlight.pwm_state, level, 100);
> panel->backlight.pwm_state.enabled = true;
> - pwm_apply_state(panel->backlight.pwm, &panel->backlight.pwm_state);
> + pwm_apply_cansleep(panel->backlight.pwm, &panel->backlight.pwm_state);
> }
>
> static void __intel_backlight_enable(const struct intel_crtc_state *crtc_state,

The i915 parts are

Acked-by: Jani Nikula <jani.nikula@intel.com>

for merging via whichever tree you find most convenient, and with
whatever naming you end up with.

--
Jani Nikula, Intel

\
 
 \ /
  Last update: 2023-10-23 12:48    [W:0.063 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site