mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/i915/sprite: convert intel_sprite_uapi.c to struct intel_display
Going forward, struct intel_display is the main display device data pointer. Convert intel_sprite_uapi.c to struct intel_display. Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://lore.kernel.org/r/d4f71c2976a1a28b4e74c2fc1097090fe7f78743.1744222449.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -3,21 +3,21 @@
|
||||
* Copyright © 2023 Intel Corporation
|
||||
*/
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "intel_crtc.h"
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_sprite_uapi.h"
|
||||
|
||||
static bool has_dst_key_in_primary_plane(struct drm_i915_private *dev_priv)
|
||||
static bool has_dst_key_in_primary_plane(struct intel_display *display)
|
||||
{
|
||||
return DISPLAY_VER(dev_priv) >= 9;
|
||||
return DISPLAY_VER(display) >= 9;
|
||||
}
|
||||
|
||||
static void intel_plane_set_ckey(struct intel_plane_state *plane_state,
|
||||
const struct drm_intel_sprite_colorkey *set)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(plane_state);
|
||||
struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
|
||||
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
|
||||
struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
|
||||
|
||||
*key = *set;
|
||||
@@ -34,7 +34,7 @@ static void intel_plane_set_ckey(struct intel_plane_state *plane_state,
|
||||
* On SKL+ we want dst key enabled on
|
||||
* the primary and not on the sprite.
|
||||
*/
|
||||
if (DISPLAY_VER(dev_priv) >= 9 && plane->id != PLANE_PRIMARY &&
|
||||
if (DISPLAY_VER(display) >= 9 && plane->id != PLANE_PRIMARY &&
|
||||
set->flags & I915_SET_COLORKEY_DESTINATION)
|
||||
key->flags = 0;
|
||||
}
|
||||
@@ -43,7 +43,6 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(dev);
|
||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||
struct drm_intel_sprite_colorkey *set = data;
|
||||
struct drm_plane *plane;
|
||||
struct drm_plane_state *plane_state;
|
||||
@@ -61,7 +60,7 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
|
||||
if ((set->flags & (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE)) == (I915_SET_COLORKEY_DESTINATION | I915_SET_COLORKEY_SOURCE))
|
||||
return -EINVAL;
|
||||
|
||||
if ((IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) &&
|
||||
if ((display->platform.valleyview || display->platform.cherryview) &&
|
||||
set->flags & I915_SET_COLORKEY_DESTINATION)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -74,7 +73,7 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
|
||||
* Also multiple planes can't do destination keying on the same
|
||||
* pipe simultaneously.
|
||||
*/
|
||||
if (DISPLAY_VER(dev_priv) >= 9 &&
|
||||
if (DISPLAY_VER(display) >= 9 &&
|
||||
to_intel_plane(plane)->id >= PLANE_3 &&
|
||||
set->flags & I915_SET_COLORKEY_DESTINATION)
|
||||
return -EINVAL;
|
||||
@@ -99,7 +98,7 @@ int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data,
|
||||
* On some platforms we have to configure
|
||||
* the dst colorkey on the primary plane.
|
||||
*/
|
||||
if (!ret && has_dst_key_in_primary_plane(dev_priv)) {
|
||||
if (!ret && has_dst_key_in_primary_plane(display)) {
|
||||
struct intel_crtc *crtc =
|
||||
intel_crtc_for_pipe(display,
|
||||
to_intel_plane(plane)->pipe);
|
||||
|
||||
Reference in New Issue
Block a user