Skip to content

VC4 backwards-compatible code changes #1213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions drivers/gpu/drm/drm_gem_cma_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ __drm_gem_cma_create(struct drm_device *drm, size_t size)
struct drm_gem_cma_object *cma_obj;
struct drm_gem_object *gem_obj;
int ret;
size_t obj_size = (drm->driver->gem_obj_size ?
drm->driver->gem_obj_size :
sizeof(*cma_obj));

cma_obj = kzalloc(obj_size, GFP_KERNEL);
if (!cma_obj)
if (drm->driver->gem_create_object)
gem_obj = drm->driver->gem_create_object(drm, size);
else
gem_obj = kzalloc(sizeof(*cma_obj), GFP_KERNEL);
if (!gem_obj)
return ERR_PTR(-ENOMEM);

gem_obj = &cma_obj->base;
cma_obj = container_of(gem_obj, struct drm_gem_cma_object, base);

ret = drm_gem_object_init(drm, gem_obj, size);
if (ret)
Expand Down
Loading