Skip to content

Commit 1baf912

Browse files
committed
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: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Tested-by: Jocelyn Falempe <jfalempe@redhat.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220728124103.30159-8-tzimmermann@suse.de
1 parent 4f4dc37 commit 1baf912

File tree

2 files changed

+233
-157
lines changed

2 files changed

+233
-157
lines changed

drivers/gpu/drm/mgag200/mgag200_drv.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515

1616
#include <video/vga.h>
1717

18+
#include <drm/drm_connector.h>
19+
#include <drm/drm_crtc.h>
1820
#include <drm/drm_encoder.h>
1921
#include <drm/drm_fb_helper.h>
2022
#include <drm/drm_gem.h>
2123
#include <drm/drm_gem_shmem_helper.h>
22-
#include <drm/drm_simple_kms_helper.h>
24+
#include <drm/drm_plane.h>
2325

2426
#include "mgag200_reg.h"
2527

@@ -276,9 +278,11 @@ struct mga_device {
276278
enum mga_type type;
277279

278280
struct mgag200_pll pixpll;
281+
struct drm_plane primary_plane;
282+
struct drm_crtc crtc;
283+
struct drm_encoder encoder;
279284
struct mga_i2c_chan i2c;
280285
struct drm_connector connector;
281-
struct drm_simple_display_pipe display_pipe;
282286
};
283287

284288
static inline struct mga_device *to_mga_device(struct drm_device *dev)

0 commit comments

Comments
 (0)