From: Michael Burian <michael.burian@sbg.at>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: No backlight since linux-4.2.4 - drivers/gpu/drm/radeon/atombios_encoders.c
Date: Tue, 27 Oct 2015 09:44:12 +0100 [thread overview]
Message-ID: <562F395C.2080109@sbg.at> (raw)
In-Reply-To: <562EE34A.9070100@daenzer.net>
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
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)
[-- Attachment #2: new.nots --]
[-- Type: text/plain, Size: 1312 bytes --]
radeon_start_backlight_new_way
>> execute D2AA (len 348, WS 4, PS 4)
SET_ATI_PORT @ 0xD2B0
port: 0 (MM)
COMPARE_PS @ 0xD2B3
src1:
PS[0x00,0xFFFF8802]
.[7:0] -> 0x02
src2:
IMM 0x04
result: NE LE
JUMP_EQUAL @ 0xD2B7
taken: no
target: 0x0128
COMPARE_PS @ 0xD2BA
src1:
PS[0x00,0xFFFF8802]
.[7:0] -> 0x02
src2:
IMM 0x05
result: NE LE
JUMP_EQUAL @ 0xD2BE
taken: no
target: 0x0113
COMPARE_PS @ 0xD2C1
src1:
PS[0x00,0xFFFF8802]
.[7:0] -> 0x02
src2:
IMM 0x00
result: NE GT
JUMP_EQUAL @ 0xD2C5
taken: no
target: 0x00D8
COMPARE_PS @ 0xD2C8
src1:
PS[0x00,0xFFFF8802]
.[7:0] -> 0x02
src2:
IMM 0x01
result: NE GT
JUMP_NOT_EQUAL @ 0xD2CC
taken: yes
target: 0x013D
COMPARE_PS @ 0xD3E7
src1:
PS[0x00,0xFFFF8802]
.[7:0] -> 0x02
src2:
IMM 0x03
result: NE LE
JUMP_NOT_EQUAL @ 0xD3EB
taken: yes
target: 0x0151
OR_REG @ 0xD3FB
dst:
REG[0x1EBC]
.[31:24] -> 0x00
src:
IMM 0x02
dst:
REG[0x1EBC]
.[31:24] <- 0x02
AND_REG @ 0xD400
dst:
REG[0x1EBC]
.[31:24] -> 0x02
src:
IMM 0xFE
dst:
REG[0x1EBC]
.[31:24] <- 0x02
EOT @ 0xD405
<<
radeon_stop_backlight_new_wayradeon_start_backlight_old_way
[-- Attachment #3: old.nots --]
[-- Type: text/plain, Size: 1327 bytes --]
radeon_stop_backlight_new_wayradeon_start_backlight_old_way
>> execute D2AA (len 348, WS 4, PS 4)
SET_ATI_PORT @ 0xD2B0
port: 0 (MM)
COMPARE_PS @ 0xD2B3
src1:
PS[0x00,0x0003]
.[7:0] -> 0x03
src2:
IMM 0x04
result: NE LE
JUMP_EQUAL @ 0xD2B7
taken: no
target: 0x0128
COMPARE_PS @ 0xD2BA
src1:
PS[0x00,0x0003]
.[7:0] -> 0x03
src2:
IMM 0x05
result: NE LE
JUMP_EQUAL @ 0xD2BE
taken: no
target: 0x0113
COMPARE_PS @ 0xD2C1
src1:
PS[0x00,0x0003]
.[7:0] -> 0x03
src2:
IMM 0x00
result: NE GT
JUMP_EQUAL @ 0xD2C5
taken: no
target: 0x00D8
COMPARE_PS @ 0xD2C8
src1:
PS[0x00,0x0003]
.[7:0] -> 0x03
src2:
IMM 0x01
result: NE GT
JUMP_NOT_EQUAL @ 0xD2CC
taken: yes
target: 0x013D
COMPARE_PS @ 0xD3E7
src1:
PS[0x00,0x0003]
.[7:0] -> 0x03
src2:
IMM 0x03
result: EQ LE
JUMP_NOT_EQUAL @ 0xD3EB
taken: no
target: 0x0151
OR_REG @ 0xD3EE
dst:
REG[0x1EBC]
.[31:24] -> 0x02
src:
IMM 0x02
dst:
REG[0x1EBC]
.[31:24] <- 0x02
OR_REG @ 0xD3F3
dst:
REG[0x1EBC]
.[31:24] -> 0x02
src:
IMM 0x01
dst:
REG[0x1EBC]
.[31:24] <- 0x03
JUMP @ 0xD3F8
target: 0x015B
EOT @ 0xD405
<<
radeon_stop_backlight_old_way
[-- Attachment #4: atomdebug.diff --]
[-- Type: text/x-patch, Size: 1430 bytes --]
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:
[-- Attachment #5: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-10-27 9:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <562BDB47.5000301@sbg.at>
2015-10-26 9:32 ` No backlight since linux-4.2.4 - drivers/gpu/drm/radeon/atombios_encoders.c Michel Dänzer
2015-10-26 21:21 ` Alex Deucher
[not found] ` <562E0473.5060404@sbg.at>
2015-10-27 2:36 ` Michel Dänzer
2015-10-27 8:44 ` Michael Burian [this message]
2015-10-27 9:17 ` Michel Dänzer
2015-10-27 10:06 ` Michael Burian
2015-10-27 15:10 ` Alex Deucher
2015-10-27 16:23 ` Michael Burian
2015-10-27 16:43 ` Alex Deucher
2015-10-27 17:02 ` Michael Burian
2015-10-28 7:11 ` Michel Dänzer
2015-10-28 19:03 ` Alex Deucher
2015-10-28 20:46 ` Michael Burian
2015-10-29 3:18 ` Michel Dänzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=562F395C.2080109@sbg.at \
--to=michael.burian@sbg.at \
--cc=dri-devel@lists.freedesktop.org \
--cc=michel@daenzer.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.