Commit f675553d authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2023-09-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes



Short summary of fixes pull:

 * DRM MM-test fixes
 * Fbdev Kconfig fixes

 * ivpu:
   * IRQ-handling fixes

 * meson:
   * Fix memory leak in HDMI EDID code

 * nouveau:
   * Correct type casting
   * Fix memory leak in scheduler
   * u_memcpya() fixes

 * virtio:
   * Fence cleanups

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230921153712.GA14059@linux-uq9g
parents ce9ecca0 f75f71b2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1046,7 +1046,8 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
	if (status == 0)
		return IRQ_NONE;

	REGB_WR32(VPU_40XX_BUTTRESS_INTERRUPT_STAT, status);
	/* Disable global interrupt before handling local buttress interrupts */
	REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x1);

	if (REG_TEST_FLD(VPU_40XX_BUTTRESS_INTERRUPT_STAT, FREQ_CHANGE, status))
		ivpu_dbg(vdev, IRQ, "FREQ_CHANGE");
@@ -1092,6 +1093,12 @@ static irqreturn_t ivpu_hw_40xx_irqb_handler(struct ivpu_device *vdev, int irq)
		schedule_recovery = true;
	}

	/* This must be done after interrupts are cleared at the source. */
	REGB_WR32(VPU_40XX_BUTTRESS_INTERRUPT_STAT, status);

	/* Re-enable global interrupt */
	REGB_WR32(VPU_40XX_BUTTRESS_GLOBAL_INT_MASK, 0x0);

	if (schedule_recovery)
		ivpu_pm_schedule_recovery(vdev);

+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ config DRM_FBDEV_EMULATION
	bool "Enable legacy fbdev support for your modesetting driver"
	depends on DRM
	select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
	default y
	default FB
	help
	  Choose this option if you have a need for the legacy fbdev
	  support. Note that this support also provides the linux console
+2 −0
Original line number Diff line number Diff line
@@ -334,6 +334,8 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,
			return;

		cec_notifier_set_phys_addr_from_edid(encoder_hdmi->cec_notifier, edid);

		kfree(edid);
	} else
		cec_notifier_phys_addr_invalidate(encoder_hdmi->cec_notifier);
}
+5 −14
Original line number Diff line number Diff line
@@ -189,21 +189,12 @@ u_free(void *addr)
static inline void *
u_memcpya(uint64_t user, unsigned int nmemb, unsigned int size)
{
	void *mem;
	void __user *userptr = (void __force __user *)(uintptr_t)user;
	void __user *userptr = u64_to_user_ptr(user);
	size_t bytes;

	size *= nmemb;

	mem = kvmalloc(size, GFP_KERNEL);
	if (!mem)
		return ERR_PTR(-ENOMEM);

	if (copy_from_user(mem, userptr, size)) {
		u_free(mem);
		return ERR_PTR(-EFAULT);
	}

	return mem;
	if (unlikely(check_mul_overflow(nmemb, size, &bytes)))
		return ERR_PTR(-EOVERFLOW);
	return vmemdup_user(userptr, bytes);
}

#include <nvif/object.h>
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ nouveau_exec_job_timeout(struct nouveau_job *job)

	nouveau_sched_entity_fini(job->entity);

	return DRM_GPU_SCHED_STAT_ENODEV;
	return DRM_GPU_SCHED_STAT_NOMINAL;
}

static struct nouveau_job_ops nouveau_exec_job_ops = {
Loading