History

drm/exynos: Don't cast GEM object to Exynos GEM object when not needed

The exynos_drm_gem_dumb_map_offset() doesn't need to access any Exynos-specific GEM object fields, don't cast the GEM object.

Laurent Pinchart committed 14 years ago

Commit 6037baf1 parent 293a1c11 file · +3 −6Browse files

Unified · Split

drivers/gpu/drm/exynos/exynos_drm_gem.c+3−6
@@ -689,7 +689,6 @@ int exynos_drm_gem_dumb_map_offset(struct drm_file *file_priv, · 688 unmodified lines
689689 struct drm_device *dev, uint32_t handle,
690690 uint64_t *offset)
691691 {
692− struct exynos_drm_gem_obj *exynos_gem_obj;
693692 struct drm_gem_object *obj;
694693 int ret = 0;
695694
@@ -710,15 +709,13 @@ int exynos_drm_gem_dumb_map_offset(struct drm_file *file_priv, · 14 unmodified lines
710709 goto unlock;
711710 }
712711
713− exynos_gem_obj = to_exynos_gem_obj(obj);
714−
715− if (!exynos_gem_obj->base.map_list.map) {
716− ret = drm_gem_create_mmap_offset(&exynos_gem_obj->base);
712+ if (!obj->map_list.map) {
713+ ret = drm_gem_create_mmap_offset(obj);
717714 if (ret)
718715 goto out;
719716 }
720717
721− *offset = (u64)exynos_gem_obj->base.map_list.hash.key << PAGE_SHIFT;
718+ *offset = (u64)obj->map_list.hash.key << PAGE_SHIFT;
722719 DRM_DEBUG_KMS("offset = 0x%lx\n", (unsigned long)*offset);
723720
724721 out:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t