Short summary of fixes pull:
amdgpu: - ignore duplicated BOs in CS parser - remove redundant call to amdgpu_ctx_priority_is_valid() amdkfd: - reserve fence slot while locking BO dp_mst: - Fix NULL deref in get_mst_branch_device_by_guid_helper() logicvc: - Kconfig: Select REGMAP and REGMAP_MMIO ivpu: - Fix missing VPUIP interrupts -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmU6RugACgkQaA3BHVML eiOH1ggAsc+3EcnoNbeKuPRTefAGb7xsoljmyY0EJriSQZtiropmVGpXYmLSSSSC 4x8TLztWsDXkM/+AKJEQWT56egKwP4Z+QgASOo25p050z56IlPScSsENasuwumW1 vI/hlUQRkDjAixEd6WHcD/hGPu9kKNPhS/DUVNeWYr2237rFJChHg+hWw3PycTzm 2aD8fx1275sx6/OXkKW5bQKmshjHtGYnT86w3xgAJUfvTDPq/eZtwqCKhqCqaQja 5tAccKVmnWAaXneCvs7XwAXYou1Qny3GOBOOpCrBQYaj49N9cMyflovY2y2s1uyR pQyquVzLZLVhFHc2B58++49NyES8bw== =d+WA -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2023-10-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: amdgpu: - ignore duplicated BOs in CS parser - remove redundant call to amdgpu_ctx_priority_is_valid() amdkfd: - reserve fence slot while locking BO dp_mst: - Fix NULL deref in get_mst_branch_device_by_guid_helper() logicvc: - Kconfig: Select REGMAP and REGMAP_MMIO ivpu: - Fix missing VPUIP interrupts Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20231026110132.GA10591@linux-uq9g.fritz.box
This commit is contained in:
commit
6366ffa6ed
@ -940,9 +940,6 @@ static u32 ivpu_hw_37xx_irqb_handler(struct ivpu_device *vdev, int irq)
|
||||
if (status == 0)
|
||||
return 0;
|
||||
|
||||
/* Disable global interrupt before handling local buttress interrupts */
|
||||
REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
|
||||
|
||||
if (REG_TEST_FLD(VPU_37XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status))
|
||||
ivpu_dbg(vdev, IRQ, "FREQ_CHANGE irq: %08x",
|
||||
REGB_RD32(VPU_37XX_BUTTRESS_CURRENT_PLL));
|
||||
@ -974,9 +971,6 @@ static u32 ivpu_hw_37xx_irqb_handler(struct ivpu_device *vdev, int irq)
|
||||
else
|
||||
REGB_WR32(VPU_37XX_BUTTRESS_INTERRUPT_STAT, status);
|
||||
|
||||
/* Re-enable global interrupt */
|
||||
REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
|
||||
|
||||
if (schedule_recovery)
|
||||
ivpu_pm_schedule_recovery(vdev);
|
||||
|
||||
@ -988,9 +982,14 @@ static irqreturn_t ivpu_hw_37xx_irq_handler(int irq, void *ptr)
|
||||
struct ivpu_device *vdev = ptr;
|
||||
u32 ret_irqv, ret_irqb;
|
||||
|
||||
REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);
|
||||
|
||||
ret_irqv = ivpu_hw_37xx_irqv_handler(vdev, irq);
|
||||
ret_irqb = ivpu_hw_37xx_irqb_handler(vdev, irq);
|
||||
|
||||
/* Re-enable global interrupts to re-trigger MSI for pending interrupts */
|
||||
REGB_WR32(VPU_37XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);
|
||||
|
||||
return IRQ_RETVAL(ret_irqb | ret_irqv);
|
||||
}
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ static int reserve_bo_and_vm(struct kgd_mem *mem,
|
||||
if (unlikely(ret))
|
||||
goto error;
|
||||
|
||||
ret = drm_exec_lock_obj(&ctx->exec, &bo->tbo.base);
|
||||
ret = drm_exec_prepare_obj(&ctx->exec, &bo->tbo.base, 1);
|
||||
drm_exec_retry_on_contention(&ctx->exec);
|
||||
if (unlikely(ret))
|
||||
goto error;
|
||||
|
@ -65,7 +65,8 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p,
|
||||
}
|
||||
|
||||
amdgpu_sync_create(&p->sync);
|
||||
drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
|
||||
drm_exec_init(&p->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
|
||||
DRM_EXEC_IGNORE_DUPLICATES);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,10 @@ bool amdgpu_ctx_priority_is_valid(int32_t ctx_prio)
|
||||
return true;
|
||||
default:
|
||||
case AMDGPU_CTX_PRIORITY_UNSET:
|
||||
/* UNSET priority is not valid and we don't carry that
|
||||
* around, but set it to NORMAL in the only place this
|
||||
* function is called, amdgpu_ctx_ioctl().
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -95,9 +99,6 @@ amdgpu_ctx_to_drm_sched_prio(int32_t ctx_prio)
|
||||
static int amdgpu_ctx_priority_permit(struct drm_file *filp,
|
||||
int32_t priority)
|
||||
{
|
||||
if (!amdgpu_ctx_priority_is_valid(priority))
|
||||
return -EINVAL;
|
||||
|
||||
/* NORMAL and below are accessible by everyone */
|
||||
if (priority <= AMDGPU_CTX_PRIORITY_NORMAL)
|
||||
return 0;
|
||||
@ -632,8 +633,6 @@ static int amdgpu_ctx_query2(struct amdgpu_device *adev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int amdgpu_ctx_stable_pstate(struct amdgpu_device *adev,
|
||||
struct amdgpu_fpriv *fpriv, uint32_t id,
|
||||
bool set, u32 *stable_pstate)
|
||||
@ -676,8 +675,10 @@ int amdgpu_ctx_ioctl(struct drm_device *dev, void *data,
|
||||
id = args->in.ctx_id;
|
||||
priority = args->in.priority;
|
||||
|
||||
/* For backwards compatibility reasons, we need to accept
|
||||
* ioctls with garbage in the priority field */
|
||||
/* For backwards compatibility, we need to accept ioctls with garbage
|
||||
* in the priority field. Garbage values in the priority field, result
|
||||
* in the priority being set to NORMAL.
|
||||
*/
|
||||
if (!amdgpu_ctx_priority_is_valid(priority))
|
||||
priority = AMDGPU_CTX_PRIORITY_NORMAL;
|
||||
|
||||
|
@ -2574,14 +2574,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(
|
||||
struct drm_dp_mst_branch *found_mstb;
|
||||
struct drm_dp_mst_port *port;
|
||||
|
||||
if (!mstb)
|
||||
return NULL;
|
||||
|
||||
if (memcmp(mstb->guid, guid, 16) == 0)
|
||||
return mstb;
|
||||
|
||||
|
||||
list_for_each_entry(port, &mstb->ports, next) {
|
||||
if (!port->mstb)
|
||||
continue;
|
||||
|
||||
found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);
|
||||
|
||||
if (found_mstb)
|
||||
|
@ -5,5 +5,7 @@ config DRM_LOGICVC
|
||||
select DRM_KMS_HELPER
|
||||
select DRM_KMS_DMA_HELPER
|
||||
select DRM_GEM_DMA_HELPER
|
||||
select REGMAP
|
||||
select REGMAP_MMIO
|
||||
help
|
||||
DRM display driver for the logiCVC programmable logic block from Xylon
|
||||
|
Loading…
x
Reference in New Issue
Block a user