Commit 1baf9127 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/mgag200: Replace simple-KMS with regular atomic helpers

Drop simple-KMS in favor of regular atomic helpers. Makes the code
more modular and hence better to adapt to per-model requirements.

The simple-KMS helpers provide few extra features, so the patch is
mostly about open-coding what simple-KMS does. The simple-KMS helpers
do mix up plane and CRTC state. Changing to regular atomic helpers
requires to split some of the simple-pipe functions into per-plane
and per-CRTC code

No functional changes.

v3:
	* always run drm_atomic_helper_check_plane_state()
	* clean up style
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Tested-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-8-tzimmermann@suse.de
parent 4f4dc37e
...@@ -15,11 +15,13 @@ ...@@ -15,11 +15,13 @@
#include <video/vga.h> #include <video/vga.h>
#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_encoder.h> #include <drm/drm_encoder.h>
#include <drm/drm_fb_helper.h> #include <drm/drm_fb_helper.h>
#include <drm/drm_gem.h> #include <drm/drm_gem.h>
#include <drm/drm_gem_shmem_helper.h> #include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_simple_kms_helper.h> #include <drm/drm_plane.h>
#include "mgag200_reg.h" #include "mgag200_reg.h"
...@@ -276,9 +278,11 @@ struct mga_device { ...@@ -276,9 +278,11 @@ struct mga_device {
enum mga_type type; enum mga_type type;
struct mgag200_pll pixpll; struct mgag200_pll pixpll;
struct drm_plane primary_plane;
struct drm_crtc crtc;
struct drm_encoder encoder;
struct mga_i2c_chan i2c; struct mga_i2c_chan i2c;
struct drm_connector connector; struct drm_connector connector;
struct drm_simple_display_pipe display_pipe;
}; };
static inline struct mga_device *to_mga_device(struct drm_device *dev) static inline struct mga_device *to_mga_device(struct drm_device *dev)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment