Re: drm/exynos: getting the video processor to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2015년 04월 22일 15: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.
> 
>>
>> 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

Sorry, there was my mistake. Packed YUV format means Y/Cb/Cr values are
packed with one pixel.

> 
>> 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.

So in case of Exynos, we identify that image data is NVXX format or
NVXXM according to that whether having separated buffers or not. For
this, we had already have a discussion before. I really forgot it.

> 
>>
>> 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.

So Joonyoung is right. we should consider two cases. One is the case of
using one buffer and other is the case of using two buffers case.

Thanks,
Inki Dae

> 
> We would need to make Exynos drivers suitable to fourcc.
> 
> Thanks,
> Inki Dae
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux