Commit 06249e69 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux into drm-next

etnaviv fixes.

* 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux:
  drm/etnaviv: fix workaround for GC500
  drm/etnaviv: unlock on error in etnaviv_gem_get_iova()
parents c7753e90 c33246d7
...@@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu, ...@@ -305,8 +305,10 @@ int etnaviv_gem_get_iova(struct etnaviv_gpu *gpu,
mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL); mapping = etnaviv_gem_get_vram_mapping(etnaviv_obj, NULL);
if (!mapping) { if (!mapping) {
mapping = kzalloc(sizeof(*mapping), GFP_KERNEL); mapping = kzalloc(sizeof(*mapping), GFP_KERNEL);
if (!mapping) if (!mapping) {
return -ENOMEM; ret = -ENOMEM;
goto out;
}
INIT_LIST_HEAD(&mapping->scan_node); INIT_LIST_HEAD(&mapping->scan_node);
mapping->object = etnaviv_obj; mapping->object = etnaviv_obj;
......
...@@ -251,9 +251,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) ...@@ -251,9 +251,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu)
chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY); chipIdentity = gpu_read(gpu, VIVS_HI_CHIP_IDENTITY);
/* Special case for older graphic cores. */ /* Special case for older graphic cores. */
if (VIVS_HI_CHIP_IDENTITY_FAMILY(chipIdentity) == 0x01) { if (((chipIdentity & VIVS_HI_CHIP_IDENTITY_FAMILY__MASK)
>> VIVS_HI_CHIP_IDENTITY_FAMILY__SHIFT) == 0x01) {
gpu->identity.model = 0x500; /* gc500 */ gpu->identity.model = 0x500; /* gc500 */
gpu->identity.revision = VIVS_HI_CHIP_IDENTITY_REVISION(chipIdentity); gpu->identity.revision =
(chipIdentity & VIVS_HI_CHIP_IDENTITY_REVISION__MASK)
>> VIVS_HI_CHIP_IDENTITY_REVISION__SHIFT;
} else { } else {
gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL); gpu->identity.model = gpu_read(gpu, VIVS_HI_CHIP_MODEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment