diff options
author | Andrii Sokolenko <a.sokolenko@samsung.com> | 2015-12-11 18:12:08 +0200 |
---|---|---|
committer | Andrii Sokolenko <a.sokolenko@samsung.com> | 2015-12-11 18:12:08 +0200 |
commit | 394d3a49cb1fd2c186ac82be1e70e7aa7dd0ab06 (patch) | |
tree | 6d9d633a589a63bfab1767d02e28e3316dfef61c | |
parent | 1e3e29c76eb0a9e20352d0ed75ad7f781c15ea41 (diff) | |
download | libdrm-394d3a49cb1fd2c186ac82be1e70e7aa7dd0ab06.tar.gz libdrm-394d3a49cb1fd2c186ac82be1e70e7aa7dd0ab06.tar.bz2 libdrm-394d3a49cb1fd2c186ac82be1e70e7aa7dd0ab06.zip |
[SPRD] Add primary layer type
Change-Id: Icd1588f75c876603100506b171162b154b92b3f8
Signed-off-by: Andrii Sokolenko <a.sokolenko@samsung.com>
-rw-r--r-- | sprd/sprd_drm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sprd/sprd_drm.c b/sprd/sprd_drm.c index a00679ec..0eb98ea6 100644 --- a/sprd/sprd_drm.c +++ b/sprd/sprd_drm.c @@ -910,7 +910,7 @@ static struct sprd_drm_property * sprd_drm_create_plane_type_prpoperty(struct sp prop = drmMalloc(sizeof (struct sprd_drm_property)); prop->id = sprd_drm_resource_new_id(prop); strcpy(prop->name, "type"); - prop->flags = DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_ENUM; + prop->flags = DRM_MODE_PROP_ENUM; prop->prop_set = sprd_drm_plane_set_property; prop->prop_get = sprd_drm_plane_get_property; @@ -931,7 +931,7 @@ static struct sprd_drm_property * sprd_drm_create_zpos_prpoperty(struct sprd_drm prop = drmMalloc(sizeof (struct sprd_drm_property)); prop->id = sprd_drm_resource_new_id(prop); strcpy(prop->name, "zpos"); - prop->flags = DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_RANGE; + prop->flags = DRM_MODE_PROP_RANGE; prop->prop_set = sprd_drm_plane_set_property; prop->prop_get = sprd_drm_plane_get_property; @@ -944,16 +944,15 @@ static struct sprd_drm_property * sprd_drm_create_zpos_prpoperty(struct sprd_drm return prop; } -static struct sprd_drm_mode_plane * sprd_drm_plane_create(struct sprd_drm_device * dev, unsigned int possible_crtcs) +static struct sprd_drm_mode_plane * sprd_drm_plane_create(struct sprd_drm_device * dev, unsigned int possible_crtcs, int zpos) { struct sprd_drm_mode_plane * plane; plane = drmMalloc(sizeof (struct sprd_drm_mode_plane)); plane->drm_plane.plane_id = sprd_drm_resource_new_id(plane); - + plane->zpos = zpos; plane->drm_plane.crtc_id = 0; plane->drm_plane.fb_id = 0; - plane->drm_plane.possible_crtcs = possible_crtcs; //TODO:: @@ -1949,7 +1948,7 @@ struct sprd_drm_device * sprd_device_create(int fd) possible_crtcs = (1 << MAX_CRTC) - 1; for (i = 0; i < MAX_PLANE; i++) { - if (!sprd_drm_plane_create(dev, possible_crtcs)) + if (!sprd_drm_plane_create(dev, possible_crtcs, i)) goto err; } |