linuxkpi: Define backlight_get_brightness() and backlight_is_blank()

This is not used by the DRM driver yet because we comment out the code
calling them, but they are easy to implement.

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D38530
This commit is contained in:
Jean-Sébastien Pédron 2023-02-08 18:51:16 +01:00
parent 1a1f7b7df7
commit a82a8a5e19
No known key found for this signature in database
GPG Key ID: 39E99761A5FD94CC

View File

@ -91,6 +91,13 @@ backlight_force_update(struct backlight_device *bd, int reason)
bd->props.brightness = bd->ops->get_brightness(bd);
}
static inline int
backlight_get_brightness(struct backlight_device *bd)
{
return (bd->props.brightness);
}
static inline int
backlight_device_set_brightness(struct backlight_device *bd, int brightness)
{
@ -119,4 +126,11 @@ backlight_disable(struct backlight_device *bd)
return (backlight_update_status(bd));
}
static inline bool
backlight_is_blank(struct backlight_device *bd)
{
return (bd->props.power != 0/* FB_BLANK_UNBLANK */);
}
#endif /* _LINUXKPI_LINUX_BACKLIGHT_H_ */