Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326232

Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk polarity

From Stefan Agner <stefan@agner.ch>
Newsgroups linux.kernel
Subject Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk polarity
Date 2016-02-04 00:40 +0100
Message-ID <qYfbK-uu-71@gated-at.bofh.it> (permalink)
References <qwnsl-3hD-3@gated-at.bofh.it> <qwnsl-3hD-1@gated-at.bofh.it> <qVKOK-4TF-3@gated-at.bofh.it> <qY6i7-2YF-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016-02-03 06:04, Thierry Reding wrote:
> On Wed, Jan 27, 2016 at 06:46:50PM -0800, Stefan Agner wrote:
> [...]
>> On 2015-11-18 18:42, Stefan Agner wrote:
> [...]
>> > diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
> [...]
>> > @@ -89,6 +91,15 @@ static void fsl_dcu_drm_crtc_mode_set_nofb(struct
>> > drm_crtc *crtc)
>> >  	vfp = mode->vsync_start - mode->vdisplay;
>> >  	vsw = mode->vsync_end - mode->vsync_start;
>> >
>> > +	if (!(mode->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE))
>> > +		pol |= DCU_SYN_POL_INV_PXCK_FALL;
>> > +
>> > +	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
>> > +		pol |= DCU_SYN_POL_INV_HS_LOW;
>> > +
>> > +	if (mode->flags & DRM_MODE_FLAG_NHSYNC)
>> > +		pol |= DCU_SYN_POL_INV_VS_LOW;
> 
> I suspect that you want to check for DRM_MODE_FLAG_NVSYNC here instead.
> 

Ups, yes.

>> > diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>> > b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>> > index 6413ac9..2a724f3 100644
>> > --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>> > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>> > @@ -47,8 +47,8 @@
>> >  #define DCU_VSYN_PARA_FP(x)		(x)
>> >
>> >  #define DCU_SYN_POL			0x0024
>> > -#define DCU_SYN_POL_INV_PXCK_FALL	(0 << 6)
>> > -#define DCU_SYN_POL_NEG_REMAIN		(0 << 5)
>> > +#define DCU_SYN_POL_INV_PXCK_FALL	BIT(6)
>> > +#define DCU_SYN_POL_NEG_REMAIN		BIT(5)
> 
> I don't understand these changes. You're in fact changing the values for
> these defines, but it's not mentioned in the commit message. It also
> seems like it should be a separate patch because it isn't related to the
> mode flags changes in the remainder of the patch.

Yes, in order to set them, I need them to be positive, there is no use
if they are zero... They haven't been used at all so far, so there is no
issue in changing their value. Just realized that their naming is
actually related to the 0 value, so I probably should rename them to
just reflect the field name

#define DCU_SYN_POL_INV_PXCK	BIT(6)
#define DCU_SYN_POL_NEG		BIT(5)

--
Stefan

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Stefan Agner <stefan@agner.ch> - 2016-01-28 03:50 +0100
  Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Thierry Reding <thierry.reding@gmail.com> - 2016-02-03 15:10 +0100
    Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Stefan Agner <stefan@agner.ch> - 2016-02-04 00:30 +0100
      Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Stefan Agner <stefan@agner.ch> - 2016-02-04 21:40 +0100
  Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Thierry Reding <thierry.reding@gmail.com> - 2016-02-03 15:10 +0100
    Re: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk  polarity Stefan Agner <stefan@agner.ch> - 2016-02-04 00:40 +0100

csiph-web