All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel@daenzer.net>
To: dpirate@metalpunks.info
Cc: Peter Rosin <peda@axentia.se>, dri-devel@lists.freedesktop.org
Subject: Re: [Bug 198123] Console is the wrong color at boot with radeon 6670
Date: Fri, 22 Dec 2017 16:34:58 +0100	[thread overview]
Message-ID: <2ad7d588-8ef8-ad79-df38-afae1f77a378@daenzer.net> (raw)
In-Reply-To: <41580505-1a0d-8d9c-8545-bde63baa4b4f@daenzer.net>

[-- Attachment #1: Type: text/plain, Size: 2280 bytes --]

On 2017-12-19 11:48 AM, Michel Dänzer wrote:
> On 2017-12-18 02:50 PM, Peter Rosin wrote:
>> On 2017-12-18 12:37, Michel Dänzer wrote:
>>>
>>> Following up by e-mail, since I can't find Peter Rosin in the kernel
>>> bugzilla.
>>>
>>>
>>> On 2017-12-16 02:41 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
>>>> https://bugzilla.kernel.org/show_bug.cgi?id=198123
>>>>
>>>> --- Comment #8 from Deposite Pirate (dpirate@metalpunks.info) ---
>>>> Ok, I went through all the git bisect process. Here are the results:
>>>>
>>>> [...]
>>>>
>>>> b8e2b0199cc377617dc238f5106352c06dcd3fa2 is the first bad commit
>>>> commit b8e2b0199cc377617dc238f5106352c06dcd3fa2
>>>> Author: Peter Rosin <peda@axentia.se>
>>>> Date:   Tue Jul 4 12:36:57 2017 +0200
>>>>
>>>>     drm/fb-helper: factor out pseudo-palette
>>>>
>>>>     The pseudo-palette has nothing to do with the crtc, so move it
>>>>     out of the crtc loop and update the palette once, then break out
>>>>     early.
>>>>
>>>>     Signed-off-by: Peter Rosin <peda@axenita.se>
>>>>     Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>>     Link:
>>>> http://patchwork.freedesktop.org/patch/msgid/1499164632-5582-2-git-send-email-peda@axentia.se
>>>>
>>>> :040000 040000 a8c2650554e199fee994ac63c2700c73ba2ecffe
>>>> 7f72ed414efadd77ef1d718e7477475c4ba1127d M      drivers
>>>
>>> My guess would be this is because fb_helper->funcs->gamma_set is no
>>> longer called from drm_fb_helper_setcmap in the FB_VISUAL_TRUECOLOR case
>>> (was previously called via setcolreg).
>>
>> No, that's not right, fb_helper->funcs->gamma_set() wasn't called for the
>> FB_VISUAL_TRUECOLOR case before the commit either.
>>
>> However, crtc_funcs->load_lut() was called, but that operation is now
>> gone in a later cleanup. However#2, that ->load_lut() did not use anything
>> that was provided in the call to drm_fb_helper_setcmap, since the load_lut
>> implementations generally didn't look at the pseudo_palette variable. So,
>> the now-missing ->load_lut() call probably just reloaded the clut?
> 
> Makes sense.

"Deposite Pirate", do the attached (only compile tested) patches work?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-drm-radeon-Call-radeon_crtc_load_lut-from-radeon_crt.patch --]
[-- Type: text/x-patch; name="0001-drm-radeon-Call-radeon_crtc_load_lut-from-radeon_crt.patch", Size: 1126 bytes --]

From f683369b876b5198b0099d66ad83997455d9040f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 22 Dec 2017 16:27:09 +0100
Subject: [PATCH 1/2] drm/radeon: Call radeon_crtc_load_lut from
 radeon_crtc_init
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Cc: stable@vger.kernel.org
Fixes: b8e2b0199cc3 "drm/fb-helper: factor out pseudo-palette"
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index ddfe91efa61e..d403be4afd24 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -707,6 +707,8 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
 		radeon_atombios_init_crtc(dev, radeon_crtc);
 	else
 		radeon_legacy_init_crtc(dev, radeon_crtc);
+
+	radeon_crtc_load_lut(&radeon_crtc->base);
 }
 
 static const char *encoder_names[38] = {
-- 
2.15.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-drm-radeon-Remove-unused-lut_r-g-b-arrays.patch --]
[-- Type: text/x-patch; name="0002-drm-radeon-Remove-unused-lut_r-g-b-arrays.patch", Size: 1977 bytes --]

