@ -3806,13 +3806,15 @@ drm_get_backlight(struct drm_head *head)
static void
static void
drm_set_backlight ( struct weston_output * output_base , uint32_t value )
drm_set_backlight ( struct weston_output * output_base , uint32_t value )
{
{
struct drm_head * head = to_drm_head ( weston_output_get_first_head ( output_base ) ) ;
struct drm_output * output = to_drm_output ( output_base ) ;
struct drm_head * head ;
long max_brightness , new_brightness ;
long max_brightness , new_brightness ;
if ( ! head - > backlight )
if ( value > 255 )
return ;
return ;
if ( value > 255 )
wl_list_for_each ( head , & output - > base . head_list , base . output_link ) {
if ( ! head - > backlight )
return ;
return ;
max_brightness = backlight_get_max_brightness ( head - > backlight ) ;
max_brightness = backlight_get_max_brightness ( head - > backlight ) ;
@ -3821,6 +3823,7 @@ drm_set_backlight(struct weston_output *output_base, uint32_t value)
new_brightness = ( value * max_brightness ) / 255 ;
new_brightness = ( value * max_brightness ) / 255 ;
backlight_set_brightness ( head - > backlight , new_brightness ) ;
backlight_set_brightness ( head - > backlight , new_brightness ) ;
}
}
}
/**
/**