All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Stefan Agner <stefan@agner.ch>
Cc: jianwei.wang.chn@gmail.com, Meng Yi <meng.yi@nxp.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/fsl-dcu: Implement gamma_lut atomic crtc properties
Date: Thu, 22 Sep 2016 08:29:21 +0200	[thread overview]
Message-ID: <20160922062921.GB22164@dvetter-linux.ger.corp.intel.com> (raw)
In-Reply-To: <5f4840de93ad0049d6b05910a8ebf537@agner.ch>

On Wed, Sep 21, 2016 at 11:10:11AM -0700, Stefan Agner wrote:
> On 2016-09-13 01:49, Meng Yi wrote:
> >> > diff --git a/drivers/gpu/drm/fsl-dcu/Kconfig
> >> > b/drivers/gpu/drm/fsl-dcu/Kconfig index 14a72c4..f9c76b1 100644
> >> > --- a/drivers/gpu/drm/fsl-dcu/Kconfig
> >> > +++ b/drivers/gpu/drm/fsl-dcu/Kconfig
> >> > @@ -11,3 +11,9 @@ config DRM_FSL_DCU
> >> >  	help
> >> >  	  Choose this option if you have an Freescale DCU chipset.
> >> >  	  If M is selected the module will be called fsl-dcu-drm.
> >> > +
> >> > +config DRM_FSL_DCU_GAMMA
> >> > +	bool "Gamma Correction Support for NXP/Freescale DCU"
> >> > +	depends on DRM_FSL_DCU
> >> > +	help
> >> > +	  Enable support for gamma correction.
> >>
> >> What is the reason for making this a configuration option? Are there
> >> implementation without support for the Gamma tables?
> >>
> > When gamma correction is enabled, the color won't display normally since
> > The gamma tables are not filled with correct data. So I give a choice
> > to not using
> > The gamma correction when you don't want to use it.
> > 
> > Should I remove this configuration?
> 
> Yeah making this a compile time configuration seems wrong to me.
> 
> I guess we should fill the table with a reasonable default then. The
> omapdrm driver seems to do something similar.

Yup Kconfig is definitely not the correct way to fix a setup problem in
your driver. Note that even when you enable gamma lut userspace is allowed
to set a NULL table, and in that case you need to either disable the gamma
lut, or fill it with a 1:1 mapping (if you hw doesn't have a disable
flag). At boot-up the table will also be NULL (except when you have
special setup code), and if that results in a black screen your driver is
buggy. Papering over a driver bug with Kconfig is definitely not ok.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-22 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  9:22 [PATCH v3] drm/fsl-dcu: Implement gamma_lut atomic crtc properties Meng Yi
2016-09-07 17:05 ` Stefan Agner
2016-09-08  2:45   ` Meng Yi
2016-09-13  7:02 ` Stefan Agner
2016-09-13  8:49   ` Meng Yi
2016-09-21 18:10     ` Stefan Agner
2016-09-22  6:29       ` Daniel Vetter [this message]
2016-09-26  6:04         ` Meng Yi
2016-09-26  7:59           ` Daniel Vetter
2016-09-26  8:17             ` Ville Syrjälä
2016-09-26 19:33           ` Stefan Agner

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=20160922062921.GB22164@dvetter-linux.ger.corp.intel.com \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jianwei.wang.chn@gmail.com \
    --cc=meng.yi@nxp.com \
    --cc=stefan@agner.ch \
    /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.