Short summary of fixes pull:
imagination: - kconfig: Fix dependencies nouveau: - Set DMA mask earlier - Advertize correct modifiers for GB20x pixpaper: - kconfig: Fix dependencies sched: - Fix deadlock -----BEGIN PGP SIGNATURE----- iQFPBAABCgA5FiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmkMnnYbFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyAAoJEGgNwR1TC3ojMA0H+wZWeGYDmERJGLgNgcVl uhtY4zot8V0DoAfSodQaEDNmLH4ndwFtIsq6i4RB1kpy967Dzh6HpOq5emY00p1W xpUdjCLqrH1zUqXy8GBMXxVVfVX9ac8pXlz9Zg9atasOF1Ed0SPmjz12dm9njYtf 9tTj/IpibgqOiHQnYmrYDXne5HogZP0+wugt9OoOq8x/ywj9cHBG1c71PhmD8OeD ptTgQ2eojDI7CtGc7hm37pAWrGp0qpd+dLJK8cduTc1GmzTcNZKZL/UgjjkwLHqT ecrPMpZ0kRuciDBZ7kDPHj04bNaFxjrTAYhvRLsZxCKZaixjiKSjzlC1kxUtHNIN eNg= =qfVw -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2025-11-06' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: imagination: - kconfig: Fix dependencies nouveau: - Set DMA mask earlier - Advertize correct modifiers for GB20x pixpaper: - kconfig: Fix dependencies sched: - Fix deadlock Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20251106131244.GA155679@2a02-2454-fd5e-fd00-d540-1fd5-75b4-d5e2.dyn6.pyur.net
This commit is contained in:
commit
faf66a7107
|
|
@ -7,6 +7,7 @@ config DRM_POWERVR
|
|||
depends on DRM
|
||||
depends on MMU
|
||||
depends on PM
|
||||
depends on POWER_SEQUENCING || !POWER_SEQUENCING
|
||||
select DRM_EXEC
|
||||
select DRM_GEM_SHMEM_HELPER
|
||||
select DRM_SCHED
|
||||
|
|
|
|||
|
|
@ -2867,7 +2867,9 @@ nv50_display_create(struct drm_device *dev)
|
|||
}
|
||||
|
||||
/* Assign the correct format modifiers */
|
||||
if (disp->disp->object.oclass >= TU102_DISP)
|
||||
if (disp->disp->object.oclass >= GB202_DISP)
|
||||
nouveau_display(dev)->format_modifiers = wndwca7e_modifiers;
|
||||
else if (disp->disp->object.oclass >= TU102_DISP)
|
||||
nouveau_display(dev)->format_modifiers = wndwc57e_modifiers;
|
||||
else
|
||||
if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
|
||||
|
|
|
|||
|
|
@ -104,4 +104,5 @@ struct nouveau_encoder *nv50_real_outp(struct drm_encoder *encoder);
|
|||
extern const u64 disp50xx_modifiers[];
|
||||
extern const u64 disp90xx_modifiers[];
|
||||
extern const u64 wndwc57e_modifiers[];
|
||||
extern const u64 wndwca7e_modifiers[];
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -786,13 +786,14 @@ nv50_wndw_destroy(struct drm_plane *plane)
|
|||
}
|
||||
|
||||
/* This function assumes the format has already been validated against the plane
|
||||
* and the modifier was validated against the device-wides modifier list at FB
|
||||
* and the modifier was validated against the device-wide modifier list at FB
|
||||
* creation time.
|
||||
*/
|
||||
static bool nv50_plane_format_mod_supported(struct drm_plane *plane,
|
||||
u32 format, u64 modifier)
|
||||
{
|
||||
struct nouveau_drm *drm = nouveau_drm(plane->dev);
|
||||
const struct drm_format_info *info = drm_format_info(format);
|
||||
uint8_t i;
|
||||
|
||||
/* All chipsets can display all formats in linear layout */
|
||||
|
|
@ -800,13 +801,32 @@ static bool nv50_plane_format_mod_supported(struct drm_plane *plane,
|
|||
return true;
|
||||
|
||||
if (drm->client.device.info.chipset < 0xc0) {
|
||||
const struct drm_format_info *info = drm_format_info(format);
|
||||
const uint8_t kind = (modifier >> 12) & 0xff;
|
||||
|
||||
if (!format) return false;
|
||||
|
||||
for (i = 0; i < info->num_planes; i++)
|
||||
if ((info->cpp[i] != 4) && kind != 0x70) return false;
|
||||
} else if (drm->client.device.info.chipset >= 0x1b2) {
|
||||
const uint8_t slayout = ((modifier >> 22) & 0x1) |
|
||||
((modifier >> 25) & 0x6);
|
||||
|
||||
if (!format)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Note in practice this implies only formats where cpp is equal
|
||||
* for each plane, or >= 4 for all planes, are supported.
|
||||
*/
|
||||
for (i = 0; i < info->num_planes; i++) {
|
||||
if (((info->cpp[i] == 2) && slayout != 3) ||
|
||||
((info->cpp[i] == 1) && slayout != 2) ||
|
||||
((info->cpp[i] >= 4) && slayout != 1))
|
||||
return false;
|
||||
|
||||
/* 24-bit not supported. It has yet another layout */
|
||||
WARN_ON(info->cpp[i] == 3);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,39 @@ wndwca7e_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
* Log2(block height) ----------------------------+ *
|
||||
* Page Kind ----------------------------------+ | *
|
||||
* Gob Height/Page Kind Generation ------+ | | *
|
||||
* Sector layout -------+ | | | *
|
||||
* Compression ------+ | | | | */
|
||||
const u64 wndwca7e_modifiers[] = { /* | | | | | */
|
||||
/* 4cpp+ modifiers */
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 0),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 1),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 2),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 3),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 4),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 1, 2, 0x06, 5),
|
||||
/* 1cpp/8bpp modifiers */
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 0),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 1),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 2),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 3),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 4),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 2, 2, 0x06, 5),
|
||||
/* 2cpp/16bpp modifiers */
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 0),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 1),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 2),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 3),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 4),
|
||||
DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 3, 2, 0x06, 5),
|
||||
/* All formats support linear */
|
||||
DRM_FORMAT_MOD_LINEAR,
|
||||
DRM_FORMAT_MOD_INVALID
|
||||
};
|
||||
|
||||
static const struct nv50_wndw_func
|
||||
wndwca7e = {
|
||||
.acquire = wndwc37e_acquire,
|
||||
|
|
|
|||
|
|
@ -1695,6 +1695,18 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
|
|||
*pdevice = &pdev->device;
|
||||
pdev->pdev = pci_dev;
|
||||
|
||||
/* Set DMA mask based on capabilities reported by the MMU subdev. */
|
||||
if (pdev->device.mmu && !pdev->device.pci->agp.bridge)
|
||||
bits = pdev->device.mmu->dma_bits;
|
||||
else
|
||||
bits = 32;
|
||||
|
||||
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(bits));
|
||||
if (ret && bits != 32) {
|
||||
dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
|
||||
pdev->device.mmu->dma_bits = 32;
|
||||
}
|
||||
|
||||
ret = nvkm_device_ctor(&nvkm_device_pci_func, quirk, &pci_dev->dev,
|
||||
pci_is_pcie(pci_dev) ? NVKM_DEVICE_PCIE :
|
||||
pci_find_capability(pci_dev, PCI_CAP_ID_AGP) ?
|
||||
|
|
@ -1708,17 +1720,5 @@ nvkm_device_pci_new(struct pci_dev *pci_dev, const char *cfg, const char *dbg,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Set DMA mask based on capabilities reported by the MMU subdev. */
|
||||
if (pdev->device.mmu && !pdev->device.pci->agp.bridge)
|
||||
bits = pdev->device.mmu->dma_bits;
|
||||
else
|
||||
bits = 32;
|
||||
|
||||
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(bits));
|
||||
if (ret && bits != 32) {
|
||||
dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
|
||||
pdev->device.mmu->dma_bits = 32;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -173,26 +173,15 @@ int drm_sched_entity_error(struct drm_sched_entity *entity)
|
|||
}
|
||||
EXPORT_SYMBOL(drm_sched_entity_error);
|
||||
|
||||
static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
|
||||
struct dma_fence_cb *cb);
|
||||
|
||||
static void drm_sched_entity_kill_jobs_work(struct work_struct *wrk)
|
||||
{
|
||||
struct drm_sched_job *job = container_of(wrk, typeof(*job), work);
|
||||
|
||||
drm_sched_fence_scheduled(job->s_fence, NULL);
|
||||
drm_sched_fence_finished(job->s_fence, -ESRCH);
|
||||
WARN_ON(job->s_fence->parent);
|
||||
job->sched->ops->free_job(job);
|
||||
}
|
||||
|
||||
/* Signal the scheduler finished fence when the entity in question is killed. */
|
||||
static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
|
||||
struct dma_fence_cb *cb)
|
||||
{
|
||||
struct drm_sched_job *job = container_of(cb, struct drm_sched_job,
|
||||
finish_cb);
|
||||
struct dma_fence *f;
|
||||
unsigned long index;
|
||||
|
||||
dma_fence_put(f);
|
||||
|
||||
/* Wait for all dependencies to avoid data corruptions */
|
||||
xa_for_each(&job->dependencies, index, f) {
|
||||
struct drm_sched_fence *s_fence = to_drm_sched_fence(f);
|
||||
|
|
@ -220,6 +209,21 @@ static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
|
|||
dma_fence_put(f);
|
||||
}
|
||||
|
||||
drm_sched_fence_scheduled(job->s_fence, NULL);
|
||||
drm_sched_fence_finished(job->s_fence, -ESRCH);
|
||||
WARN_ON(job->s_fence->parent);
|
||||
job->sched->ops->free_job(job);
|
||||
}
|
||||
|
||||
/* Signal the scheduler finished fence when the entity in question is killed. */
|
||||
static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
|
||||
struct dma_fence_cb *cb)
|
||||
{
|
||||
struct drm_sched_job *job = container_of(cb, struct drm_sched_job,
|
||||
finish_cb);
|
||||
|
||||
dma_fence_put(f);
|
||||
|
||||
INIT_WORK(&job->work, drm_sched_entity_kill_jobs_work);
|
||||
schedule_work(&job->work);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ config DRM_PANEL_MIPI_DBI
|
|||
config DRM_PIXPAPER
|
||||
tristate "DRM support for PIXPAPER display panels"
|
||||
depends on DRM && SPI
|
||||
depends on MMU
|
||||
select DRM_CLIENT_SELECTION
|
||||
select DRM_GEM_SHMEM_HELPER
|
||||
select DRM_KMS_HELPER
|
||||
|
|
|
|||
|
|
@ -979,14 +979,20 @@ extern "C" {
|
|||
* 2 = Gob Height 8, Turing+ Page Kind mapping
|
||||
* 3 = Reserved for future use.
|
||||
*
|
||||
* 22:22 s Sector layout. On Tegra GPUs prior to Xavier, there is a further
|
||||
* bit remapping step that occurs at an even lower level than the
|
||||
* page kind and block linear swizzles. This causes the layout of
|
||||
* surfaces mapped in those SOC's GPUs to be incompatible with the
|
||||
* equivalent mapping on other GPUs in the same system.
|
||||
* 22:22 s Sector layout. There is a further bit remapping step that occurs
|
||||
* 26:27 at an even lower level than the page kind and block linear
|
||||
* swizzles. This causes the bit arrangement of surfaces in memory
|
||||
* to differ subtly, and prevents direct sharing of surfaces between
|
||||
* GPUs with different layouts.
|
||||
*
|
||||
* 0 = Tegra K1 - Tegra Parker/TX2 Layout.
|
||||
* 1 = Desktop GPU and Tegra Xavier+ Layout
|
||||
* 0 = Tegra K1 - Tegra Parker/TX2 Layout
|
||||
* 1 = Pre-GB20x, GB20x 32+ bpp, GB10, Tegra Xavier-Orin Layout
|
||||
* 2 = GB20x(Blackwell 2)+ 8 bpp surface layout
|
||||
* 3 = GB20x(Blackwell 2)+ 16 bpp surface layout
|
||||
* 4 = Reserved for future use.
|
||||
* 5 = Reserved for future use.
|
||||
* 6 = Reserved for future use.
|
||||
* 7 = Reserved for future use.
|
||||
*
|
||||
* 25:23 c Lossless Framebuffer Compression type.
|
||||
*
|
||||
|
|
@ -1001,7 +1007,7 @@ extern "C" {
|
|||
* 6 = Reserved for future use
|
||||
* 7 = Reserved for future use
|
||||
*
|
||||
* 55:25 - Reserved for future use. Must be zero.
|
||||
* 55:28 - Reserved for future use. Must be zero.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c, s, g, k, h) \
|
||||
fourcc_mod_code(NVIDIA, (0x10 | \
|
||||
|
|
@ -1009,6 +1015,7 @@ extern "C" {
|
|||
(((k) & 0xff) << 12) | \
|
||||
(((g) & 0x3) << 20) | \
|
||||
(((s) & 0x1) << 22) | \
|
||||
(((s) & 0x6) << 25) | \
|
||||
(((c) & 0x7) << 23)))
|
||||
|
||||
/* To grandfather in prior block linear format modifiers to the above layout,
|
||||
|
|
|
|||
Loading…
Reference in New Issue