Merge tag 'drm-msm-fixes-2019-01-24' of git://people.freedesktop.org/~robclark/linux into drm-fixes
A few fixes for v5.0.. the opp-level fix and removal of hard-coded irq name is partially to make things smoother in v5.1 merge window to avoid dependency on drm vs dt trees, but are otherwise sane changes. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rob Clark <robdclark@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGsAEHd2tGRQxRTs+A-8y_tthPs2iUgCCCEwR5vDMXab4A@mail.gmail.com
This commit is contained in:
commit
f0e7ce1eef
@ -27,7 +27,6 @@ Example:
|
||||
reg = <0x04300000 0x20000>;
|
||||
reg-names = "kgsl_3d0_reg_memory";
|
||||
interrupts = <GIC_SPI 80 0>;
|
||||
interrupt-names = "kgsl_3d0_irq";
|
||||
clock-names =
|
||||
"core",
|
||||
"iface",
|
||||
|
@ -944,7 +944,7 @@ static u32 a6xx_gmu_get_arc_level(struct device *dev, unsigned long freq)
|
||||
np = dev_pm_opp_get_of_node(opp);
|
||||
|
||||
if (np) {
|
||||
of_property_read_u32(np, "qcom,level", &val);
|
||||
of_property_read_u32(np, "opp-level", &val);
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,6 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
adreno_gpu->rev = config->rev;
|
||||
|
||||
adreno_gpu_config.ioname = "kgsl_3d0_reg_memory";
|
||||
adreno_gpu_config.irqname = "kgsl_3d0_irq";
|
||||
|
||||
adreno_gpu_config.va_start = SZ_16M;
|
||||
adreno_gpu_config.va_end = 0xffffffff;
|
||||
|
@ -365,19 +365,6 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane,
|
||||
&pdpu->pipe_qos_cfg);
|
||||
}
|
||||
|
||||
static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
|
||||
{
|
||||
struct dpu_plane *pdpu = to_dpu_plane(plane);
|
||||
struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane);
|
||||
|
||||
if (!pdpu->is_rt_pipe)
|
||||
return;
|
||||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
_dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL);
|
||||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* _dpu_plane_set_ot_limit - set OT limit for the given plane
|
||||
* @plane: Pointer to drm plane
|
||||
@ -1248,6 +1235,19 @@ static void dpu_plane_reset(struct drm_plane *plane)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
|
||||
{
|
||||
struct dpu_plane *pdpu = to_dpu_plane(plane);
|
||||
struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane);
|
||||
|
||||
if (!pdpu->is_rt_pipe)
|
||||
return;
|
||||
|
||||
pm_runtime_get_sync(&dpu_kms->pdev->dev);
|
||||
_dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL);
|
||||
pm_runtime_put_sync(&dpu_kms->pdev->dev);
|
||||
}
|
||||
|
||||
static ssize_t _dpu_plane_danger_read(struct file *file,
|
||||
char __user *buff, size_t count, loff_t *ppos)
|
||||
{
|
||||
|
@ -250,7 +250,8 @@ void msm_gem_purge_vma(struct msm_gem_address_space *aspace,
|
||||
void msm_gem_unmap_vma(struct msm_gem_address_space *aspace,
|
||||
struct msm_gem_vma *vma);
|
||||
int msm_gem_map_vma(struct msm_gem_address_space *aspace,
|
||||
struct msm_gem_vma *vma, struct sg_table *sgt, int npages);
|
||||
struct msm_gem_vma *vma, int prot,
|
||||
struct sg_table *sgt, int npages);
|
||||
void msm_gem_close_vma(struct msm_gem_address_space *aspace,
|
||||
struct msm_gem_vma *vma);
|
||||
|
||||
@ -333,6 +334,7 @@ void msm_gem_kernel_put(struct drm_gem_object *bo,
|
||||
struct drm_gem_object *msm_gem_import(struct drm_device *dev,
|
||||
struct dma_buf *dmabuf, struct sg_table *sgt);
|
||||
|
||||
__printf(2, 3)
|
||||
void msm_gem_object_set_name(struct drm_gem_object *bo, const char *fmt, ...);
|
||||
|
||||
int msm_framebuffer_prepare(struct drm_framebuffer *fb,
|
||||
@ -396,12 +398,14 @@ void msm_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m);
|
||||
int msm_debugfs_late_init(struct drm_device *dev);
|
||||
int msm_rd_debugfs_init(struct drm_minor *minor);
|
||||
void msm_rd_debugfs_cleanup(struct msm_drm_private *priv);
|
||||
__printf(3, 4)
|
||||
void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
|
||||
const char *fmt, ...);
|
||||
int msm_perf_debugfs_init(struct drm_minor *minor);
|
||||
void msm_perf_debugfs_cleanup(struct msm_drm_private *priv);
|
||||
#else
|
||||
static inline int msm_debugfs_late_init(struct drm_device *dev) { return 0; }
|
||||
__printf(3, 4)
|
||||
static inline void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
|
||||
const char *fmt, ...) {}
|
||||
static inline void msm_rd_debugfs_cleanup(struct msm_drm_private *priv) {}
|
||||
|
@ -391,6 +391,10 @@ static int msm_gem_pin_iova(struct drm_gem_object *obj,
|
||||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
struct msm_gem_vma *vma;
|
||||
struct page **pages;
|
||||
int prot = IOMMU_READ;
|
||||
|
||||
if (!(msm_obj->flags & MSM_BO_GPU_READONLY))
|
||||
prot |= IOMMU_WRITE;
|
||||
|
||||
WARN_ON(!mutex_is_locked(&msm_obj->lock));
|
||||
|
||||
@ -405,8 +409,8 @@ static int msm_gem_pin_iova(struct drm_gem_object *obj,
|
||||
if (IS_ERR(pages))
|
||||
return PTR_ERR(pages);
|
||||
|
||||
return msm_gem_map_vma(aspace, vma, msm_obj->sgt,
|
||||
obj->size >> PAGE_SHIFT);
|
||||
return msm_gem_map_vma(aspace, vma, prot,
|
||||
msm_obj->sgt, obj->size >> PAGE_SHIFT);
|
||||
}
|
||||
|
||||
/* get iova and pin it. Should have a matching put */
|
||||
|
@ -68,7 +68,8 @@ void msm_gem_unmap_vma(struct msm_gem_address_space *aspace,
|
||||
|
||||
int
|
||||
msm_gem_map_vma(struct msm_gem_address_space *aspace,
|
||||
struct msm_gem_vma *vma, struct sg_table *sgt, int npages)
|
||||
struct msm_gem_vma *vma, int prot,
|
||||
struct sg_table *sgt, int npages)
|
||||
{
|
||||
unsigned size = npages << PAGE_SHIFT;
|
||||
int ret = 0;
|
||||
@ -86,7 +87,7 @@ msm_gem_map_vma(struct msm_gem_address_space *aspace,
|
||||
|
||||
if (aspace->mmu)
|
||||
ret = aspace->mmu->funcs->map(aspace->mmu, vma->iova, sgt,
|
||||
size, IOMMU_READ | IOMMU_WRITE);
|
||||
size, prot);
|
||||
|
||||
if (ret)
|
||||
vma->mapped = false;
|
||||
|
@ -900,7 +900,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
||||
}
|
||||
|
||||
/* Get Interrupt: */
|
||||
gpu->irq = platform_get_irq_byname(pdev, config->irqname);
|
||||
gpu->irq = platform_get_irq(pdev, 0);
|
||||
if (gpu->irq < 0) {
|
||||
ret = gpu->irq;
|
||||
DRM_DEV_ERROR(drm->dev, "failed to get irq: %d\n", ret);
|
||||
|
@ -31,7 +31,6 @@ struct msm_gpu_state;
|
||||
|
||||
struct msm_gpu_config {
|
||||
const char *ioname;
|
||||
const char *irqname;
|
||||
uint64_t va_start;
|
||||
uint64_t va_end;
|
||||
unsigned int nr_rings;
|
||||
@ -63,7 +62,7 @@ struct msm_gpu_funcs {
|
||||
struct msm_ringbuffer *(*active_ring)(struct msm_gpu *gpu);
|
||||
void (*recover)(struct msm_gpu *gpu);
|
||||
void (*destroy)(struct msm_gpu *gpu);
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#if defined(CONFIG_DEBUG_FS) || defined(CONFIG_DEV_COREDUMP)
|
||||
/* show GPU status in debugfs: */
|
||||
void (*show)(struct msm_gpu *gpu, struct msm_gpu_state *state,
|
||||
struct drm_printer *p);
|
||||
|
@ -115,7 +115,9 @@ static void rd_write(struct msm_rd_state *rd, const void *buf, int sz)
|
||||
char *fptr = &fifo->buf[fifo->head];
|
||||
int n;
|
||||
|
||||
wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0);
|
||||
wait_event(rd->fifo_event, circ_space(&rd->fifo) > 0 || !rd->open);
|
||||
if (!rd->open)
|
||||
return;
|
||||
|
||||
/* Note that smp_load_acquire() is not strictly required
|
||||
* as CIRC_SPACE_TO_END() does not access the tail more
|
||||
@ -213,7 +215,10 @@ out:
|
||||
static int rd_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct msm_rd_state *rd = inode->i_private;
|
||||
|
||||
rd->open = false;
|
||||
wake_up_all(&rd->fifo_event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user