From: Lars-Peter Clausen <lars@metafoo.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: kernel@pengutronix.de,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org, Rob Clark <rob.clark@linaro.org>
Subject: Re: [PATCH v2] DRM: Add DRM kms/fb cma helper
Date: Mon, 04 Jun 2012 10:55:11 +0200 [thread overview]
Message-ID: <4FCC77EF.2020404@metafoo.de> (raw)
In-Reply-To: <20120531181116.GW30400@pengutronix.de>
On 05/31/2012 08:11 PM, Sascha Hauer wrote:
> On Thu, May 31, 2012 at 11:34:37AM +0200, Lars-Peter Clausen wrote:
>>>> + drm_helper_mode_fill_fb_struct(&fb_cma->fb, mode_cmd);
>>>> +
>>>> + for (i = 0; i < num_planes; i++)
>>>> + fb_cma->obj[i] = obj[i];
>>>
>>> Check for valid num_planes before this loop?
>>>
>>
>> Hm, I think the callers already take care of this. drm_format_num_planes will
>> always return a valid number and the other caller passes 1 unconditionally.
>
> As long as the array always is big enough to hold the maximum number of
> planes I think it's fine. However, if there is some format with 5 planes
> (don't know if there is, I only know yuv with multiple planes) it's not
> obvious that this code does not support this.
The DRM ABI limits the number of planes to 4. But adding a global
DRM_MAX_PLANES is probably a good idea to avoid surprises if this ever changes.
prev parent reply other threads:[~2012-06-04 8:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 15:30 [PATCH v2] DRM: Add DRM kms/fb cma helper Lars-Peter Clausen
2012-05-31 8:13 ` Sascha Hauer
2012-05-31 9:34 ` Lars-Peter Clausen
2012-05-31 18:11 ` Sascha Hauer
2012-06-04 8:55 ` Lars-Peter Clausen [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=4FCC77EF.2020404@metafoo.de \
--to=lars@metafoo.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=rob.clark@linaro.org \
--cc=s.hauer@pengutronix.de \
/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.