diff options
author | Shirish S <shirish.s@amd.com> | 2017-03-23 14:54:40 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 17:21:46 -0400 |
commit | 64d8b7806e40a1520d5eb47157ff4ee15efc3bf6 (patch) | |
tree | 0bd7b04a36699ad219b125440f64beda455b8bbb /drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | |
parent | f2a0f5e6b23d6649577081df3762e41abee04691 (diff) |
drm/amd/display: update plane functionalities
This patch introduces amdgpu_drm_plane_state
structure, which subclasses drm_plane_state and
holds data suitable for configuring hardware.
It switches reset(), atomic_duplicate_state()
& atomic_destroy_state() functions to new internal
implementation, earlier they were pointing to
drm core functions.
TESTS(On Chromium OS on Stoney Only)
* Builds without compilation errors.
* 'plane_test' passes for XR24 format
based Overlay plane.
* Chromium OS ui comes up.
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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h index 362d9559f065..bdae70e128c4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h @@ -57,6 +57,7 @@ struct amdgpu_hpd; #define to_amdgpu_connector(x) container_of(x, struct amdgpu_connector, base) #define to_amdgpu_encoder(x) container_of(x, struct amdgpu_encoder, base) #define to_amdgpu_framebuffer(x) container_of(x, struct amdgpu_framebuffer, base) +#define to_amdgpu_plane(x) container_of(x, struct amdgpu_plane, base) #define AMDGPU_MAX_HPD_PINS 6 #define AMDGPU_MAX_CRTCS 6 @@ -439,6 +440,18 @@ struct amdgpu_crtc { struct drm_pending_vblank_event *event; }; +struct amdgpu_drm_plane_state { + struct drm_plane_state base; + unsigned int h_ratio; + unsigned int v_ratio; +}; + +static inline struct amdgpu_drm_plane_state * +to_amdgpu_plane_state(struct drm_plane_state *state) +{ + return container_of(state, struct amdgpu_drm_plane_state, base); +} + struct amdgpu_plane { struct drm_plane base; enum drm_plane_type plane_type; |