forked from Minki/linux
Merge branch 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux into drm-fixes
misc msm fixes. * 'msm-fixes-4.11-rc6' of git://people.freedesktop.org/~robclark/linux: drm/msm: Make sure to detach the MMU during GPU cleanup drm/msm/hdmi: redefinitions of macros not required drm/msm/mdp5: Update SSPP_MAX value drm/msm/dsi: Fix bug in dsi_mgr_phy_enable drm/msm: Don't allow zero sized buffer objects drm/msm: Fix wrong pointer check in a5xx_destroy drm/msm: adreno: fix build error without debugfs
This commit is contained in:
commit
130e35e4bb
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
@ -534,7 +534,7 @@ static void a5xx_destroy(struct msm_gpu *gpu)
|
||||
}
|
||||
|
||||
if (a5xx_gpu->gpmu_bo) {
|
||||
if (a5xx_gpu->gpmu_bo)
|
||||
if (a5xx_gpu->gpmu_iova)
|
||||
msm_gem_put_iova(a5xx_gpu->gpmu_bo, gpu->id);
|
||||
drm_gem_object_unreference_unlocked(a5xx_gpu->gpmu_bo);
|
||||
}
|
||||
@ -860,7 +860,9 @@ static const struct adreno_gpu_funcs funcs = {
|
||||
.idle = a5xx_idle,
|
||||
.irq = a5xx_irq,
|
||||
.destroy = a5xx_destroy,
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
.show = a5xx_show,
|
||||
#endif
|
||||
},
|
||||
.get_timestamp = a5xx_get_timestamp,
|
||||
};
|
||||
|
@ -418,18 +418,27 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void adreno_gpu_cleanup(struct adreno_gpu *gpu)
|
||||
void adreno_gpu_cleanup(struct adreno_gpu *adreno_gpu)
|
||||
{
|
||||
if (gpu->memptrs_bo) {
|
||||
if (gpu->memptrs)
|
||||
msm_gem_put_vaddr(gpu->memptrs_bo);
|
||||
struct msm_gpu *gpu = &adreno_gpu->base;
|
||||
|
||||
if (gpu->memptrs_iova)
|
||||
msm_gem_put_iova(gpu->memptrs_bo, gpu->base.id);
|
||||
if (adreno_gpu->memptrs_bo) {
|
||||
if (adreno_gpu->memptrs)
|
||||
msm_gem_put_vaddr(adreno_gpu->memptrs_bo);
|
||||
|
||||
drm_gem_object_unreference_unlocked(gpu->memptrs_bo);
|
||||
if (adreno_gpu->memptrs_iova)
|
||||
msm_gem_put_iova(adreno_gpu->memptrs_bo, gpu->id);
|
||||
|
||||
drm_gem_object_unreference_unlocked(adreno_gpu->memptrs_bo);
|
||||
}
|
||||
release_firmware(adreno_gpu->pm4);
|
||||
release_firmware(adreno_gpu->pfp);
|
||||
|
||||
msm_gpu_cleanup(gpu);
|
||||
|
||||
if (gpu->aspace) {
|
||||
gpu->aspace->mmu->funcs->detach(gpu->aspace->mmu,
|
||||
iommu_ports, ARRAY_SIZE(iommu_ports));
|
||||
msm_gem_address_space_destroy(gpu->aspace);
|
||||
}
|
||||
release_firmware(gpu->pm4);
|
||||
release_firmware(gpu->pfp);
|
||||
msm_gpu_cleanup(&gpu->base);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ dsi_mgr_phy_enable(int id,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msm_dsi_host_reset_phy(mdsi->host);
|
||||
msm_dsi_host_reset_phy(msm_dsi->host);
|
||||
ret = enable_phy(msm_dsi, src_pll_id, &shared_timings[id]);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
@ -18,13 +18,6 @@
|
||||
#include <linux/hdmi.h>
|
||||
#include "hdmi.h"
|
||||
|
||||
|
||||
/* Supported HDMI Audio channels */
|
||||
#define MSM_HDMI_AUDIO_CHANNEL_2 0
|
||||
#define MSM_HDMI_AUDIO_CHANNEL_4 1
|
||||
#define MSM_HDMI_AUDIO_CHANNEL_6 2
|
||||
#define MSM_HDMI_AUDIO_CHANNEL_8 3
|
||||
|
||||
/* maps MSM_HDMI_AUDIO_CHANNEL_n consts used by audio driver to # of channels: */
|
||||
static int nchannels[] = { 2, 4, 6, 8 };
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
#ifndef __MDP5_PIPE_H__
|
||||
#define __MDP5_PIPE_H__
|
||||
|
||||
#define SSPP_MAX (SSPP_RGB3 + 1) /* TODO: Add SSPP_MAX in mdp5.xml.h */
|
||||
/* TODO: Add SSPP_MAX in mdp5.xml.h */
|
||||
#define SSPP_MAX (SSPP_CURSOR1 + 1)
|
||||
|
||||
/* represents a hw pipe, which is dynamically assigned to a plane */
|
||||
struct mdp5_hw_pipe {
|
||||
|
@ -812,6 +812,12 @@ struct drm_gem_object *msm_gem_new(struct drm_device *dev,
|
||||
|
||||
size = PAGE_ALIGN(size);
|
||||
|
||||
/* Disallow zero sized objects as they make the underlying
|
||||
* infrastructure grumpy
|
||||
*/
|
||||
if (size == 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
ret = msm_gem_new_impl(dev, size, flags, NULL, &obj);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
@ -706,9 +706,6 @@ void msm_gpu_cleanup(struct msm_gpu *gpu)
|
||||
msm_ringbuffer_destroy(gpu->rb);
|
||||
}
|
||||
|
||||
if (gpu->aspace)
|
||||
msm_gem_address_space_destroy(gpu->aspace);
|
||||
|
||||
if (gpu->fctx)
|
||||
msm_fence_context_free(gpu->fctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user