Skip to content

Commit c0e0bde

Browse files
tdzjnikula
authored andcommitted
drm/i915: Use backlight power constants
Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tursulin@ursulin.net> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240731122311.1143153-3-tzimmermann@suse.de Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 3663e2c commit c0e0bde

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/drm/i915/display/intel_backlight.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ void intel_backlight_disable(const struct drm_connector_state *old_conn_state)
455455
mutex_lock(&i915->display.backlight.lock);
456456

457457
if (panel->backlight.device)
458-
panel->backlight.device->props.power = FB_BLANK_POWERDOWN;
458+
panel->backlight.device->props.power = BACKLIGHT_POWER_OFF;
459459
panel->backlight.enabled = false;
460460
panel->backlight.funcs->disable(old_conn_state, 0);
461461

@@ -773,7 +773,7 @@ static void __intel_backlight_enable(const struct intel_crtc_state *crtc_state,
773773
panel->backlight.funcs->enable(crtc_state, conn_state, panel->backlight.level);
774774
panel->backlight.enabled = true;
775775
if (panel->backlight.device)
776-
panel->backlight.device->props.power = FB_BLANK_UNBLANK;
776+
panel->backlight.device->props.power = BACKLIGHT_POWER_ON;
777777
}
778778

779779
void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
@@ -870,12 +870,12 @@ static int intel_backlight_device_update_status(struct backlight_device *bd)
870870
*/
871871
if (panel->backlight.enabled) {
872872
if (panel->backlight.power) {
873-
bool enable = bd->props.power == FB_BLANK_UNBLANK &&
873+
bool enable = bd->props.power == BACKLIGHT_POWER_ON &&
874874
bd->props.brightness != 0;
875875
panel->backlight.power(connector, enable);
876876
}
877877
} else {
878-
bd->props.power = FB_BLANK_POWERDOWN;
878+
bd->props.power = BACKLIGHT_POWER_OFF;
879879
}
880880

881881
drm_modeset_unlock(&i915->drm.mode_config.connection_mutex);
@@ -945,9 +945,9 @@ int intel_backlight_device_register(struct intel_connector *connector)
945945
props.max_brightness);
946946

947947
if (panel->backlight.enabled)
948-
props.power = FB_BLANK_UNBLANK;
948+
props.power = BACKLIGHT_POWER_ON;
949949
else
950-
props.power = FB_BLANK_POWERDOWN;
950+
props.power = BACKLIGHT_POWER_OFF;
951951

952952
name = kstrdup_const("intel_backlight", GFP_KERNEL);
953953
if (!name)

0 commit comments

Comments
 (0)