#include <linux/string_helpers.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_blend.h>
#include <drm/drm_color_mgmt.h>
#include <drm/drm_fourcc.h>
#include <drm/drm_rect.h>
#include "i915_drv.h"
#include "i9xx_plane.h"
#include "intel_atomic_plane.h"
#include "intel_de.h"
#include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_frontbuffer.h"
#include "intel_sprite.h"
#include "intel_sprite_regs.h"
static char sprite_name(struct intel_display *display, enum pipe pipe, int sprite)
{ … }
static void i9xx_plane_linear_gamma(u16 gamma[8])
{ … }
static void
chv_sprite_update_csc(const struct intel_plane_state *plane_state)
{ … }
#define SIN_0 …
#define COS_0 …
static void
vlv_sprite_update_clrc(const struct intel_plane_state *plane_state)
{ … }
static void
vlv_plane_ratio(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state,
unsigned int *num, unsigned int *den)
{ … }
int vlv_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static unsigned int vlv_sprite_min_alignment(struct intel_plane *plane,
const struct drm_framebuffer *fb,
int color_plane)
{ … }
static u32 vlv_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
{ … }
static u32 vlv_sprite_ctl(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void vlv_sprite_update_gamma(const struct intel_plane_state *plane_state)
{ … }
static void
vlv_sprite_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
vlv_sprite_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
vlv_sprite_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{ … }
static bool
vlv_sprite_get_hw_state(struct intel_plane *plane,
enum pipe *pipe)
{ … }
static void ivb_plane_ratio(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state,
unsigned int *num, unsigned int *den)
{ … }
static void ivb_plane_ratio_scaling(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state,
unsigned int *num, unsigned int *den)
{ … }
int ivb_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static int ivb_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void hsw_plane_ratio(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state,
unsigned int *num, unsigned int *den)
{ … }
int hsw_plane_min_cdclk(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static u32 ivb_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
{ … }
static bool ivb_need_sprite_gamma(const struct intel_plane_state *plane_state)
{ … }
static u32 ivb_sprite_ctl(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void ivb_sprite_linear_gamma(const struct intel_plane_state *plane_state,
u16 gamma[18])
{ … }
static void ivb_sprite_update_gamma(const struct intel_plane_state *plane_state)
{ … }
static void
ivb_sprite_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
ivb_sprite_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
ivb_sprite_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{ … }
static bool
ivb_sprite_get_hw_state(struct intel_plane *plane,
enum pipe *pipe)
{ … }
static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static unsigned int
g4x_sprite_max_stride(struct intel_plane *plane,
u32 pixel_format, u64 modifier,
unsigned int rotation)
{ … }
static unsigned int
hsw_sprite_max_stride(struct intel_plane *plane,
u32 pixel_format, u64 modifier,
unsigned int rotation)
{ … }
static unsigned int g4x_sprite_min_alignment(struct intel_plane *plane,
const struct drm_framebuffer *fb,
int color_plane)
{ … }
static u32 g4x_sprite_ctl_crtc(const struct intel_crtc_state *crtc_state)
{ … }
static u32 g4x_sprite_ctl(const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void g4x_sprite_update_gamma(const struct intel_plane_state *plane_state)
{ … }
static void ilk_sprite_linear_gamma(u16 gamma[17])
{ … }
static void ilk_sprite_update_gamma(const struct intel_plane_state *plane_state)
{ … }
static void
g4x_sprite_update_noarm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
g4x_sprite_update_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state,
const struct intel_plane_state *plane_state)
{ … }
static void
g4x_sprite_disable_arm(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{ … }
static bool
g4x_sprite_get_hw_state(struct intel_plane *plane,
enum pipe *pipe)
{ … }
static bool g4x_fb_scalable(const struct drm_framebuffer *fb)
{ … }
static int
g4x_sprite_check_scaling(struct intel_crtc_state *crtc_state,
struct intel_plane_state *plane_state)
{ … }
static int
g4x_sprite_check(struct intel_crtc_state *crtc_state,
struct intel_plane_state *plane_state)
{ … }
int chv_plane_check_rotation(const struct intel_plane_state *plane_state)
{ … }
static int
vlv_sprite_check(struct intel_crtc_state *crtc_state,
struct intel_plane_state *plane_state)
{ … }
static const u32 g4x_sprite_formats[] = …;
static const u32 snb_sprite_formats[] = …;
static const u32 vlv_sprite_formats[] = …;
static const u32 chv_pipe_b_sprite_formats[] = …;
static bool g4x_sprite_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier)
{ … }
static bool snb_sprite_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier)
{ … }
static bool vlv_sprite_format_mod_supported(struct drm_plane *_plane,
u32 format, u64 modifier)
{ … }
static const struct drm_plane_funcs g4x_sprite_funcs = …;
static const struct drm_plane_funcs snb_sprite_funcs = …;
static const struct drm_plane_funcs vlv_sprite_funcs = …;
struct intel_plane *
intel_sprite_plane_create(struct drm_i915_private *dev_priv,
enum pipe pipe, int sprite)
{ … }