Bug 208277

Summary: failed to change backlight brightness on AMD RENOIR
Product: Drivers Reporter: Pengyu Ma (mapengyu)
Component: Video(Other)Assignee: drivers_video-other
Status: NEW ---    
Severity: blocking CC: airlied, alexdeucher, felix.kuehling, harry.wentland, liangliang.quan, sunpeng.li
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.8-rc1 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg
dmesg-5.8rc2

Description Pengyu Ma 2020-06-22 10:18:13 UTC
Created attachment 289781 [details]
dmesg

Latest amdgpu driver will check is_dmcu_initialized,
if yes, call dmcu_set_backlight_level to set backlight via register BL1_PWM_USER_LEVEL.

When issues occur, the value is set correctly, even readout.
But the backlight is not changed.

The backlight can be changed after reboot from windows if installed dual OS(Windows10 and  Linux).
It can be reproduced by S3 in Linux.

I can hack the code to force using driver instead of dmcu, then backlight can be changed.

Latest amdgpu firmware from linux-firmware git is tested, no luck.
Comment 1 Pengyu Ma 2020-06-22 11:07:01 UTC
edid-decode (hex):

00 ff ff ff ff ff ff 00 0d ae 88 13 00 00 00 00 
0e 1c 01 04 a5 1d 11 78 02 ee 95 a3 54 4c 99 26 
0f 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 
01 01 01 01 01 01 b4 3b 80 4a 71 38 34 40 30 20 
36 00 25 a5 10 00 00 18 00 00 00 fe 00 4e 31 33 
33 48 43 45 2d 45 4e 32 0a 20 00 00 00 fe 00 43 
4d 4e 0a 20 20 20 20 20 20 20 20 20 00 00 00 fe 
00 4e 31 33 33 48 43 45 2d 45 4e 32 0a 20 00 fa 

----------------

EDID version: 1.4
Manufacturer: CMN Model 5000 Serial Number 0
Made in week 14 of 2018
Digital display
8 bits per primary color channel
DisplayPort interface
Maximum image size: 29 cm x 17 cm
Gamma: 2.20
Supported color formats: RGB 4:4:4
First detailed timing includes the native pixel format and preferred refresh rate
Color Characteristics
  Red:   0.6396, 0.3300
  Green: 0.2998, 0.5996
  Blue:  0.1503, 0.0595
  White: 0.3134, 0.3291
Established Timings I & II: none
Standard Timings: none
Detailed mode: Clock 152.840 MHz, 293 mm x 165 mm
               1920 1968 2000 2250 ( 48  32 250)
               1080 1083 1089 1132 (  3   6  43)
               -hsync -vsync
               VertFreq: 60.008 Hz, HorFreq: 67.929 kHz
Alphanumeric Data String: N133HCE-EN2
Alphanumeric Data String: CMN
Alphanumeric Data String: N133HCE-EN2
Checksum: 0xfa
Comment 3 Pengyu Ma 2020-06-23 03:24:44 UTC
Created attachment 289843 [details]
dmesg-5.8rc2

Hi Alex, 

Thanks for your quick response.

The first kernel dmesg already has that commit.

The new pull kernel tree 5.8-rc2+ doesn't work too.
dmesg uploaded.