|
@@ -41,20 +41,6 @@
|
|
#include <drm/i915_drm.h>
|
|
#include <drm/i915_drm.h>
|
|
#include "i915_drv.h"
|
|
#include "i915_drv.h"
|
|
|
|
|
|
-bool intel_format_is_yuv(u32 format)
|
|
|
|
-{
|
|
|
|
- switch (format) {
|
|
|
|
- case DRM_FORMAT_YUYV:
|
|
|
|
- case DRM_FORMAT_UYVY:
|
|
|
|
- case DRM_FORMAT_VYUY:
|
|
|
|
- case DRM_FORMAT_YVYU:
|
|
|
|
- case DRM_FORMAT_NV12:
|
|
|
|
- return true;
|
|
|
|
- default:
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
|
|
int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode,
|
|
int usecs)
|
|
int usecs)
|
|
{
|
|
{
|
|
@@ -404,7 +390,7 @@ chv_update_csc(const struct intel_plane_state *plane_state)
|
|
const s16 *csc = csc_matrix[plane_state->base.color_encoding];
|
|
const s16 *csc = csc_matrix[plane_state->base.color_encoding];
|
|
|
|
|
|
/* Seems RGB data bypasses the CSC always */
|
|
/* Seems RGB data bypasses the CSC always */
|
|
- if (!intel_format_is_yuv(fb->format->format))
|
|
|
|
|
|
+ if (!fb->format->is_yuv)
|
|
return;
|
|
return;
|
|
|
|
|
|
I915_WRITE_FW(SPCSCYGOFF(plane_id), SPCSC_OOFF(0) | SPCSC_IOFF(0));
|
|
I915_WRITE_FW(SPCSCYGOFF(plane_id), SPCSC_OOFF(0) | SPCSC_IOFF(0));
|
|
@@ -439,7 +425,7 @@ vlv_update_clrc(const struct intel_plane_state *plane_state)
|
|
enum plane_id plane_id = plane->id;
|
|
enum plane_id plane_id = plane->id;
|
|
int contrast, brightness, sh_scale, sh_sin, sh_cos;
|
|
int contrast, brightness, sh_scale, sh_sin, sh_cos;
|
|
|
|
|
|
- if (intel_format_is_yuv(fb->format->format) &&
|
|
|
|
|
|
+ if (fb->format->is_yuv &&
|
|
plane_state->base.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
|
|
plane_state->base.color_range == DRM_COLOR_YCBCR_LIMITED_RANGE) {
|
|
/*
|
|
/*
|
|
* Expand limited range to full range:
|
|
* Expand limited range to full range:
|
|
@@ -1040,7 +1026,7 @@ intel_check_sprite_plane(struct intel_plane *plane,
|
|
src->y1 = src_y << 16;
|
|
src->y1 = src_y << 16;
|
|
src->y2 = (src_y + src_h) << 16;
|
|
src->y2 = (src_y + src_h) << 16;
|
|
|
|
|
|
- if (intel_format_is_yuv(fb->format->format) &&
|
|
|
|
|
|
+ if (fb->format->is_yuv &&
|
|
fb->format->format != DRM_FORMAT_NV12 &&
|
|
fb->format->format != DRM_FORMAT_NV12 &&
|
|
(src_x % 2 || src_w % 2)) {
|
|
(src_x % 2 || src_w % 2)) {
|
|
DRM_DEBUG_KMS("src x/w (%u, %u) must be a multiple of 2 for YUV planes\n",
|
|
DRM_DEBUG_KMS("src x/w (%u, %u) must be a multiple of 2 for YUV planes\n",
|