dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Cc: peter.ujfalusi@ti.com, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v3 3/3] drm/omapdrm: Implement gamma_lut atomic crtc property
Date: Tue, 24 May 2016 16:53:03 +0300	[thread overview]
Message-ID: <57445CBF.7030303@ti.com> (raw)
In-Reply-To: <d169f1767a27a3c94c441495d6e18ca5e12ea271.1464080259.git.jsarha@ti.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1245 bytes --]

On 24/05/16 12:16, Jyri Sarha wrote:
> Implement gamma_lut atomic crtc property, set crtc gamma size to 256
> for all crtcs and use drm_atomic_helper_legacy_gamma_set() as
> gamma_set func. The tv-out crtc has 1024 element gamma table (with
> 10bit precision) in HW, but current Xorg server does not accept
> anything else but 256 elements so that is used for all CRTCs. The dss
> dispc API converts table of any length for HW and uses linear
> interpolation in the process.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 075f2bb..d5210fe 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -384,6 +384,15 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,
>  
>  	WARN_ON(omap_crtc->vblank_irq.registered);
>  
> +	if (crtc->state->color_mgmt_changed) {
> +		struct drm_color_lut *lut = (struct drm_color_lut *)
> +			crtc->state->gamma_lut->data;

'gamma_lut' here is NULL when removing gamma table, which crashes the
driver at the moment

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

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

      parent reply	other threads:[~2016-05-24 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24  9:16 [PATCH v3 0/3] drm/omapdrm: gamma table support Jyri Sarha
2016-05-24  9:16 ` [PATCH v3 1/3] drm/omapdrm: Add gamma table support to DSS dispc Jyri Sarha
2016-05-24  9:16 ` [PATCH v3 2/3] drm/omapdrm: Workaround for errata i734 (LCD1 Gamma) in " Jyri Sarha
2016-05-24  9:16 ` [PATCH v3 3/3] drm/omapdrm: Implement gamma_lut atomic crtc property Jyri Sarha
2016-05-24 12:15   ` Tomi Valkeinen
2016-05-25  7:00     ` Daniel Vetter
2016-05-24 13:53   ` Tomi Valkeinen [this message]

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=57445CBF.7030303@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peter.ujfalusi@ti.com \
    /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