mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
drm/i915: add HAS_ASYNC_FLIPS feature macro
This will be needed in multiple places soon. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/08bf0f72435a4f9acb0ef31b82ca312b048c6bf6.1629721467.git.jani.nikula@intel.com
This commit is contained in:
parent
dc6d6158a6
commit
af182a236a
2 changed files with 4 additions and 7 deletions
|
@ -977,11 +977,6 @@ static unsigned int intel_linear_alignment(const struct drm_i915_private *dev_pr
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool has_async_flips(struct drm_i915_private *i915)
|
||||
{
|
||||
return DISPLAY_VER(i915) >= 5;
|
||||
}
|
||||
|
||||
unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,
|
||||
int color_plane)
|
||||
{
|
||||
|
@ -1015,7 +1010,7 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,
|
|||
case DRM_FORMAT_MOD_LINEAR:
|
||||
return intel_linear_alignment(dev_priv);
|
||||
case I915_FORMAT_MOD_X_TILED:
|
||||
if (has_async_flips(dev_priv))
|
||||
if (HAS_ASYNC_FLIPS(dev_priv))
|
||||
return 256 * 1024;
|
||||
return 0;
|
||||
case I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS:
|
||||
|
@ -12161,7 +12156,7 @@ static void intel_mode_config_init(struct drm_i915_private *i915)
|
|||
|
||||
mode_config->funcs = &intel_mode_funcs;
|
||||
|
||||
mode_config->async_page_flip = has_async_flips(i915);
|
||||
mode_config->async_page_flip = HAS_ASYNC_FLIPS(i915);
|
||||
|
||||
/*
|
||||
* Maximum framebuffer dimensions, chosen to match
|
||||
|
|
|
@ -1721,6 +1721,8 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
|
|||
|
||||
#define HAS_VRR(i915) (GRAPHICS_VER(i915) >= 12)
|
||||
|
||||
#define HAS_ASYNC_FLIPS(i915) (DISPLAY_VER(i915) >= 5)
|
||||
|
||||
/* Only valid when HAS_DISPLAY() is true */
|
||||
#define INTEL_DISPLAY_ENABLED(dev_priv) \
|
||||
(drm_WARN_ON(&(dev_priv)->drm, !HAS_DISPLAY(dev_priv)), !(dev_priv)->params.disable_display)
|
||||
|
|
Loading…
Reference in a new issue