Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,11 @@ CONFIG_AUXDISPLAY=y
CONFIG_HD44780=m
CONFIG_DRM=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_XE=m
CONFIG_DRM_UDL=m
CONFIG_DRM_PANEL_LVDS=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E=m
Expand Down Expand Up @@ -1623,7 +1628,7 @@ CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
CONFIG_EXFAT_FS=m
CONFIG_NTFS3_FS=m
CONFIG_TMPFS=y
# CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_ECRYPT_FS=m
CONFIG_HFS_FS=m
Expand Down
7 changes: 6 additions & 1 deletion arch/arm64/configs/bcm2712_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,11 @@ CONFIG_AUXDISPLAY=y
CONFIG_HD44780=m
CONFIG_DRM=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_AMDGPU=m
CONFIG_DRM_AMDGPU_SI=y
CONFIG_DRM_AMDGPU_CIK=y
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_XE=m
CONFIG_DRM_UDL=m
CONFIG_DRM_PANEL_LVDS=m
CONFIG_DRM_PANEL_ILITEK_ILI9806E=m
Expand Down Expand Up @@ -1625,7 +1630,7 @@ CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
CONFIG_EXFAT_FS=m
CONFIG_NTFS3_FS=m
CONFIG_TMPFS=y
# CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_ECRYPT_FS=m
CONFIG_HFS_FS=m
Expand Down
10 changes: 7 additions & 3 deletions drivers/gpu/drm/ttm/ttm_bo_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
.no_wait_gpu = false
};
struct ttm_tt *ttm = bo->ttm;
struct ttm_resource_manager *man =
ttm_manager_type(bo->bdev, bo->resource->mem_type);
pgprot_t prot;
int ret;

Expand All @@ -359,6 +357,9 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
if (ret)
return ret;

#ifndef CONFIG_ARM64
struct ttm_resource_manager *man =
ttm_manager_type(bo->bdev, bo->resource->mem_type);
if (num_pages == 1 && ttm->caching == ttm_cached &&
!(man->use_tt && (ttm->page_flags & TTM_TT_FLAG_DECRYPTED))) {
/*
Expand All @@ -369,7 +370,10 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
map->bo_kmap_type = ttm_bo_map_kmap;
map->page = ttm->pages[start_page];
map->virtual = kmap(map->page);
} else {
}
else
#endif
{
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opening brace appears to be orphaned after removing the conditional logic. This should likely be removed or the control flow restructured to maintain proper code organization.

Copilot uses AI. Check for mistakes.
/*
* We need to use vmap to get the desired page protection
* or to make the buffer object look contiguous.
Expand Down
6 changes: 5 additions & 1 deletion drivers/gpu/drm/ttm/ttm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@
pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
{
/* Cached mappings need no adjustment */
if (caching == ttm_cached)
if (caching == ttm_cached) {
#ifdef CONFIG_ARM64
return pgprot_dmacoherent(tmp);
#endif
return tmp;
}

#if defined(__i386__) || defined(__x86_64__)
if (caching == ttm_write_combined)
Expand Down
24 changes: 23 additions & 1 deletion drivers/pci/setup-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -2398,6 +2398,26 @@ void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge)
}
EXPORT_SYMBOL_GPL(pci_assign_unassigned_bridge_resources);

static void pci_release_resource_type(struct pci_dev *pdev, unsigned long type)
{
int i;

if (!device_trylock(&pdev->dev))
return;

if (pdev->dev.driver)
goto unlock;

for (i = 0; i < PCI_STD_NUM_BARS; i++) {
if (pci_resource_len(pdev, i) &&
!((pci_resource_flags(pdev, i) ^ type) & PCI_RES_TYPE_MASK))
pci_release_resource(pdev, i);
}

unlock:
device_unlock(&pdev->dev);
}

int pci_reassign_bridge_resources(struct pci_dev *bridge, unsigned long type)
{
struct pci_dev_resource *dev_res;
Expand Down Expand Up @@ -2432,8 +2452,10 @@ int pci_reassign_bridge_resources(struct pci_dev *bridge, unsigned long type)

pci_info(bridge, "%s %pR: releasing\n", res_name, res);

if (res->parent)
if (res->parent) {
release_resource(res);
pci_release_resource_type(bridge, type);
}
res->start = 0;
res->end = 0;
break;
Expand Down
Loading