Commit 7ffb0781 authored by Ilia Mirkin's avatar Ilia Mirkin Committed by Ben Skeggs

drm/nv10/plane: add YUYV support

Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a5540906
...@@ -58,6 +58,7 @@ struct nouveau_plane { ...@@ -58,6 +58,7 @@ struct nouveau_plane {
}; };
static uint32_t formats[] = { static uint32_t formats[] = {
DRM_FORMAT_YUYV,
DRM_FORMAT_UYVY, DRM_FORMAT_UYVY,
DRM_FORMAT_NV12, DRM_FORMAT_NV12,
}; };
...@@ -140,10 +141,10 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, ...@@ -140,10 +141,10 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
nv_wr32(dev, NV_PVIDEO_POINT_OUT(flip), crtc_y << 16 | crtc_x); nv_wr32(dev, NV_PVIDEO_POINT_OUT(flip), crtc_y << 16 | crtc_x);
nv_wr32(dev, NV_PVIDEO_SIZE_OUT(flip), crtc_h << 16 | crtc_w); nv_wr32(dev, NV_PVIDEO_SIZE_OUT(flip), crtc_h << 16 | crtc_w);
if (fb->pixel_format == DRM_FORMAT_NV12) { if (fb->pixel_format != DRM_FORMAT_UYVY)
format |= NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8; format |= NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8;
if (fb->pixel_format == DRM_FORMAT_NV12)
format |= NV_PVIDEO_FORMAT_PLANAR; format |= NV_PVIDEO_FORMAT_PLANAR;
}
if (nv_plane->iturbt_709) if (nv_plane->iturbt_709)
format |= NV_PVIDEO_FORMAT_MATRIX_ITURBT709; format |= NV_PVIDEO_FORMAT_MATRIX_ITURBT709;
if (nv_plane->colorkey & (1 << 24)) if (nv_plane->colorkey & (1 << 24))
...@@ -266,7 +267,7 @@ nv10_overlay_init(struct drm_device *device) ...@@ -266,7 +267,7 @@ nv10_overlay_init(struct drm_device *device)
case 0x15: case 0x15:
case 0x1a: case 0x1a:
case 0x20: case 0x20:
num_formats = 1; num_formats = 2;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment