From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
To: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: Re: drm/exynos: getting the video processor to work
Date: Wed, 22 Apr 2015 14:23:40 +0200 [thread overview]
Message-ID: <6af982f487367524dd6ff38bd6746ae6@math.uni-bielefeld.de> (raw)
In-Reply-To: <5537398B.3080607@samsung.com>
Hello Inki and Joonyoung,
On 2015-04-22 08:02, Inki Dae wrote:
> On 2015년 04월 22일 10:55, Joonyoung Shim wrote:
>> Hi Tobias,
>>
>> On 04/21/2015 06:30 AM, Tobias Jakobi wrote:
>>> Hello,
>>>
>>> I've spend some time on figuring out how to use the VP on my
>>> Exynos4412.
>>> I noticed that currently it seems to be pretty broken (I've put a
>>> full
>>> crashlog with drm.debug=0xff at the end).
>>>
>>> As far as I can see, the problem stems from conflicting buffer counts
>>> in
>>> the driver.
>>>
>>> Let's start with vp_video_buffer(), there buf_num gets set to '2'
>>> when
>>> DRM_FORMAT_NV12 is encountered as pixelformat. Which results in the
>>> VP
>>> reading luma data from the plane's dma_addr[0] and chroma from
>>> dma_addr[1].
>>>
>>> But dma_addr[1] is never correctly set. It should be set by
>>> exynos_check_plane(), but the loop only does one iteration since
>>> exynos_drm_fb_get_buf_cnt() returns 1.
>>>
>>> Which is due to special case handling in
>>> exynos_drm_format_num_buffers(). At least for the buffers that
>>> libdrm's
>>> modetest creates this case handling triggers and reduces buffer count
>>> to
>>> '1'.
>>>
>>
>> This is just pixel format issue and mixer driver is not completed
>> about
>> that. The exynos mixer can support two NV12 formats.
>
> To clarify it, NV12 and other NVXX formats have only two planes.
That was also my impression. NV12 and NV21 are always bi-planar, with
the only difference that NV21 has U/V order reversed (when comparing it
to NV12). There is no uni-planar NV12/NV21. See also:
https://wiki.videolan.org/YUV#NV12.2FNV21
>> First, NV12 format having just one buffer(Y plane and CbCr plane use a
>> same buffer but differ their start index.)
>
> So it is called packed YUV format and drm_fourcc header defines these
> formats as follows,
>
> DRM_FORMAT_YUYV
> DRM_FORMAT_YVYU
> DRM_FORMAT_UYVY
> DRM_FORMAT_VYUY
> DRM_FORMAT_AYUV
I'd like to know if any other formats except for NV12/NV21 are really
supported by the video processor? Because I don't see any indication for
that. It's just NV12/NV21 and the tiled variants, which are there to
make it easier to handle data from the MFC block.
>> Second, NV12 format having split two buffers(one is for Y plane, other
>> is for CbCr plane)
>
> All NVXX formats should be considered only for separated two buffers.
Does is even make any difference for the VP if luma and chroma are in
different buffers or in a single one, just with an offset between
luma/chroma? I think not, because the VP just gets a dma_addr for both
and then fetches data from that position.
>> Current mixer driver considers only second NV12 format, we can know it
>> from following comment in mixer driver.
>>
>> /* TODO: single buffer format NV12, NV21 */
>
> So, it seems like wrong comment. Until now, it seems that we have been
> calling the packed YUV format as NVXX format and calling the NVXX
> format
> as NVXXM. And Exynos SoC have even NVXXMT whose format consists into
> many macro blocks and which has separated two buffers.
I think getting just regular (un-tiled) NV12/NV21 working should come
first, then we can think about how to handle the tiled formats (probably
with the newly introduced fb modifiers).
I've patched the mixer so that it passes valid pointers for luma/chroma
but I still get a crash (sysmmu) sooner or later. So there seems to be
more issues than just this pixelformat/buffercount one.
> We would need to make Exynos drivers suitable to fourcc.
>
> Thanks,
> Inki Dae
With best wishes,
Tobias
next prev parent reply other threads:[~2015-04-22 12:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 21:30 drm/exynos: getting the video processor to work Tobias Jakobi
2015-04-22 1:55 ` Joonyoung Shim
2015-04-22 6:02 ` Inki Dae
2015-04-22 6:45 ` Inki Dae
2015-04-22 12:23 ` Tobias Jakobi [this message]
2015-04-22 14:26 ` Inki Dae
2015-04-22 14:56 ` Tobias Jakobi
2015-04-22 23:57 ` Joonyoung Shim
2015-04-23 12:02 ` Tobias Jakobi
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=6af982f487367524dd6ff38bd6746ae6@math.uni-bielefeld.de \
--to=tjakobi@math.uni-bielefeld.de \
--cc=gustavo.padovan@collabora.co.uk \
--cc=inki.dae@samsung.com \
--cc=jy0922.shim@samsung.com \
--cc=linux-samsung-soc@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