mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
radeonsi: gate format and rotate/flip support by VPE version
Determine support for image formats and rotate/flip capabilities based on the detected VPE version. Signed-off-by: Peyton Lee <peytolee@amd.com>
This commit is contained in:
parent
b4dde2ee02
commit
2282220fec
1 changed files with 21 additions and 18 deletions
|
|
@ -80,14 +80,16 @@ static int si_video_get_param(struct pipe_screen *screen, enum pipe_video_profil
|
|||
case PIPE_VIDEO_CAP_VPP_MIN_OUTPUT_HEIGHT:
|
||||
return 16;
|
||||
case PIPE_VIDEO_CAP_VPP_ORIENTATION_MODES:
|
||||
/* VPE 1st generation does not support orientation
|
||||
* Have to determine the version and features of VPE in future.
|
||||
*/
|
||||
if (sscreen->info.vpe_ip_version == VPE_2_0)
|
||||
return (PIPE_VIDEO_VPP_ROTATION_90 |
|
||||
PIPE_VIDEO_VPP_ROTATION_180 |
|
||||
PIPE_VIDEO_VPP_ROTATION_270 |
|
||||
PIPE_VIDEO_VPP_FLIP_HORIZONTAL |
|
||||
PIPE_VIDEO_VPP_FLIP_VERTICAL);
|
||||
return PIPE_VIDEO_VPP_FLIP_HORIZONTAL;
|
||||
case PIPE_VIDEO_CAP_VPP_BLEND_MODES:
|
||||
/* VPE 1st generation does not support blending.
|
||||
* Have to determine the version and features of VPE in future.
|
||||
*/
|
||||
if (sscreen->info.vpe_ip_version == VPE_2_0)
|
||||
return PIPE_VIDEO_VPP_BLEND_MODE_GLOBAL_ALPHA;
|
||||
return PIPE_VIDEO_VPP_BLEND_MODE_NONE;
|
||||
case PIPE_VIDEO_CAP_PREFERRED_FORMAT:
|
||||
return PIPE_FORMAT_NV12;
|
||||
|
|
@ -511,20 +513,21 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for
|
|||
{
|
||||
struct si_screen *sscreen = (struct si_screen *)screen;
|
||||
|
||||
if (sscreen->info.ip[AMD_IP_VPE].num_queues && entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) {
|
||||
/* Todo:
|
||||
* Unable to confirm whether it is asking for an input or output type
|
||||
* Have to modify va frontend for solving this problem
|
||||
if (entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING && sscreen->info.vpe_ip_version != VPE_UNKNOWN) {
|
||||
/* VPE_2_0 is expected to also support
|
||||
* 8-bit alpha plane, floating RGBA (16-bit),
|
||||
* but these are not included here because current VA frontends do not support them.
|
||||
*/
|
||||
/* VPE Supported input type */
|
||||
if ((format == PIPE_FORMAT_NV12) || (format == PIPE_FORMAT_NV21) || (format == PIPE_FORMAT_P010))
|
||||
return true;
|
||||
if (sscreen->info.vpe_ip_version == VPE_2_0)
|
||||
if ((format == PIPE_FORMAT_P012) ||
|
||||
(format == PIPE_FORMAT_YUYV) || (format == PIPE_FORMAT_UYVY))
|
||||
return true;
|
||||
|
||||
/* VPE Supported output type */
|
||||
if ((format == PIPE_FORMAT_A8R8G8B8_UNORM) || (format == PIPE_FORMAT_A8B8G8R8_UNORM) || (format == PIPE_FORMAT_R8G8B8A8_UNORM) ||
|
||||
(format == PIPE_FORMAT_B8G8R8A8_UNORM) || (format == PIPE_FORMAT_X8R8G8B8_UNORM) || (format == PIPE_FORMAT_X8B8G8R8_UNORM) ||
|
||||
(format == PIPE_FORMAT_R8G8B8X8_UNORM) || (format == PIPE_FORMAT_B8G8R8X8_UNORM) || (format == PIPE_FORMAT_A2R10G10B10_UNORM) ||
|
||||
(format == PIPE_FORMAT_A2B10G10R10_UNORM) || (format == PIPE_FORMAT_B10G10R10A2_UNORM) || (format == PIPE_FORMAT_R10G10B10A2_UNORM))
|
||||
if ((format == PIPE_FORMAT_NV12) || (format == PIPE_FORMAT_P010) ||
|
||||
(format == PIPE_FORMAT_A8R8G8B8_UNORM) || (format == PIPE_FORMAT_A8B8G8R8_UNORM) ||
|
||||
(format == PIPE_FORMAT_R8G8B8A8_UNORM) || (format == PIPE_FORMAT_B8G8R8A8_UNORM) ||
|
||||
(format == PIPE_FORMAT_R8G8B8X8_UNORM) || (format == PIPE_FORMAT_B8G8R8X8_UNORM) ||
|
||||
(format == PIPE_FORMAT_B10G10R10A2_UNORM) || (format == PIPE_FORMAT_R10G10B10A2_UNORM))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue