[PATCH V4 2/4] drm/vkms: Add framebuffer and plane helpers
Daniel Vetter
daniel at ffwll.ch
Thu Jul 12 14:25:47 UTC 2018
On Thu, Jul 12, 2018 at 10:41:02AM -0300, Rodrigo Siqueira wrote:
> This patch appends the minimum helpers related to framebuffer and plane
> to make vkms minimally usable.
>
> Changes since V1:
> - None
> Changes since V2:
> - Squash "Add plane helper struct" and "Add helper for framebuffer
> create"
> Changes since V3:
> Daniel Vetter:
> - Remove atomic_check from plane helper
>
> Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo at gmail.com>
Ok I pulled this one in, plus the 3 other patches from v3. Since I pushed
the v3 patches out already I couldn't pick the v4 ones here, hopefully
that didn't create a chaos. Otherwise I guess we'd need a fixup. So please
rebase onto latest drm-misc-next and check it all.
Thanks, Daniel
> ---
> drivers/gpu/drm/vkms/vkms_drv.c | 3 +++
> drivers/gpu/drm/vkms/vkms_plane.c | 11 +++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> index 6ea2fd97bef9..b5d597a42f20 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.c
> +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> @@ -9,6 +9,8 @@
> #include <drm/drm_gem.h>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_atomic_helper.h>
> +#include <drm/drm_gem_framebuffer_helper.h>
> +#include <drm/drm_fb_helper.h>
> #include "vkms_drv.h"
>
> #define DRIVER_NAME "vkms"
> @@ -69,6 +71,7 @@ static struct drm_driver vkms_driver = {
> };
>
> static const struct drm_mode_config_funcs vkms_mode_funcs = {
> + .fb_create = drm_gem_fb_create,
> .atomic_check = drm_atomic_helper_check,
> .atomic_commit = drm_atomic_helper_commit,
> };
> diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
> index 2c25b1d6ab5b..9f75b1e2c1c4 100644
> --- a/drivers/gpu/drm/vkms/vkms_plane.c
> +++ b/drivers/gpu/drm/vkms/vkms_plane.c
> @@ -19,6 +19,15 @@ static const struct drm_plane_funcs vkms_plane_funcs = {
> .atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
> };
>
> +static void vkms_primary_plane_update(struct drm_plane *plane,
> + struct drm_plane_state *old_state)
> +{
> +}
> +
> +static const struct drm_plane_helper_funcs vkms_primary_helper_funcs = {
> + .atomic_update = vkms_primary_plane_update,
> +};
> +
> struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev)
> {
> struct drm_device *dev = &vkmsdev->drm;
> @@ -42,5 +51,7 @@ struct drm_plane *vkms_plane_init(struct vkms_device *vkmsdev)
> return ERR_PTR(ret);
> }
>
> + drm_plane_helper_add(plane, &vkms_primary_helper_funcs);
> +
> return plane;
> }
> --
> 2.18.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list