dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCHv2 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver
Date: Wed, 25 May 2016 12:26:59 +0200	[thread overview]
Message-ID: <1464172019.3545.50.camel@pengutronix.de> (raw)
In-Reply-To: <20160525081157.67f51dd5@ipc1.ka-ro>

Am Mittwoch, den 25.05.2016, 08:11 +0200 schrieb Lothar Waßmann:
[...]
> > > @@ -81,10 +87,27 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
> > >  
> > >  	if (np) {
> > >  		struct drm_display_mode *mode = drm_mode_create(connector->dev);
> > > +		struct videomode vm;
> > > +		int ret;
> > >  
> > >  		if (!mode)
> > >  			return -EINVAL;
> > > -		of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE);
> > > +
> > > +		ret = of_get_videomode(np, &vm, OF_USE_NATIVE_MODE);
> > > +		if (ret)
> > > +			return ret;
> > > +		drm_display_mode_from_videomode(&vm, &imxpd->mode);
> > > +		drm_mode_debug_printmodeline(&imxpd->mode);
> > > +
> > > +		if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
> > > +			imxpd->bus_flags |= DRM_BUS_FLAG_PIXDATA_POSEDGE;
> > > +		if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
> > > +			imxpd->bus_flags |= DRM_BUS_FLAG_PIXDATA_NEGEDGE;
> > > +
> > > +		if (vm.flags & DISPLAY_FLAGS_DE_LOW)
> > > +			imxpd->bus_flags |= DRM_BUS_FLAG_DE_LOW;
> > > +		if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
> > > +			imxpd->bus_flags |= DRM_BUS_FLAG_DE_HIGH;
> > 
> > This could be shared between ldb and parallel drivers if you extended
> > of_get_drm_display_mode to also return bus_flags, for example. The flags
> > translation could be put into a drm_bus_flags_from_videomode helper.
> > 
> I had that in mind also, but hesitated to change the generic
> of_get_drm_display_mode() to implement some i.MX specific functionality.

Since the videomode obtained from DT includes both the timing and pin
polarity information, and the drm way to express these are
drm_display_mode and bus_flags, respectively, there's nothing i.MX
specific about this.

regards
Philipp

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

  reply	other threads:[~2016-05-25 10:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 13:34 [PATCH 0/3] drm/imx: convey the pixelclk-active and de-active flags to the ipu-di driver Lothar Waßmann
2016-05-20 13:34 ` [PATCH 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT Lothar Waßmann
2016-05-20 13:34 ` [PATCH 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-20 14:31   ` Philipp Zabel
2016-05-20 13:34 ` [PATCH 3/3] drm/imx: remove dead code Lothar Waßmann
2016-05-24  6:31 ` [PATCHv2 0/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-24  6:31   ` [PATCHv2 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT Lothar Waßmann
2016-05-24  6:31   ` [PATCHv2 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-24 14:16     ` Philipp Zabel
2016-05-25  6:11       ` Lothar Waßmann
2016-05-25 10:26         ` Philipp Zabel [this message]
2016-05-24  6:31   ` [PATCHv2 3/3] drm/imx: remove dead code Lothar Waßmann

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=1464172019.3545.50.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=LW@KARO-electronics.de \
    --cc=dri-devel@lists.freedesktop.org \
    --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;
as well as URLs for NNTP newsgroup(s).