All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: tomi.valkeinen@ti.com, dri-devel@lists.freedesktop.org
Subject: Re: [RFC 3/7] drm/omap: Manage the usable omap_dss_device list within omap_drm_private
Date: Mon, 4 Sep 2017 12:19:19 +0300	[thread overview]
Message-ID: <184fce76-f2f9-b85d-13e9-4ef3638be8c3@ti.com> (raw)
In-Reply-To: <3510335.Tu8AiCYPt6@avalon>

Hi Laurent,


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 2017-09-01 14:27, Laurent Pinchart wrote:
>> -static void omap_disconnect_dssdevs(void)
>> +static void omap_disconnect_dssdevs(struct drm_device *ddev)
>>  {
>> -	struct omap_dss_device *dssdev = NULL;
>> +	struct omap_drm_private *priv = ddev->dev_private;
>> +	int i;
>> +
>> +	for (i = 0; i < priv->num_dssdevs; i++) {
> 
> is is never negative, you can make it an unsigned int. This comment applies 
> through the whole patch.

True, are there any benefits to have unsigned int compared to int? I
don't think we are going to hit size limitation with the int, but if you
prefer to have unsigned int, then sure, I can change the num_displays
and 'i's to unsigned.

>>  	crtc_idx = 0;
>>  	plane_idx = 0;
>> -	for_each_dss_dev(dssdev) {
>> +	for (i = 0; i < priv->num_dssdevs; i++) {
>> +		struct omap_dss_device *dssdev = priv->dssdevs[i];
>>  		struct drm_connector *connector;
>>  		struct drm_encoder *encoder;
>>  		struct drm_plane *plane;
>>  		struct drm_crtc *crtc;
>>
>> -		if (!omapdss_device_is_connected(dssdev))
>> -			continue;
>> -
> 
> I believe this hunk is correct as dss devices are only disconnected by calls 
> to the oma_dss_driver .disconnect() operation, which is only called from 
> omap_disconnect_dssdevs(), but you should at the very least explain why in the 
> commit message.

The check became irrelevant as we did not add dssdevs to the array if
their connect failed and as you have said we only disconnect ddsdevs in
omap_disconnect_dssdevs() - in cleanup paths.

I will update the commit message with this information.

- Péter

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

  reply	other threads:[~2017-09-04  9:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29  7:32 [RFC 0/7] drm/omap: Module parameter for display order configuration Peter Ujfalusi
2017-08-29  7:32 ` [RFC 1/7] drm/omap: Use devm_kzalloc() to allocate omap_drm_private Peter Ujfalusi
2017-09-01 11:10   ` Laurent Pinchart
2017-09-04  9:13     ` Peter Ujfalusi
2017-09-04  9:41       ` Laurent Pinchart
2017-09-04 11:16         ` Peter Ujfalusi
2017-09-04 14:19           ` Laurent Pinchart
2017-09-05  6:35             ` Peter Ujfalusi
2017-08-29  7:32 ` [RFC 2/7] drm/omap: Allocate drm_device earlier and unref it as last step Peter Ujfalusi
2017-09-01 11:12   ` Laurent Pinchart
2017-08-29  7:32 ` [RFC 3/7] drm/omap: Manage the usable omap_dss_device list within omap_drm_private Peter Ujfalusi
2017-09-01 11:27   ` Laurent Pinchart
2017-09-04  9:19     ` Peter Ujfalusi [this message]
2017-09-04  9:45       ` Laurent Pinchart
2017-08-29  7:32 ` [RFC 4/7] drm/omap: Separate the dssdevs array setup from the connect function Peter Ujfalusi
2017-08-29  7:32 ` [RFC 5/7] drm/omap: Do dss_device (display) ordering in omap_drv.c Peter Ujfalusi
2017-09-01 11:32   ` Laurent Pinchart
2017-09-04  9:26     ` Peter Ujfalusi
2017-09-04  9:46       ` Laurent Pinchart
2017-08-29  7:32 ` [RFC 6/7] drm/omap: dss: Remove display ordering from dss/display.c Peter Ujfalusi
2017-08-29  7:32 ` [RFC 7/7] drm/omap: Add kernel parameter to specify the desired display order Peter Ujfalusi
2017-09-01 11:36 ` [RFC 0/7] drm/omap: Module parameter for display order configuration Laurent Pinchart
2017-09-04 10:03   ` Peter Ujfalusi
2018-05-25 20:09     ` Laurent Pinchart
2017-10-05  9:56 ` Pekka Paalanen
2017-10-05 10:01   ` Tomi Valkeinen
2017-10-05 10:43     ` Pekka Paalanen
2017-10-05 11:24       ` Tomi Valkeinen
2017-10-05 11:54         ` Pekka Paalanen

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=184fce76-f2f9-b85d-13e9-4ef3638be8c3@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tomi.valkeinen@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 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.