drm/bochs: phase 1 - use the transitional helpers
Subsystems (2)
PATCH v2 1/8 drm/bochs: phase 1 - use the transitional helpers
From: Zhao Junwang <[email protected]>
-register driver's own primary plane
-use drm_crtc_init_with_planes instead of drm_crtc_init
-split ->mode_set into:
1. set the new hw mode
2. update the primary plane (This is done by ->set_base)
-move what ->set_base do into ->atomic_update
-the new atomic infrastructure needs the ->mode_set_nofb callback
to update CRTC timings before setting any plane
-since the ->cleanup_fb can't fail, set the interruptible argument
of the ttm_bo_reserve to false, this make sure the ttm_bo_reserve can't fail
v2: -add a few checks to plane's ->atomic_check, using
drm_plane_helper_check_update
v3: -polish the atomic_check, it does too much in v2, remove the
->disable_plane and ->set_config
v4: -use plane->state instead of old_state in
bochs_plane_atomic_update
v5: -just return 0 in plane ->atomic_check, i.e. remove what we
do in v2-v4
v6: -remove gpu_addr and look up the bo offset same as
bochs_bo_gpu_offset
-add atomic_plane_disable hook, this will guarantee when it
calls atomic_plane_update state->fb and state->crtc are both non-NULL
--- drivers/gpu/drm/bochs/bochs.h | 2 + drivers/gpu/drm/bochs/bochs_kms.c | 169 +++++++++++++++++++++++++------------ 2 files changed, 118 insertions(+), 53 deletions(-)
drivers/gpu/drm/bochs/bochs.h +2 -0
@@ -5,6 +5,7 @@#include <drm/drmP.h> #include <drm/drm_crtc.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_atomic_helper.h> #include <drm/drm_fb_helper.h> #include <drm/drm_gem.h>
@@ -72,6 +73,7 @@ struct bochs_device {/* drm */ struct drm_device *dev; +struct drm_plane primary;struct drm_crtc crtc;struct drm_encoder encoder;struct drm_connector connector;
drivers/gpu/drm/bochs/bochs_kms.c +116 -53
214 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel