summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-06-15 16:24:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:21:35 -0400
commitd4e13b0db124345be93bc2ff39ecb48409da2c9b (patch)
tree7069fa7fb33b075b02df025e2d7e1dcd208926d7 /drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
parent4e3133c79dc4b7dc0ff81eb884d6cfe736fc49b1 (diff)
drm/amd/display: decouple per-crtc-plane model
Current design has per-crtc-plane model. As a result, for asic's that support underlay, are unable to expose it to user space for modesetting. To enable this, the drm driver intialisation now runs for number of surfaces instead of stream/crtc. This patch plumbs surface capabilities to drm framework so that it can be effectively used by user space. Tests: (On Chromium OS for Stoney Only) * 'modetest -p' now shows additional plane with YUV capabilities in case of CZ and ST. * 'plane_test' fails with below error: [drm:amdgpu_dm_connector_atomic_set_property [amdgpu]] *ERROR* Unsupported screen depth 0 as ther is no support for YUYV * Checked multimonitor display works fine Signed-off-by: Shirish S <shirish.s@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
index e5d2ce48cb1e..362d9559f065 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
@@ -60,6 +60,7 @@ struct amdgpu_hpd;
#define AMDGPU_MAX_HPD_PINS 6
#define AMDGPU_MAX_CRTCS 6
+#define AMDGPU_MAX_PLANES 6
#define AMDGPU_MAX_AFMT_BLOCKS 9
enum amdgpu_rmx_type {
@@ -327,6 +328,7 @@ struct amdgpu_mode_info {
struct card_info *atom_card_info;
bool mode_config_initialized;
struct amdgpu_crtc *crtcs[AMDGPU_MAX_CRTCS];
+ struct amdgpu_plane *planes[AMDGPU_MAX_PLANES];
struct amdgpu_afmt *afmt[AMDGPU_MAX_AFMT_BLOCKS];
/* DVI-I properties */
struct drm_property *coherent_mode_property;
@@ -356,6 +358,7 @@ struct amdgpu_mode_info {
int num_dig; /* number of dig blocks */
int disp_priority;
const struct amdgpu_display_funcs *funcs;
+ enum drm_plane_type *plane_type;
};
#define AMDGPU_MAX_BL_LEVEL 0xFF
@@ -436,6 +439,11 @@ struct amdgpu_crtc {
struct drm_pending_vblank_event *event;
};
+struct amdgpu_plane {
+ struct drm_plane base;
+ enum drm_plane_type plane_type;
+};
+
struct amdgpu_encoder_atom_dig {
bool linkb;
/* atom dig */