static unsigned int intel_fbc_cfb_stride(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
unsigned int stride = intel_fbc_plane_cfb_stride(plane_state);
unsigned int width = drm_rect_width(&plane_state->uapi.src) >> 16;
unsigned int cpp = intel_fbc_cfb_cpp(plane_state);
static unsigned int intel_fbc_cfb_size(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
unsigned int height = drm_rect_height(&plane_state->uapi.src) >> 16;
return _intel_fbc_cfb_size(display, height, intel_fbc_cfb_stride(plane_state));
static u16 intel_fbc_override_cfb_stride(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
unsigned int stride_aligned = intel_fbc_cfb_stride(plane_state);
unsigned int stride = intel_fbc_plane_cfb_stride(plane_state);
const struct drm_framebuffer *fb = plane_state->hw.fb;
static bool stride_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
if (DISPLAY_VER(display) >= 11)
return icl_fbc_stride_is_valid(plane_state);
static bool i8xx_fbc_pixel_format_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
const struct drm_framebuffer *fb = plane_state->hw.fb;
switch (fb->format->format) {
static bool g4x_fbc_pixel_format_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
const struct drm_framebuffer *fb = plane_state->hw.fb;
switch (fb->format->format) {
static bool pixel_format_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
if (DISPLAY_VER(display) >= 35)
return xe3p_lpd_fbc_pixel_format_is_valid(plane_state);
static bool rotation_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
if (DISPLAY_VER(display) >= 9)
return skl_fbc_rotation_is_valid(plane_state);
*/
static bool intel_fbc_surface_size_ok(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
unsigned int effective_w, effective_h, max_w, max_h;
intel_fbc_max_surface_size(display, &max_w, &max_h);
static bool intel_fbc_plane_size_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
unsigned int w, h, max_w, max_h;
intel_fbc_max_plane_size(display, &max_w, &max_h);
static bool tiling_is_valid(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
if (DISPLAY_VER(display) >= 9)
return skl_fbc_tiling_valid(plane_state);
struct intel_crtc *crtc,
struct intel_plane *plane)
{
- struct intel_display *display = to_intel_display(state->base.dev);
+ struct intel_display *display = to_intel_display(state);
const struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
const struct intel_plane_state *plane_state =
static bool intel_fbc_is_fence_ok(const struct intel_plane_state *plane_state)
{
- struct intel_display *display = to_intel_display(plane_state->uapi.plane->dev);
+ struct intel_display *display = to_intel_display(plane_state);
/*
* The use of a CPU fence is one of two ways to detect writes by the
static int intel_fbc_check_plane(struct intel_atomic_state *state,
struct intel_plane *plane)
{
- struct intel_display *display = to_intel_display(state->base.dev);
+ struct intel_display *display = to_intel_display(state);
struct intel_plane_state *plane_state =
intel_atomic_get_new_plane_state(state, plane);
const struct drm_framebuffer *fb = plane_state->hw.fb;
struct intel_crtc *crtc,
struct intel_plane *plane)
{
- struct intel_display *display = to_intel_display(state->base.dev);
+ struct intel_display *display = to_intel_display(state);
struct intel_fbc *fbc = plane->fbc;
bool need_vblank_wait = false;
struct intel_crtc *crtc,
struct intel_plane *plane)
{
- struct intel_display *display = to_intel_display(state->base.dev);
+ struct intel_display *display = to_intel_display(state);
const struct intel_plane_state *plane_state =
intel_atomic_get_new_plane_state(state, plane);
struct intel_fbc *fbc = plane->fbc;
*/
void intel_fbc_disable(struct intel_crtc *crtc)
{
- struct intel_display *display = to_intel_display(crtc->base.dev);
+ struct intel_display *display = to_intel_display(crtc);
struct intel_plane *plane;
for_each_intel_plane(display->drm, plane) {