Message ID | 562F395C.2080109@sbg.at (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 27.10.2015 17:44, Michael Burian wrote: > On 10/27/15 03:36, Michel Dänzer wrote: >>> >>> [0] contains dmesg output with your patch applied (which fixes the backlight issue) >> >> This is very surprising: The patch just adds some debugging output, it's >> not supposed to have any functional effect. Also, I don't see any of the >> debugging output added by the patch in >> dmesg-4.3.0-rc7-00003-g85051e2-dirty-2015-10-26-11-00-41-radeon-bl-debug. >> > >> Are you sure that my patch was actually applied to the radeon driver >> when generating that file? Did you update the initrd with the patched >> radeon.ko? >> > > the build was done using "make -j4 deb-pkg" on a better equipped machine, > .deb packages were copied over and installed - maybe something interesting > happened > > AFAICT the patch should have been applied, at least it was shown with > git diff and the -dirty suffix was added by the build system, not me. > All graphics related drivers are compiled in (=y) rather than as > modules (=m) in .config. > > Another thing I tried yesterday was to add the old way right below the new one > (this fixes the backlight issue) enclosed by some debug statements that indicate > start / stop of the old / new method. (see atomdebug.diff - should be applied against > mainline) I'm not familiar with the ATOM bytecode, but since the number of bytecode instructions executed seems the same in both cases, I suspect that dig->backlight_level == 0 => ATOM_LCD_BLOFF is executed. (The debugging output in my patch would have provided all of this information and more, but there wasn't any of it in the dmesg you provided) I guess the question then becomes how dig->backlight_level is (supposed to be) initialized. What values do the following files contain in the broken and working cases? /sys/class/backlight/radeon_bl0/bl_power /sys/class/backlight/radeon_bl0/brightness /sys/class/backlight/radeon_bl0/actual_brightness /sys/class/backlight/radeon_bl0/max_brightness
On 10/27/15 10:17, Michel Dänzer wrote: > > I'm not familiar with the ATOM bytecode, but since the number of > bytecode instructions executed seems the same in both cases, I suspect > that dig->backlight_level == 0 => ATOM_LCD_BLOFF is executed. (The > debugging output in my patch would have provided all of this information > and more, but there wasn't any of it in the dmesg you provided) > > I guess the question then becomes how dig->backlight_level is (supposed > to be) initialized. > > What values do the following files contain in the broken and working cases? > > /sys/class/backlight/radeon_bl0/bl_power > /sys/class/backlight/radeon_bl0/brightness > /sys/class/backlight/radeon_bl0/actual_brightness > /sys/class/backlight/radeon_bl0/max_brightness > > These files do not exist on my system, I can offer /sys/class/backlight/acpi_video0/ content is identical in both cases bl_power 0 brightness 10 actual_brightness 10 max_brightness 10
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index ec1593a..a626bd6 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c @@ -62,7 +62,7 @@ typedef struct { bool abort; } atom_exec_context; -int atom_debug = 0; +int atom_debug = 1; static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t * params); int atom_execute_table(struct atom_context *ctx, int index, uint32_t * params); diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 65adb9c..c0d874f 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -1624,9 +1624,15 @@ radeon_atom_encoder_dpms_avivo(struct drm_encoder *encoder, int mode) } else atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) { + printk("radeon_start_backlight_new_way"); struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; - atombios_set_backlight_level(radeon_encoder, dig->backlight_level); + printk("radeon_stop_backlight_new_way"); + + printk("radeon_start_backlight_old_way"); + args.ucAction = ATOM_LCD_BLON; + atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); + printk("radeon_stop_backlight_old_way"); } break; case DRM_MODE_DPMS_STANDBY: