drm/mgag200: Introduce custom CRTC state

Inherit from struct drm_crtc_state by embeding it and providing the
rsp callbacks for simple-kms helpers. No functional changes.

The new state struct mgag200_crtc_state will hold PLL values for modeset
operations.

v2:
	* move the simple-kms changes into a separate patch (Sam)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210714142240.21979-13-tzimmermann@suse.de
This commit is contained in:
Thomas Zimmermann
2021-07-14 16:22:39 +02:00
parent 38c5af44a7
commit 51b569394b
2 changed files with 55 additions and 0 deletions

View File

@@ -157,6 +157,15 @@ struct mgag200_pll {
const struct mgag200_pll_funcs *funcs;
};
struct mgag200_crtc_state {
struct drm_crtc_state base;
};
static inline struct mgag200_crtc_state *to_mgag200_crtc_state(struct drm_crtc_state *base)
{
return container_of(base, struct mgag200_crtc_state, base);
}
#define to_mga_connector(x) container_of(x, struct mga_connector, base)
struct mga_i2c_chan {