From e071d7293a30bf84677c15a30d91872b7439ce70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
Date: Fri, 22 Dec 2017 16:31:54 +0100
Subject: [PATCH 2/2] drm/radeon: Remove unused lut_r/g/b arrays
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/radeon/radeon_display.c | 7 -------
 drivers/gpu/drm/radeon/radeon_mode.h    | 1 -
 2 files changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index d403be4afd24..0519c6162381 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -668,7 +668,6 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
 {
 	struct radeon_device *rdev = dev->dev_private;
 	struct radeon_crtc *radeon_crtc;
-	int i;
 
 	radeon_crtc = kzalloc(sizeof(struct radeon_crtc) + (RADEONFB_CONN_LIMIT * sizeof(struct drm_connector *)), GFP_KERNEL);
 	if (radeon_crtc == NULL)
@@ -697,12 +696,6 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
 	radeon_crtc->mode_set.num_connectors = 0;
 #endif
 
-	for (i = 0; i < 256; i++) {
-		radeon_crtc->lut_r[i] = i << 2;
-		radeon_crtc->lut_g[i] = i << 2;
-		radeon_crtc->lut_b[i] = i << 2;
-	}
-
 	if (rdev->is_atom_bios && (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom))
 		radeon_atombios_init_crtc(dev, radeon_crtc);
 	else
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index ca0a7ed28c9b..9b1fe25f624a 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -328,7 +328,6 @@ enum radeon_flip_status {
 struct radeon_crtc {
 	struct drm_crtc base;
 	int crtc_id;
-	u16 lut_r[256], lut_g[256], lut_b[256];
 	bool enabled;
 	bool can_tile;
 	bool cursor_out_of_bounds;
-- 
2.15.1


[-- Attachment #4: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-12-22 15:35 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10 16:53 [Bug 198123] New: Console is the wrong color at boot with radeon 6670 bugzilla-daemon
2017-12-11  3:56 ` [Bug 198123] " bugzilla-daemon
2017-12-11 23:31 ` bugzilla-daemon
2017-12-12 23:11 ` bugzilla-daemon
2017-12-12 23:26 ` bugzilla-daemon
2017-12-12 23:33 ` bugzilla-daemon
2017-12-12 23:48 ` bugzilla-daemon
2017-12-13  0:59 ` bugzilla-daemon
2017-12-16  1:41 ` bugzilla-daemon
2017-12-18 11:37   ` Michel Dänzer
2017-12-18 13:50     ` Peter Rosin
2017-12-19 10:48       ` Michel Dänzer
2017-12-22 15:34         ` Michel Dänzer [this message]
2018-01-07 19:14         ` Deposite Pirate
2018-01-10 12:15           ` Daniel Vetter
2018-01-11  8:57             ` Daniel Vetter
2018-01-11  9:09             ` Michel Dänzer
2017-12-28  9:35 ` bugzilla-daemon
2018-01-11 10:11 ` bugzilla-daemon
2018-01-12  8:46 ` bugzilla-daemon
2018-01-12  9:50 ` bugzilla-daemon
2018-01-12 21:12 ` bugzilla-daemon
2018-01-13  6:50 ` bugzilla-daemon
2018-01-13 13:34 ` bugzilla-daemon
2018-01-14 18:32 ` bugzilla-daemon
2018-01-14 20:40 ` bugzilla-daemon
2018-01-16 16:54 ` bugzilla-daemon
2018-01-17 13:48 ` bugzilla-daemon
2018-01-18  5:15 ` bugzilla-daemon
2018-01-22  8:39 ` bugzilla-daemon
2018-01-22  8:40 ` bugzilla-daemon
2018-01-26  6:50 ` bugzilla-daemon
2018-01-26 17:54 ` bugzilla-daemon
2018-01-28 22:55 ` bugzilla-daemon
2018-01-31 10:36 ` bugzilla-daemon
2018-01-31 10:44 ` bugzilla-daemon
2018-01-31 11:14 ` bugzilla-daemon
2018-02-01 15:39 ` bugzilla-daemon
2018-02-19  8:20 ` bugzilla-daemon
2018-02-19  8:35 ` bugzilla-daemon
2018-02-19 15:19 ` bugzilla-daemon
2018-02-26  2:57 ` bugzilla-daemon
2018-02-26  2:59 ` bugzilla-daemon
2018-03-13 18:53 ` bugzilla-daemon
2018-03-14  9:10 ` bugzilla-daemon
2018-03-14 23:48 ` bugzilla-daemon
2018-03-15  9:20 ` bugzilla-daemon
2018-03-15 22:18 ` bugzilla-daemon
2018-03-16  9:29 ` bugzilla-daemon
2018-03-16 19:20 ` bugzilla-daemon
2018-03-17 18:57 ` bugzilla-daemon
2018-03-18 14:33 ` bugzilla-daemon
2018-03-19  9:40 ` bugzilla-daemon
2018-03-19  9:43 ` bugzilla-daemon
2018-03-19 13:55 ` bugzilla-daemon
2018-03-20  4:37 ` bugzilla-daemon
2018-03-20  6:03 ` bugzilla-daemon
2018-08-09  7:39 ` bugzilla-daemon
2018-09-05 13:59 ` bugzilla-daemon
2018-11-26 18:21 ` bugzilla-daemon
2019-03-05  1:12 ` bugzilla-daemon
2023-10-01 21:32 ` bugzilla-daemon

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=2ad7d588-8ef8-ad79-df38-afae1f77a378@daenzer.net \
    --to=michel@daenzer.net \
    --cc=dpirate@metalpunks.info \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=peda@axentia.se \
    /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.