Skip to content

Commit

Permalink
drm/exynos: add default pixel format for plane
Browse files Browse the repository at this point in the history
DRM checks whether the plane supports a pixel format of fb when plane is
updated. This adds a default pixel format supporting format exynos drm
plane.

Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
chulspro authored and airlied committed Mar 20, 2012
1 parent 590f418 commit ba3849d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/exynos/exynos_drm_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ struct exynos_plane {
bool enabled;
};

static const uint32_t formats[] = {
DRM_FORMAT_XRGB8888,
};

static int
exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
struct drm_framebuffer *fb, int crtc_x, int crtc_y,
Expand Down Expand Up @@ -115,9 +119,9 @@ int exynos_plane_init(struct drm_device *dev, unsigned int nr)

exynos_plane->overlay.zpos = DEFAULT_ZPOS;

/* TODO: format */
return drm_plane_init(dev, &exynos_plane->base, possible_crtcs,
&exynos_plane_funcs, NULL, 0, false);
&exynos_plane_funcs, formats, ARRAY_SIZE(formats),
false);
}

int exynos_plane_set_zpos_ioctl(struct drm_device *dev, void *data,
Expand Down

0 comments on commit ba3849d

Please sign in to comment.