mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-27 16:23:32 +00:00
drm fixes for 6.13-rc4
core: - fix FB dependency - avoid div by 0 more in vrefresh - maintainers update display: - fix DP tunnel error path dma-buf: - fix !DEBUG_FS sched: - docs warning fix panel: - collection of misc panel fixes i915 - Reset engine utilization buffer before registration - Ensure busyness counter increases motonically - Accumulate active runtime on gt reset amdgpu: - Disable BOCO when CONFIG_HOTPLUG_PCI_PCIE is not enabled - scheduler job fixes - IP version check fixes - devcoredump fix - GPUVM update fix - NBIO 2.5 fix udmabuf: - fix memory leak on last export - sealing fixes ivpu: - fix NULL pointer - fix memory leak - fix WARN -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmdlDyMACgkQDHTzWXnE hr4AnQ//Tyr5N8tTLuwdaMknjmdOyptJX1zWWKOCwZhZRTXw01cqXanbZohvswM8 ni5Vy+EH9Cz7ce1ygM0gKS7/suM7Yd2ntQqJDZmXk0lSQOUAtURa4lssXw8IR1Iy SSaPiAT4TyOoLboS5F1N96b+zPdYTzKLdR/635F503dZeZY+paT9Vnmv2uk3h7yB Xe0DFknjL/z9q4fZAuwpzyxTOjS3Y5VK1Hr3/rn0RUBA0/r0Rf4tndx6IUplfN9g BJ1rrWQBoydR6OIodfR+hMcOHPvqEbcGSjoUL6Tt9Hzi9y/2SvwGPKlny0GgYJSz RcFTPXw+VP6mpHS5xkqRkXWzb2VgjMIR24UxvxAEGK/qgHIYPpJ0bcBiiyWu5eY1 N1ZVT9Id7Q7Me2lNW1b5LZonB8IB+93Hp39/bu7Bfe0Og0x68vty6oC8ee6cr0ED 6YCHP7mXR4vpniJWcMgPXalPxKvoC4CK23yK5ftQ406EFfLtGBIjwCMdhYDAwcE+ PvMlUNGG4+gmYMhYr86x9o2m+FCcXCmjpCZUi74JQ+ffApf1kyUebH+iqFCOu1rl CxX9EsPAJ71ciNlca2lbQpt9pqUESEhxgpuOIL9qQ+Jn43hvfNNoIqfzpCrHrkkS QqyS5gReIn2Letfv/KOXPBHIXabLO+bcqEWES8DJXZdT09g3W+0= =JlUb -----END PGP SIGNATURE----- Merge tag 'drm-fixes-2024-12-20' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Probably the last pull before Christmas holidays, I'll still be around for most of the time anyways, nothing too major in here, bunch of amdgpu and i915 along with a smattering of fixes across the board. core: - fix FB dependency - avoid div by 0 more in vrefresh - maintainers update display: - fix DP tunnel error path dma-buf: - fix !DEBUG_FS sched: - docs warning fix panel: - collection of misc panel fixes i915: - Reset engine utilization buffer before registration - Ensure busyness counter increases motonically - Accumulate active runtime on gt reset amdgpu: - Disable BOCO when CONFIG_HOTPLUG_PCI_PCIE is not enabled - scheduler job fixes - IP version check fixes - devcoredump fix - GPUVM update fix - NBIO 2.5 fix udmabuf: - fix memory leak on last export - sealing fixes ivpu: - fix NULL pointer - fix memory leak - fix WARN" * tag 'drm-fixes-2024-12-20' of https://gitlab.freedesktop.org/drm/kernel: (33 commits) drm/sched: Fix drm_sched_fini() docu generation accel/ivpu: Fix WARN in ivpu_ipc_send_receive_internal() accel/ivpu: Fix memory leak in ivpu_mmu_reserved_context_init() accel/ivpu: Fix general protection fault in ivpu_bo_list() drm/amdgpu/nbio7.0: fix IP version check drm/amd: Update strapping for NBIO 2.5.0 drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update drm/amdgpu: fix amdgpu_coredump drm/amdgpu/smu14.0.2: fix IP version check drm/amdgpu/gfx12: fix IP version check drm/amdgpu/mmhub4.1: fix IP version check drm/amdgpu/nbio7.11: fix IP version check drm/amdgpu/nbio7.7: fix IP version check drm/amdgpu: don't access invalid sched drm/amd: Require CONFIG_HOTPLUG_PCI_PCIE for BOCO drm: rework FB_CORE dependency drm/fbdev: Select FB_CORE dependency for fbdev on DMA and TTM fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE i915/guc: Accumulate active runtime on gt reset i915/guc: Ensure busyness counter increases motonically ...
This commit is contained in:
commit
af215c980c
@ -7347,7 +7347,7 @@ F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c
|
||||
DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
|
||||
M: Karol Herbst <kherbst@redhat.com>
|
||||
M: Lyude Paul <lyude@redhat.com>
|
||||
M: Danilo Krummrich <dakr@redhat.com>
|
||||
M: Danilo Krummrich <dakr@kernel.org>
|
||||
L: dri-devel@lists.freedesktop.org
|
||||
L: nouveau@lists.freedesktop.org
|
||||
S: Supported
|
||||
@ -8924,7 +8924,7 @@ F: include/linux/arm_ffa.h
|
||||
FIRMWARE LOADER (request_firmware)
|
||||
M: Luis Chamberlain <mcgrof@kernel.org>
|
||||
M: Russ Weight <russ.weight@linux.dev>
|
||||
M: Danilo Krummrich <dakr@redhat.com>
|
||||
M: Danilo Krummrich <dakr@kernel.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/firmware_class/
|
||||
|
@ -208,6 +208,7 @@ CONFIG_FB_ATY=y
|
||||
CONFIG_FB_ATY_CT=y
|
||||
CONFIG_FB_ATY_GX=y
|
||||
CONFIG_FB_3DFX=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
# CONFIG_VGA_CONSOLE is not set
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_LOGO=y
|
||||
|
@ -716,6 +716,7 @@ CONFIG_FB_TRIDENT=m
|
||||
CONFIG_FB_SM501=m
|
||||
CONFIG_FB_IBM_GXT4500=y
|
||||
CONFIG_LCD_PLATFORM=m
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_LOGO=y
|
||||
|
@ -409,7 +409,7 @@ static void ivpu_bo_print_info(struct ivpu_bo *bo, struct drm_printer *p)
|
||||
mutex_lock(&bo->lock);
|
||||
|
||||
drm_printf(p, "%-9p %-3u 0x%-12llx %-10lu 0x%-8x %-4u",
|
||||
bo, bo->ctx->id, bo->vpu_addr, bo->base.base.size,
|
||||
bo, bo->ctx ? bo->ctx->id : 0, bo->vpu_addr, bo->base.base.size,
|
||||
bo->flags, kref_read(&bo->base.base.refcount));
|
||||
|
||||
if (bo->base.pages)
|
||||
|
@ -612,18 +612,22 @@ int ivpu_mmu_reserved_context_init(struct ivpu_device *vdev)
|
||||
if (!ivpu_mmu_ensure_pgd(vdev, &vdev->rctx.pgtable)) {
|
||||
ivpu_err(vdev, "Failed to allocate root page table for reserved context\n");
|
||||
ret = -ENOMEM;
|
||||
goto unlock;
|
||||
goto err_ctx_fini;
|
||||
}
|
||||
|
||||
ret = ivpu_mmu_cd_set(vdev, vdev->rctx.id, &vdev->rctx.pgtable);
|
||||
if (ret) {
|
||||
ivpu_err(vdev, "Failed to set context descriptor for reserved context\n");
|
||||
goto unlock;
|
||||
goto err_ctx_fini;
|
||||
}
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&vdev->rctx.lock);
|
||||
return ret;
|
||||
|
||||
err_ctx_fini:
|
||||
mutex_unlock(&vdev->rctx.lock);
|
||||
ivpu_mmu_context_fini(vdev, &vdev->rctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ivpu_mmu_reserved_context_fini(struct ivpu_device *vdev)
|
||||
|
@ -378,6 +378,7 @@ void ivpu_pm_init(struct ivpu_device *vdev)
|
||||
|
||||
pm_runtime_use_autosuspend(dev);
|
||||
pm_runtime_set_autosuspend_delay(dev, delay);
|
||||
pm_runtime_set_active(dev);
|
||||
|
||||
ivpu_dbg(vdev, PM, "Autosuspend delay = %d\n", delay);
|
||||
}
|
||||
@ -392,7 +393,6 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
|
||||
{
|
||||
struct device *dev = vdev->drm.dev;
|
||||
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_allow(dev);
|
||||
pm_runtime_mark_last_busy(dev);
|
||||
pm_runtime_put_autosuspend(dev);
|
||||
|
@ -489,7 +489,7 @@ config IMG_ASCII_LCD
|
||||
|
||||
config HT16K33
|
||||
tristate "Holtek Ht16K33 LED controller with keyscan"
|
||||
depends on FB && I2C && INPUT
|
||||
depends on FB && I2C && INPUT && BACKLIGHT_CLASS_DEVICE
|
||||
select FB_SYSMEM_HELPERS
|
||||
select INPUT_MATRIXKMAP
|
||||
select FB_BACKLIGHT
|
||||
|
@ -60,7 +60,7 @@ static void __dma_buf_debugfs_list_add(struct dma_buf *dmabuf)
|
||||
{
|
||||
}
|
||||
|
||||
static void __dma_buf_debugfs_list_del(struct file *file)
|
||||
static void __dma_buf_debugfs_list_del(struct dma_buf *dmabuf)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
@ -297,7 +297,7 @@ static const struct dma_buf_ops udmabuf_ops = {
|
||||
};
|
||||
|
||||
#define SEALS_WANTED (F_SEAL_SHRINK)
|
||||
#define SEALS_DENIED (F_SEAL_WRITE)
|
||||
#define SEALS_DENIED (F_SEAL_WRITE|F_SEAL_FUTURE_WRITE)
|
||||
|
||||
static int check_memfd_seals(struct file *memfd)
|
||||
{
|
||||
@ -317,12 +317,10 @@ static int check_memfd_seals(struct file *memfd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int export_udmabuf(struct udmabuf *ubuf,
|
||||
struct miscdevice *device,
|
||||
u32 flags)
|
||||
static struct dma_buf *export_udmabuf(struct udmabuf *ubuf,
|
||||
struct miscdevice *device)
|
||||
{
|
||||
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
||||
struct dma_buf *buf;
|
||||
|
||||
ubuf->device = device;
|
||||
exp_info.ops = &udmabuf_ops;
|
||||
@ -330,11 +328,7 @@ static int export_udmabuf(struct udmabuf *ubuf,
|
||||
exp_info.priv = ubuf;
|
||||
exp_info.flags = O_RDWR;
|
||||
|
||||
buf = dma_buf_export(&exp_info);
|
||||
if (IS_ERR(buf))
|
||||
return PTR_ERR(buf);
|
||||
|
||||
return dma_buf_fd(buf, flags);
|
||||
return dma_buf_export(&exp_info);
|
||||
}
|
||||
|
||||
static long udmabuf_pin_folios(struct udmabuf *ubuf, struct file *memfd,
|
||||
@ -391,6 +385,7 @@ static long udmabuf_create(struct miscdevice *device,
|
||||
struct folio **folios = NULL;
|
||||
pgoff_t pgcnt = 0, pglimit;
|
||||
struct udmabuf *ubuf;
|
||||
struct dma_buf *dmabuf;
|
||||
long ret = -EINVAL;
|
||||
u32 i, flags;
|
||||
|
||||
@ -436,23 +431,39 @@ static long udmabuf_create(struct miscdevice *device,
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Take the inode lock to protect against concurrent
|
||||
* memfd_add_seals(), which takes this lock in write mode.
|
||||
*/
|
||||
inode_lock_shared(file_inode(memfd));
|
||||
ret = check_memfd_seals(memfd);
|
||||
if (ret < 0) {
|
||||
fput(memfd);
|
||||
goto err;
|
||||
}
|
||||
if (ret)
|
||||
goto out_unlock;
|
||||
|
||||
ret = udmabuf_pin_folios(ubuf, memfd, list[i].offset,
|
||||
list[i].size, folios);
|
||||
out_unlock:
|
||||
inode_unlock_shared(file_inode(memfd));
|
||||
fput(memfd);
|
||||
if (ret)
|
||||
goto err;
|
||||
}
|
||||
|
||||
flags = head->flags & UDMABUF_FLAGS_CLOEXEC ? O_CLOEXEC : 0;
|
||||
ret = export_udmabuf(ubuf, device, flags);
|
||||
if (ret < 0)
|
||||
dmabuf = export_udmabuf(ubuf, device);
|
||||
if (IS_ERR(dmabuf)) {
|
||||
ret = PTR_ERR(dmabuf);
|
||||
goto err;
|
||||
}
|
||||
/*
|
||||
* Ownership of ubuf is held by the dmabuf from here.
|
||||
* If the following dma_buf_fd() fails, dma_buf_put() cleans up both the
|
||||
* dmabuf and the ubuf (through udmabuf_ops.release).
|
||||
*/
|
||||
|
||||
ret = dma_buf_fd(dmabuf, flags);
|
||||
if (ret < 0)
|
||||
dma_buf_put(dmabuf);
|
||||
|
||||
kvfree(folios);
|
||||
return ret;
|
||||
|
@ -99,6 +99,7 @@ config DRM_KUNIT_TEST
|
||||
config DRM_KMS_HELPER
|
||||
tristate
|
||||
depends on DRM
|
||||
select FB_CORE if DRM_FBDEV_EMULATION
|
||||
help
|
||||
CRTC helpers for KMS drivers.
|
||||
|
||||
@ -358,6 +359,7 @@ config DRM_TTM_HELPER
|
||||
tristate
|
||||
depends on DRM
|
||||
select DRM_TTM
|
||||
select FB_CORE if DRM_FBDEV_EMULATION
|
||||
select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
||||
help
|
||||
Helpers for ttm-based gem objects
|
||||
@ -365,6 +367,7 @@ config DRM_TTM_HELPER
|
||||
config DRM_GEM_DMA_HELPER
|
||||
tristate
|
||||
depends on DRM
|
||||
select FB_CORE if DRM_FBDEV_EMULATION
|
||||
select FB_DMAMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
||||
help
|
||||
Choose this if you need the GEM DMA helper functions
|
||||
@ -372,6 +375,7 @@ config DRM_GEM_DMA_HELPER
|
||||
config DRM_GEM_SHMEM_HELPER
|
||||
tristate
|
||||
depends on DRM && MMU
|
||||
select FB_CORE if DRM_FBDEV_EMULATION
|
||||
select FB_SYSMEM_HELPERS_DEFERRED if DRM_FBDEV_EMULATION
|
||||
help
|
||||
Choose this if you need the GEM shmem helper functions
|
||||
|
@ -343,11 +343,10 @@ void amdgpu_coredump(struct amdgpu_device *adev, bool skip_vram_check,
|
||||
coredump->skip_vram_check = skip_vram_check;
|
||||
coredump->reset_vram_lost = vram_lost;
|
||||
|
||||
if (job && job->vm) {
|
||||
struct amdgpu_vm *vm = job->vm;
|
||||
if (job && job->pasid) {
|
||||
struct amdgpu_task_info *ti;
|
||||
|
||||
ti = amdgpu_vm_get_task_info_vm(vm);
|
||||
ti = amdgpu_vm_get_task_info_pasid(adev, job->pasid);
|
||||
if (ti) {
|
||||
coredump->reset_task_info = *ti;
|
||||
amdgpu_vm_put_task_info(ti);
|
||||
|
@ -417,6 +417,9 @@ bool amdgpu_device_supports_boco(struct drm_device *dev)
|
||||
{
|
||||
struct amdgpu_device *adev = drm_to_adev(dev);
|
||||
|
||||
if (!IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
|
||||
return false;
|
||||
|
||||
if (adev->has_pr3 ||
|
||||
((adev->flags & AMD_IS_PX) && amdgpu_is_atpx_hybrid()))
|
||||
return true;
|
||||
|
@ -255,7 +255,6 @@ void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,
|
||||
|
||||
void amdgpu_job_free_resources(struct amdgpu_job *job)
|
||||
{
|
||||
struct amdgpu_ring *ring = to_amdgpu_ring(job->base.sched);
|
||||
struct dma_fence *f;
|
||||
unsigned i;
|
||||
|
||||
@ -268,7 +267,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job)
|
||||
f = NULL;
|
||||
|
||||
for (i = 0; i < job->num_ibs; ++i)
|
||||
amdgpu_ib_free(ring->adev, &job->ibs[i], f);
|
||||
amdgpu_ib_free(NULL, &job->ibs[i], f);
|
||||
}
|
||||
|
||||
static void amdgpu_job_free_cb(struct drm_sched_job *s_job)
|
||||
|
@ -1266,10 +1266,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
||||
* next command submission.
|
||||
*/
|
||||
if (amdgpu_vm_is_bo_always_valid(vm, bo)) {
|
||||
uint32_t mem_type = bo->tbo.resource->mem_type;
|
||||
|
||||
if (!(bo->preferred_domains &
|
||||
amdgpu_mem_type_to_domain(mem_type)))
|
||||
if (bo->tbo.resource &&
|
||||
!(bo->preferred_domains &
|
||||
amdgpu_mem_type_to_domain(bo->tbo.resource->mem_type)))
|
||||
amdgpu_vm_bo_evicted(&bo_va->base);
|
||||
else
|
||||
amdgpu_vm_bo_idle(&bo_va->base);
|
||||
|
@ -4123,7 +4123,7 @@ static int gfx_v12_0_set_clockgating_state(void *handle,
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return 0;
|
||||
|
||||
switch (adev->ip_versions[GC_HWIP][0]) {
|
||||
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
|
||||
case IP_VERSION(12, 0, 0):
|
||||
case IP_VERSION(12, 0, 1):
|
||||
gfx_v12_0_update_gfx_clock_gating(adev,
|
||||
|
@ -108,7 +108,7 @@ mmhub_v4_1_0_print_l2_protection_fault_status(struct amdgpu_device *adev,
|
||||
dev_err(adev->dev,
|
||||
"MMVM_L2_PROTECTION_FAULT_STATUS_LO32:0x%08X\n",
|
||||
status);
|
||||
switch (adev->ip_versions[MMHUB_HWIP][0]) {
|
||||
switch (amdgpu_ip_version(adev, MMHUB_HWIP, 0)) {
|
||||
case IP_VERSION(4, 1, 0):
|
||||
mmhub_cid = mmhub_client_ids_v4_1_0[cid][rw];
|
||||
break;
|
||||
|
@ -271,8 +271,19 @@ const struct nbio_hdp_flush_reg nbio_v7_0_hdp_flush_reg = {
|
||||
.ref_and_mask_sdma1 = GPU_HDP_FLUSH_DONE__SDMA1_MASK,
|
||||
};
|
||||
|
||||
#define regRCC_DEV0_EPF6_STRAP4 0xd304
|
||||
#define regRCC_DEV0_EPF6_STRAP4_BASE_IDX 5
|
||||
|
||||
static void nbio_v7_0_init_registers(struct amdgpu_device *adev)
|
||||
{
|
||||
uint32_t data;
|
||||
|
||||
switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
|
||||
case IP_VERSION(2, 5, 0):
|
||||
data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF6_STRAP4) & ~BIT(23);
|
||||
WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF6_STRAP4, data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)
|
||||
|
@ -275,7 +275,7 @@ static void nbio_v7_11_init_registers(struct amdgpu_device *adev)
|
||||
if (def != data)
|
||||
WREG32_SOC15(NBIO, 0, regBIF_BIF256_CI256_RC3X4_USB4_PCIE_MST_CTRL_3, data);
|
||||
|
||||
switch (adev->ip_versions[NBIO_HWIP][0]) {
|
||||
switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
|
||||
case IP_VERSION(7, 11, 0):
|
||||
case IP_VERSION(7, 11, 1):
|
||||
case IP_VERSION(7, 11, 2):
|
||||
|
@ -247,7 +247,7 @@ static void nbio_v7_7_init_registers(struct amdgpu_device *adev)
|
||||
if (def != data)
|
||||
WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data);
|
||||
|
||||
switch (adev->ip_versions[NBIO_HWIP][0]) {
|
||||
switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) {
|
||||
case IP_VERSION(7, 7, 0):
|
||||
data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23);
|
||||
WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data);
|
||||
|
@ -2096,7 +2096,7 @@ static int smu_v14_0_2_enable_gfx_features(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
|
||||
if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(14, 0, 2))
|
||||
if (amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(14, 0, 2))
|
||||
return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_EnableAllSmuFeatures,
|
||||
FEATURE_PWR_GFX, NULL);
|
||||
else
|
||||
|
@ -1896,8 +1896,8 @@ static void destroy_mgr(struct drm_dp_tunnel_mgr *mgr)
|
||||
*
|
||||
* Creates a DP tunnel manager for @dev.
|
||||
*
|
||||
* Returns a pointer to the tunnel manager if created successfully or NULL in
|
||||
* case of an error.
|
||||
* Returns a pointer to the tunnel manager if created successfully or error
|
||||
* pointer in case of failure.
|
||||
*/
|
||||
struct drm_dp_tunnel_mgr *
|
||||
drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
|
||||
@ -1907,7 +1907,7 @@ drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
|
||||
|
||||
mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
|
||||
if (!mgr)
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mgr->dev = dev;
|
||||
init_waitqueue_head(&mgr->bw_req_queue);
|
||||
@ -1916,7 +1916,7 @@ drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
|
||||
if (!mgr->groups) {
|
||||
kfree(mgr);
|
||||
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DRM_DISPLAY_DP_TUNNEL_STATE_DEBUG
|
||||
@ -1927,7 +1927,7 @@ drm_dp_tunnel_mgr_create(struct drm_device *dev, int max_group_count)
|
||||
if (!init_group(mgr, &mgr->groups[i])) {
|
||||
destroy_mgr(mgr);
|
||||
|
||||
return NULL;
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
mgr->group_count++;
|
||||
|
@ -1287,14 +1287,11 @@ EXPORT_SYMBOL(drm_mode_set_name);
|
||||
*/
|
||||
int drm_mode_vrefresh(const struct drm_display_mode *mode)
|
||||
{
|
||||
unsigned int num, den;
|
||||
unsigned int num = 1, den = 1;
|
||||
|
||||
if (mode->htotal == 0 || mode->vtotal == 0)
|
||||
return 0;
|
||||
|
||||
num = mode->clock;
|
||||
den = mode->htotal * mode->vtotal;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
|
||||
num *= 2;
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
|
||||
@ -1302,6 +1299,12 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
|
||||
if (mode->vscan > 1)
|
||||
den *= mode->vscan;
|
||||
|
||||
if (check_mul_overflow(mode->clock, num, &num))
|
||||
return 0;
|
||||
|
||||
if (check_mul_overflow(mode->htotal * mode->vtotal, den, &den))
|
||||
return 0;
|
||||
|
||||
return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_mode_vrefresh);
|
||||
|
@ -343,6 +343,11 @@ struct intel_engine_guc_stats {
|
||||
* @start_gt_clk: GT clock time of last idle to active transition.
|
||||
*/
|
||||
u64 start_gt_clk;
|
||||
|
||||
/**
|
||||
* @total: The last value of total returned
|
||||
*/
|
||||
u64 total;
|
||||
};
|
||||
|
||||
union intel_engine_tlb_inv_reg {
|
||||
|
@ -1243,6 +1243,21 @@ static void __get_engine_usage_record(struct intel_engine_cs *engine,
|
||||
} while (++i < 6);
|
||||
}
|
||||
|
||||
static void __set_engine_usage_record(struct intel_engine_cs *engine,
|
||||
u32 last_in, u32 id, u32 total)
|
||||
{
|
||||
struct iosys_map rec_map = intel_guc_engine_usage_record_map(engine);
|
||||
|
||||
#define record_write(map_, field_, val_) \
|
||||
iosys_map_wr_field(map_, 0, struct guc_engine_usage_record, field_, val_)
|
||||
|
||||
record_write(&rec_map, last_switch_in_stamp, last_in);
|
||||
record_write(&rec_map, current_context_index, id);
|
||||
record_write(&rec_map, total_runtime, total);
|
||||
|
||||
#undef record_write
|
||||
}
|
||||
|
||||
static void guc_update_engine_gt_clks(struct intel_engine_cs *engine)
|
||||
{
|
||||
struct intel_engine_guc_stats *stats = &engine->stats.guc;
|
||||
@ -1363,9 +1378,12 @@ static ktime_t guc_engine_busyness(struct intel_engine_cs *engine, ktime_t *now)
|
||||
total += intel_gt_clock_interval_to_ns(gt, clk);
|
||||
}
|
||||
|
||||
if (total > stats->total)
|
||||
stats->total = total;
|
||||
|
||||
spin_unlock_irqrestore(&guc->timestamp.lock, flags);
|
||||
|
||||
return ns_to_ktime(total);
|
||||
return ns_to_ktime(stats->total);
|
||||
}
|
||||
|
||||
static void guc_enable_busyness_worker(struct intel_guc *guc)
|
||||
@ -1431,8 +1449,21 @@ static void __reset_guc_busyness_stats(struct intel_guc *guc)
|
||||
|
||||
guc_update_pm_timestamp(guc, &unused);
|
||||
for_each_engine(engine, gt, id) {
|
||||
struct intel_engine_guc_stats *stats = &engine->stats.guc;
|
||||
|
||||
guc_update_engine_gt_clks(engine);
|
||||
engine->stats.guc.prev_total = 0;
|
||||
|
||||
/*
|
||||
* If resetting a running context, accumulate the active
|
||||
* time as well since there will be no context switch.
|
||||
*/
|
||||
if (stats->running) {
|
||||
u64 clk = guc->timestamp.gt_stamp - stats->start_gt_clk;
|
||||
|
||||
stats->total_gt_clks += clk;
|
||||
}
|
||||
stats->prev_total = 0;
|
||||
stats->running = 0;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&guc->timestamp.lock, flags);
|
||||
@ -1543,6 +1574,9 @@ static void guc_timestamp_ping(struct work_struct *wrk)
|
||||
|
||||
static int guc_action_enable_usage_stats(struct intel_guc *guc)
|
||||
{
|
||||
struct intel_gt *gt = guc_to_gt(guc);
|
||||
struct intel_engine_cs *engine;
|
||||
enum intel_engine_id id;
|
||||
u32 offset = intel_guc_engine_usage_offset(guc);
|
||||
u32 action[] = {
|
||||
INTEL_GUC_ACTION_SET_ENG_UTIL_BUFF,
|
||||
@ -1550,6 +1584,9 @@ static int guc_action_enable_usage_stats(struct intel_guc *guc)
|
||||
0,
|
||||
};
|
||||
|
||||
for_each_engine(engine, gt, id)
|
||||
__set_engine_usage_record(engine, 0, 0xffffffff, 0);
|
||||
|
||||
return intel_guc_send(guc, action, ARRAY_SIZE(action));
|
||||
}
|
||||
|
||||
|
@ -565,6 +565,8 @@ static int hx83102_get_modes(struct drm_panel *panel,
|
||||
struct drm_display_mode *mode;
|
||||
|
||||
mode = drm_mode_duplicate(connector->dev, m);
|
||||
if (!mode)
|
||||
return -ENOMEM;
|
||||
|
||||
mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
|
||||
drm_mode_set_name(mode);
|
||||
|
@ -481,9 +481,9 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
|
||||
return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n");
|
||||
|
||||
nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
|
||||
if (!nt->dsi[1]) {
|
||||
if (IS_ERR(nt->dsi[1])) {
|
||||
dev_err(dev, "Cannot get secondary DSI node\n");
|
||||
return -ENODEV;
|
||||
return PTR_ERR(nt->dsi[1]);
|
||||
}
|
||||
num_dsis++;
|
||||
}
|
||||
|
@ -1177,6 +1177,7 @@ static int st7701_probe(struct device *dev, int connector_type)
|
||||
return dev_err_probe(dev, ret, "Failed to get orientation\n");
|
||||
|
||||
drm_panel_init(&st7701->panel, dev, &st7701_funcs, connector_type);
|
||||
st7701->panel.prepare_prev_first = true;
|
||||
|
||||
/**
|
||||
* Once sleep out has been issued, ST7701 IC required to wait 120ms
|
||||
|
@ -325,7 +325,7 @@ static void r63353_panel_shutdown(struct mipi_dsi_device *dsi)
|
||||
{
|
||||
struct r63353_panel *rpanel = mipi_dsi_get_drvdata(dsi);
|
||||
|
||||
r63353_panel_unprepare(&rpanel->base);
|
||||
drm_panel_unprepare(&rpanel->base);
|
||||
}
|
||||
|
||||
static const struct r63353_desc sharp_ls068b3sx02_data = {
|
||||
|
@ -1355,7 +1355,8 @@ EXPORT_SYMBOL(drm_sched_init);
|
||||
* drm_sched_backend_ops.run_job(). Consequently, drm_sched_backend_ops.free_job()
|
||||
* will not be called for all jobs still in drm_gpu_scheduler.pending_list.
|
||||
* There is no solution for this currently. Thus, it is up to the driver to make
|
||||
* sure that
|
||||
* sure that:
|
||||
*
|
||||
* a) drm_sched_fini() is only called after for all submitted jobs
|
||||
* drm_sched_backend_ops.free_job() has been called or that
|
||||
* b) the jobs for which drm_sched_backend_ops.free_job() has not been called
|
||||
|
@ -120,6 +120,7 @@ config PMAC_MEDIABAY
|
||||
config PMAC_BACKLIGHT
|
||||
bool "Backlight control for LCD screens"
|
||||
depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64)
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y
|
||||
select FB_BACKLIGHT
|
||||
help
|
||||
Say Y here to enable Macintosh specific extensions of the generic
|
||||
|
@ -3,6 +3,7 @@ menuconfig FB_TFT
|
||||
tristate "Support for small TFT LCD display modules"
|
||||
depends on FB && SPI
|
||||
depends on FB_DEVICE
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
select FB_BACKLIGHT
|
||||
select FB_SYSMEM_HELPERS_DEFERRED
|
||||
|
@ -649,6 +649,7 @@ config FB_S1D13XXX
|
||||
config FB_ATMEL
|
||||
tristate "AT91 LCD Controller support"
|
||||
depends on FB && OF && HAVE_CLK && HAS_IOMEM
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
depends on HAVE_FB_ATMEL || COMPILE_TEST
|
||||
select FB_BACKLIGHT
|
||||
select FB_IOMEM_HELPERS
|
||||
@ -660,7 +661,6 @@ config FB_ATMEL
|
||||
config FB_NVIDIA
|
||||
tristate "nVidia Framebuffer Support"
|
||||
depends on FB && PCI
|
||||
select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
@ -700,6 +700,8 @@ config FB_NVIDIA_DEBUG
|
||||
config FB_NVIDIA_BACKLIGHT
|
||||
bool "Support for backlight control"
|
||||
depends on FB_NVIDIA
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA
|
||||
select FB_BACKLIGHT
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to control the backlight of your display.
|
||||
@ -707,7 +709,6 @@ config FB_NVIDIA_BACKLIGHT
|
||||
config FB_RIVA
|
||||
tristate "nVidia Riva support"
|
||||
depends on FB && PCI
|
||||
select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
@ -747,6 +748,8 @@ config FB_RIVA_DEBUG
|
||||
config FB_RIVA_BACKLIGHT
|
||||
bool "Support for backlight control"
|
||||
depends on FB_RIVA
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA
|
||||
select FB_BACKLIGHT
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to control the backlight of your display.
|
||||
@ -934,7 +937,6 @@ config FB_MATROX_MAVEN
|
||||
config FB_RADEON
|
||||
tristate "ATI Radeon display support"
|
||||
depends on FB && PCI
|
||||
select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
@ -960,6 +962,8 @@ config FB_RADEON_I2C
|
||||
config FB_RADEON_BACKLIGHT
|
||||
bool "Support for backlight control"
|
||||
depends on FB_RADEON
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RADEON
|
||||
select FB_BACKLIGHT
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to control the backlight of your display.
|
||||
@ -975,7 +979,6 @@ config FB_RADEON_DEBUG
|
||||
config FB_ATY128
|
||||
tristate "ATI Rage128 display support"
|
||||
depends on FB && PCI
|
||||
select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
|
||||
select FB_IOMEM_HELPERS
|
||||
select FB_MACMODES if PPC_PMAC
|
||||
help
|
||||
@ -989,6 +992,8 @@ config FB_ATY128
|
||||
config FB_ATY128_BACKLIGHT
|
||||
bool "Support for backlight control"
|
||||
depends on FB_ATY128
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY128
|
||||
select FB_BACKLIGHT
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to control the backlight of your display.
|
||||
@ -999,7 +1004,6 @@ config FB_ATY
|
||||
select FB_CFB_FILLRECT
|
||||
select FB_CFB_COPYAREA
|
||||
select FB_CFB_IMAGEBLIT
|
||||
select FB_BACKLIGHT if FB_ATY_BACKLIGHT
|
||||
select FB_IOMEM_FOPS
|
||||
select FB_MACMODES if PPC
|
||||
select FB_ATY_CT if SPARC64 && PCI
|
||||
@ -1040,6 +1044,8 @@ config FB_ATY_GX
|
||||
config FB_ATY_BACKLIGHT
|
||||
bool "Support for backlight control"
|
||||
depends on FB_ATY
|
||||
depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY
|
||||
select FB_BACKLIGHT
|
||||
default y
|
||||
help
|
||||
Say Y here if you want to control the backlight of your display.
|
||||
@ -1528,6 +1534,7 @@ config FB_SH_MOBILE_LCDC
|
||||
depends on FB && HAVE_CLK && HAS_IOMEM
|
||||
depends on SUPERH || COMPILE_TEST
|
||||
depends on FB_DEVICE
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
select FB_BACKLIGHT
|
||||
select FB_DEFERRED_IO
|
||||
select FB_DMAMEM_HELPERS
|
||||
@ -1793,6 +1800,7 @@ config FB_SSD1307
|
||||
tristate "Solomon SSD1307 framebuffer support"
|
||||
depends on FB && I2C
|
||||
depends on GPIOLIB || COMPILE_TEST
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
select FB_BACKLIGHT
|
||||
select FB_SYSMEM_HELPERS_DEFERRED
|
||||
help
|
||||
|
@ -183,9 +183,8 @@ config FB_SYSMEM_HELPERS_DEFERRED
|
||||
select FB_SYSMEM_HELPERS
|
||||
|
||||
config FB_BACKLIGHT
|
||||
tristate
|
||||
bool
|
||||
depends on FB
|
||||
select BACKLIGHT_CLASS_DEVICE
|
||||
|
||||
config FB_MODE_HELPERS
|
||||
bool "Enable Video Mode Handling Helpers"
|
||||
|
Loading…
Reference in New Issue
Block a user