From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jammy Huang <jammy_huang@aspeedtech.com>,
airlied@redhat.com, airlied@gmail.com, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/ast: Fix no display at WayLand after power-off
Date: Fri, 9 Dec 2022 10:45:04 +0100 [thread overview]
Message-ID: <180babce-37e3-01b4-8f1a-03a82771bc8c@suse.de> (raw)
In-Reply-To: <20221209091143.6290-1-jammy_huang@aspeedtech.com>
[-- Attachment #1.1: Type: text/plain, Size: 2360 bytes --]
Hi
Am 09.12.22 um 10:11 schrieb Jammy Huang:
> With WayLand, there is error log when display waken up from power-off:
> gnome-shell: Failed to post KMS update: CRTC property (GAMMA_LUT) not found
> gnome-shell: Page flip discarded: CRTC property (GAMMA_LUT) not found
>
> To fix the issue, enable GAMMA_LUT property on CRTC.
This code has long been replaced by commit ce7fcf700386 ("drm/ast: Add
Atomic gamma lut support for aspeed"), which adds proper color
management to ast.
Please only submit patches for the latest driver in drm-misc-next.
Best regards
Thomas
>
> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
> ---
> drivers/gpu/drm/ast/ast_drv.h | 2 ++
> drivers/gpu/drm/ast/ast_mode.c | 5 +++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
> index 2e44b971c3a6..fd9af1cf0563 100644
> --- a/drivers/gpu/drm/ast/ast_drv.h
> +++ b/drivers/gpu/drm/ast/ast_drv.h
> @@ -86,6 +86,8 @@ enum ast_tx_chip {
> #define AST_DRAM_4Gx16 7
> #define AST_DRAM_8Gx16 8
>
> +#define MAX_COLOR_LUT_ENTRIES 256
> +
> /*
> * Cursor plane
> */
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index 1bc0220e6783..87bd9697bb44 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -74,7 +74,7 @@ static void ast_crtc_load_lut(struct ast_private *ast, struct drm_crtc *crtc)
> g = r + crtc->gamma_size;
> b = g + crtc->gamma_size;
>
> - for (i = 0; i < 256; i++)
> + for (i = 0; i < MAX_COLOR_LUT_ENTRIES; i++)
> ast_load_palette_index(ast, i, *r++ >> 8, *g++ >> 8, *b++ >> 8);
> }
>
> @@ -1323,7 +1323,8 @@ static int ast_crtc_init(struct drm_device *dev)
> if (ret)
> return ret;
>
> - drm_mode_crtc_set_gamma_size(crtc, 256);
> + drm_crtc_enable_color_mgmt(crtc, 0, false, MAX_COLOR_LUT_ENTRIES);
> + drm_mode_crtc_set_gamma_size(crtc, MAX_COLOR_LUT_ENTRIES);
> drm_crtc_helper_add(crtc, &ast_crtc_helper_funcs);
>
> return 0;
>
> base-commit: 8ed710da2873c2aeb3bb805864a699affaf1d03b
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-12-09 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-09 9:11 Jammy Huang
2022-12-09 9:45 ` Thomas Zimmermann [this message]
2022-12-12 3:16 ` Jammy Huang
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=180babce-37e3-01b4-8f1a-03a82771bc8c@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jammy_huang@aspeedtech.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®