Skip to content

Commit ce04308

Browse files
jannaumarcan
authored andcommitted
drm: apple: iomfb: limit backlight updates to integrated panels
Signed-off-by: Janne Grunau <[email protected]>
1 parent 879c155 commit ce04308

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

drivers/gpu/drm/apple/iomfb_template.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,9 +876,11 @@ void DCP_FW_NAME(iomfb_poweroff)(struct apple_dcp *dcp)
876876
* subsequent update on poweron an actual change and restore the
877877
* brightness.
878878
*/
879-
swap->swap.bl_unk = 1;
880-
swap->swap.bl_value = 0;
881-
swap->swap.bl_power = 0;
879+
if (dcp_has_panel(dcp)) {
880+
swap->swap.bl_unk = 1;
881+
swap->swap.bl_value = 0;
882+
swap->swap.bl_power = 0;
883+
}
882884

883885
for (int l = 0; l < SWAP_SURFACES; l++)
884886
swap->surf_null[l] = true;
@@ -1324,7 +1326,7 @@ void DCP_FW_NAME(iomfb_flush)(struct apple_dcp *dcp, struct drm_crtc *crtc, stru
13241326
req->swap.swap_completed = req->swap.swap_enabled;
13251327

13261328
/* update brightness if changed */
1327-
if (dcp->brightness.update) {
1329+
if (dcp_has_panel(dcp) && dcp->brightness.update) {
13281330
req->swap.bl_unk = 1;
13291331
req->swap.bl_value = dcp->brightness.dac;
13301332
req->swap.bl_power = 0x40;

0 commit comments

Comments
 (0)