diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-06 14:49:24 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-12 18:24:28 +0200 |
commit | 49f98bc4d44a4ee507737f8d5531d05539787319 (patch) | |
tree | f450326225bb4215a191bf10170cbbbae8b87b04 /drivers/gpu/drm/imx/imx-drm.h | |
parent | e41c5c2411bca56775663a4153e0c00ea8c8f130 (diff) | |
download | linux-stable-49f98bc4d44a4ee507737f8d5531d05539787319.tar.gz linux-stable-49f98bc4d44a4ee507737f8d5531d05539787319.tar.bz2 linux-stable-49f98bc4d44a4ee507737f8d5531d05539787319.zip |
drm/imx: store internal bus configuration in crtc state
The internal bus configuration is imx-drm specific crtc state. Store it
in imx_crtc_state and let the encoder atomic_check callbacks determine
bus_flags, bus_format and the sync pins, possibly taking into account
the mode and the connector display info.
The custom imx_drm_encoder structure can be replaced again with
drm_encoder.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-drm.h')
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm.h b/drivers/gpu/drm/imx/imx-drm.h index 39cef15c699b..07d33e45f90f 100644 --- a/drivers/gpu/drm/imx/imx-drm.h +++ b/drivers/gpu/drm/imx/imx-drm.h @@ -15,15 +15,18 @@ struct platform_device; unsigned int imx_drm_crtc_id(struct imx_drm_crtc *crtc); -struct imx_drm_encoder { - struct drm_encoder encoder; +struct imx_crtc_state { + struct drm_crtc_state base; u32 bus_format; u32 bus_flags; int di_hsync_pin; int di_vsync_pin; }; -#define enc_to_imx_enc(x) container_of(x, struct imx_drm_encoder, encoder) +static inline struct imx_crtc_state *to_imx_crtc_state(struct drm_crtc_state *s) +{ + return container_of(s, struct imx_crtc_state, base); +} struct imx_drm_crtc_helper_funcs { int (*enable_vblank)(struct drm_crtc *crtc); |