External email: Use caution opening links or attachments
26.04.2020 05:19, Sowjanya Komatineni ÐÐÑÐÑ:
On 4/25/20 7:10 PM, Dmitry Osipenko wrote:But it is also not the same for older SoCs, correct? All the
External email: Use caution opening links or attachmentsVideo formats which are SoC variants are made soc specific in driver
26.04.2020 04:43, Sowjanya Komatineni ÐÐÑÐÑ:
...
But I don't see where that SoC-dependent definition is made inIt looks to me that at least all those hardcoded HW format IDs do notTPG hard coded formats are supported on prior Tegra.
match the older SoCs.
Other supported formats are SoC dependent and part of soc data in the
driver already.
terga210.c. That tegra_image_format enum looks T210-specific, isn't it?
...
already tegra_vi_soc structure member video_formats
tegra_image_format enum is same for T210 and T186
For T194, enums will be diff and will have diff TEGRA194_VIDEO_FORMAT
using corresponding Tegra194 video format enums
T210-specific things should be separated better, unique parts shouldn't
be kept in the common code.
Hence the tegra_image_format should be renamed to tegra210_image_format
and moved out to t210.h, since it's not common. But then you'll probably
need to rename all TEGRA_ defines to TEGRA210_ to make t210.h reusable
by T186.
Also, in the end it may not worth the effort to share anything at all,
it could be cleaner to have a bit of duplication. Although, I have no
idea how T186 code will look like and what other parts of T210 could be
reused by T186. All this needs to be taken into account in order to
avoid struggling with the code's reshuffling in the future.