Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-next-2021-09-10' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
"Just an initial bunch of fixes for the merge window, amdgpu is most of
them with a few ttm fixes and an fbdev avoid multiply overflow fix.

core:
- Make some dma-buf config options depend on DMA_SHARED_BUFFER
- Handle multiplication overflow of fbdev xres/yres in the core

ttm:
- Fix ttm_bo_move_memcpy() when ttm_resource is subclassed
- Fix ttm deadlock if target BO isn't idle
- ttm build fix
- ttm docs fix

dma-buf:
- config option fixes

fbdev:
- limit resolutions to avoid int overflow

i915:
- stddef change.

amdgpu:
- Misc cleanups, typo fixes
- EEPROM fix
- Add some new PCI IDs
- Scatter/Gather display support for Yellow Carp
- PCIe DPM fix for RKL platforms
- RAS fix

amdkfd:
- SVM fix

vc4:
- static function fix

mgag200:
- fix uninit var

panfrost:
- lock_region fixes"

* tag 'drm-next-2021-09-10' of git://anongit.freedesktop.org/drm/drm: (36 commits)
drm/ttm: Fix a deadlock if the target BO is not idle during swap
fbmem: don't allow too huge resolutions
dma-buf: DMABUF_SYSFS_STATS should depend on DMA_SHARED_BUFFER
dma-buf: DMABUF_DEBUG should depend on DMA_SHARED_BUFFER
drm/i915: use linux/stddef.h due to "isystem: trim/fixup stdarg.h and other headers"
dma-buf: DMABUF_MOVE_NOTIFY should depend on DMA_SHARED_BUFFER
drm/amdkfd: drop process ref count when xnack disable
drm/amdgpu: enable more pm sysfs under SRIOV 1-VF mode
drm/amdgpu: fix fdinfo race with process exit
drm/amdgpu: Fix a deadlock if previous GEM object allocation fails
drm/amdgpu: stop scheduler when calling hw_fini (v2)
drm/amdgpu: Clear RAS interrupt status on aldebaran
drm/amd/display: Initialize lt_settings on instantiation
drm/amd/display: cleanup idents after a revert
drm/amd/display: Fix memory leak reported by coverity
drm/ttm: Fix ttm_bo_move_memcpy() for subclassed struct ttm_resource
drm/amdgpu/swsmu: fix spelling mistake "minimun" -> "minimum"
drm/amdgpu: Disable PCIE_DPM on Intel RKL Platform
drm/amdgpu: show both cmd id and name when psp cmd failed
drm/amd/display: setup system context for APUs
...

+233 -132
+1 -1
Documentation/gpu/drm-mm.rst
··· 37 37 This section is outdated. 38 38 39 39 Drivers wishing to support TTM must pass a filled :c:type:`ttm_bo_driver 40 - <ttm_bo_driver>` structure to ttm_bo_device_init, together with an 40 + <ttm_bo_driver>` structure to ttm_device_init, together with an 41 41 initialized global reference to the memory manager. The ttm_bo_driver 42 42 structure contains several fields with function pointers for 43 43 initializing the TTM, allocating and freeing memory, waiting for command
+3 -1
drivers/dma-buf/Kconfig
··· 42 42 config DMABUF_MOVE_NOTIFY 43 43 bool "Move notify between drivers (EXPERIMENTAL)" 44 44 default n 45 + depends on DMA_SHARED_BUFFER 45 46 help 46 47 Don't pin buffers if the dynamic DMA-buf interface is available on 47 48 both the exporter as well as the importer. This fixes a security ··· 53 52 54 53 config DMABUF_DEBUG 55 54 bool "DMA-BUF debug checks" 55 + depends on DMA_SHARED_BUFFER 56 56 default y if DMA_API_DEBUG 57 57 help 58 58 This option enables additional checks for DMA-BUF importers and ··· 76 74 77 75 menuconfig DMABUF_SYSFS_STATS 78 76 bool "DMA-BUF sysfs statistics" 79 - select DMA_SHARED_BUFFER 77 + depends on DMA_SHARED_BUFFER 80 78 help 81 79 Choose this option to enable DMA-BUF sysfs statistics 82 80 in location /sys/kernel/dmabuf/buffers.
+33 -17
drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
··· 468 468 return (fw_cap & ATOM_FIRMWARE_CAP_DYNAMIC_BOOT_CFG_ENABLE) ? true : false; 469 469 } 470 470 471 - /* 472 - * Helper function to query RAS EEPROM address 471 + /** 472 + * amdgpu_atomfirmware_ras_rom_addr -- Get the RAS EEPROM addr from VBIOS 473 + * adev: amdgpu_device pointer 474 + * i2c_address: pointer to u8; if not NULL, will contain 475 + * the RAS EEPROM address if the function returns true 473 476 * 474 - * @adev: amdgpu_device pointer 475 - * 476 - * Return true if vbios supports ras rom address reporting 477 + * Return true if VBIOS supports RAS EEPROM address reporting, 478 + * else return false. If true and @i2c_address is not NULL, 479 + * will contain the RAS ROM address. 477 480 */ 478 - bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev, uint8_t* i2c_address) 481 + bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev, 482 + u8 *i2c_address) 479 483 { 480 484 struct amdgpu_mode_info *mode_info = &adev->mode_info; 481 485 int index; ··· 487 483 union firmware_info *firmware_info; 488 484 u8 frev, crev; 489 485 490 - if (i2c_address == NULL) 491 - return false; 492 - 493 - *i2c_address = 0; 494 - 495 486 index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1, 496 - firmwareinfo); 487 + firmwareinfo); 497 488 498 489 if (amdgpu_atom_parse_data_header(adev->mode_info.atom_context, 499 - index, &size, &frev, &crev, &data_offset)) { 490 + index, &size, &frev, &crev, 491 + &data_offset)) { 500 492 /* support firmware_info 3.4 + */ 501 493 if ((frev == 3 && crev >=4) || (frev > 3)) { 502 494 firmware_info = (union firmware_info *) 503 495 (mode_info->atom_context->bios + data_offset); 504 - *i2c_address = firmware_info->v34.ras_rom_i2c_slave_addr; 496 + /* The ras_rom_i2c_slave_addr should ideally 497 + * be a 19-bit EEPROM address, which would be 498 + * used as is by the driver; see top of 499 + * amdgpu_eeprom.c. 500 + * 501 + * When this is the case, 0 is of course a 502 + * valid RAS EEPROM address, in which case, 503 + * we'll drop the first "if (firm...)" and only 504 + * leave the check for the pointer. 505 + * 506 + * The reason this works right now is because 507 + * ras_rom_i2c_slave_addr contains the EEPROM 508 + * device type qualifier 1010b in the top 4 509 + * bits. 510 + */ 511 + if (firmware_info->v34.ras_rom_i2c_slave_addr) { 512 + if (i2c_address) 513 + *i2c_address = firmware_info->v34.ras_rom_i2c_slave_addr; 514 + return true; 515 + } 505 516 } 506 517 } 507 - 508 - if (*i2c_address != 0) 509 - return true; 510 518 511 519 return false; 512 520 }
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
··· 522 522 break; 523 523 case CHIP_RENOIR: 524 524 case CHIP_VANGOGH: 525 + case CHIP_YELLOW_CARP: 525 526 domain |= AMDGPU_GEM_DOMAIN_GTT; 526 527 break; 527 528
+17
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 1181 1181 {0x1002, 0x73A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1182 1182 {0x1002, 0x73A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1183 1183 {0x1002, 0x73A3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1184 + {0x1002, 0x73A5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1185 + {0x1002, 0x73A8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1186 + {0x1002, 0x73A9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1184 1187 {0x1002, 0x73AB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1188 + {0x1002, 0x73AC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1189 + {0x1002, 0x73AD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1185 1190 {0x1002, 0x73AE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1186 1191 {0x1002, 0x73AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, 1187 1192 {0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID}, ··· 1202 1197 {0x1002, 0x73C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1203 1198 {0x1002, 0x73C1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1204 1199 {0x1002, 0x73C3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1200 + {0x1002, 0x73DA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1201 + {0x1002, 0x73DB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1202 + {0x1002, 0x73DC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1203 + {0x1002, 0x73DD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1204 + {0x1002, 0x73DE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1205 1205 {0x1002, 0x73DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVY_FLOUNDER}, 1206 1206 1207 1207 /* DIMGREY_CAVEFISH */ ··· 1214 1204 {0x1002, 0x73E1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1215 1205 {0x1002, 0x73E2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1216 1206 {0x1002, 0x73E3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1207 + {0x1002, 0x73E8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1208 + {0x1002, 0x73E9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1209 + {0x1002, 0x73EA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1210 + {0x1002, 0x73EB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1211 + {0x1002, 0x73EC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1212 + {0x1002, 0x73ED, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1213 + {0x1002, 0x73EF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1217 1214 {0x1002, 0x73FF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_DIMGREY_CAVEFISH}, 1218 1215 1219 1216 /* Aldebaran */
+9 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
··· 59 59 uint64_t vram_mem = 0, gtt_mem = 0, cpu_mem = 0; 60 60 struct drm_file *file = f->private_data; 61 61 struct amdgpu_device *adev = drm_to_adev(file->minor->dev); 62 + struct amdgpu_bo *root; 62 63 int ret; 63 64 64 65 ret = amdgpu_file_to_fpriv(f, &fpriv); ··· 70 69 dev = PCI_SLOT(adev->pdev->devfn); 71 70 fn = PCI_FUNC(adev->pdev->devfn); 72 71 73 - ret = amdgpu_bo_reserve(fpriv->vm.root.bo, false); 72 + root = amdgpu_bo_ref(fpriv->vm.root.bo); 73 + if (!root) 74 + return; 75 + 76 + ret = amdgpu_bo_reserve(root, false); 74 77 if (ret) { 75 78 DRM_ERROR("Fail to reserve bo\n"); 76 79 return; 77 80 } 78 81 amdgpu_vm_get_memory(&fpriv->vm, &vram_mem, &gtt_mem, &cpu_mem); 79 - amdgpu_bo_unreserve(fpriv->vm.root.bo); 82 + amdgpu_bo_unreserve(root); 83 + amdgpu_bo_unref(&root); 84 + 80 85 seq_printf(m, "pdev:\t%04x:%02x:%02x.%d\npasid:\t%u\n", domain, bus, 81 86 dev, fn, fpriv->vm.pasid); 82 87 seq_printf(m, "vram mem:\t%llu kB\n", vram_mem/1024UL);
+8
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
··· 552 552 if (!ring || !ring->fence_drv.initialized) 553 553 continue; 554 554 555 + if (!ring->no_scheduler) 556 + drm_sched_stop(&ring->sched, NULL); 557 + 555 558 /* You can't wait for HW to signal if it's gone */ 556 559 if (!drm_dev_is_unplugged(&adev->ddev)) 557 560 r = amdgpu_fence_wait_empty(ring); ··· 613 610 struct amdgpu_ring *ring = adev->rings[i]; 614 611 if (!ring || !ring->fence_drv.initialized) 615 612 continue; 613 + 614 + if (!ring->no_scheduler) { 615 + drm_sched_resubmit_jobs(&ring->sched); 616 + drm_sched_start(&ring->sched, true); 617 + } 616 618 617 619 /* enable the interrupt */ 618 620 if (ring->fence_drv.irq_src)
+11 -14
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
··· 341 341 r = amdgpu_gem_object_create(adev, size, args->in.alignment, 342 342 initial_domain, 343 343 flags, ttm_bo_type_device, resv, &gobj); 344 - if (r) { 345 - if (r != -ERESTARTSYS) { 346 - if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { 347 - flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; 348 - goto retry; 349 - } 350 - 351 - if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) { 352 - initial_domain |= AMDGPU_GEM_DOMAIN_GTT; 353 - goto retry; 354 - } 355 - DRM_DEBUG("Failed to allocate GEM object (%llu, %d, %llu, %d)\n", 356 - size, initial_domain, args->in.alignment, r); 344 + if (r && r != -ERESTARTSYS) { 345 + if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { 346 + flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; 347 + goto retry; 357 348 } 358 - return r; 349 + 350 + if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) { 351 + initial_domain |= AMDGPU_GEM_DOMAIN_GTT; 352 + goto retry; 353 + } 354 + DRM_DEBUG("Failed to allocate GEM object (%llu, %d, %llu, %d)\n", 355 + size, initial_domain, args->in.alignment, r); 359 356 } 360 357 361 358 if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
··· 118 118 * @man: TTM memory type manager 119 119 * @tbo: TTM BO we need this range for 120 120 * @place: placement flags and restrictions 121 - * @mem: the resulting mem object 121 + * @res: the resulting mem object 122 122 * 123 123 * Dummy, allocate the node but no space for it yet. 124 124 */ ··· 182 182 * amdgpu_gtt_mgr_del - free ranges 183 183 * 184 184 * @man: TTM memory type manager 185 - * @mem: TTM memory object 185 + * @res: TTM memory object 186 186 * 187 187 * Free the allocated GTT again. 188 188 */
+4 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 469 469 */ 470 470 if (!skip_unsupport && (psp->cmd_buf_mem->resp.status || !timeout) && !ras_intr) { 471 471 if (ucode) 472 - DRM_WARN("failed to load ucode (%s) ", 473 - amdgpu_ucode_name(ucode->ucode_id)); 474 - DRM_WARN("psp gfx command (%s) failed and response status is (0x%X)\n", 475 - psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id), 472 + DRM_WARN("failed to load ucode %s(0x%X) ", 473 + amdgpu_ucode_name(ucode->ucode_id), ucode->ucode_id); 474 + DRM_WARN("psp gfx command %s(0x%X) failed and response status is (0x%X)\n", 475 + psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id), psp->cmd_buf_mem->cmd_id, 476 476 psp->cmd_buf_mem->resp.status); 477 477 if (!timeout) { 478 478 ret = -EINVAL;
+13 -16
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
··· 114 114 static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev, 115 115 struct amdgpu_ras_eeprom_control *control) 116 116 { 117 - uint8_t ras_rom_i2c_slave_addr; 117 + u8 i2c_addr; 118 118 119 119 if (!control) 120 120 return false; 121 121 122 - control->i2c_address = 0; 122 + if (amdgpu_atomfirmware_ras_rom_addr(adev, &i2c_addr)) { 123 + /* The address given by VBIOS is an 8-bit, wire-format 124 + * address, i.e. the most significant byte. 125 + * 126 + * Normalize it to a 19-bit EEPROM address. Remove the 127 + * device type identifier and make it a 7-bit address; 128 + * then make it a 19-bit EEPROM address. See top of 129 + * amdgpu_eeprom.c. 130 + */ 131 + i2c_addr = (i2c_addr & 0x0F) >> 1; 132 + control->i2c_address = ((u32) i2c_addr) << 16; 123 133 124 - if (amdgpu_atomfirmware_ras_rom_addr(adev, &ras_rom_i2c_slave_addr)) 125 - { 126 - switch (ras_rom_i2c_slave_addr) { 127 - case 0xA0: 128 - control->i2c_address = 0; 129 - return true; 130 - case 0xA8: 131 - control->i2c_address = 0x40000; 132 - return true; 133 - default: 134 - dev_warn(adev->dev, "RAS EEPROM I2C slave address %02x not supported", 135 - ras_rom_i2c_slave_addr); 136 - return false; 137 - } 134 + return true; 138 135 } 139 136 140 137 switch (adev->asic_type) {
+3 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
··· 361 361 * @man: TTM memory type manager 362 362 * @tbo: TTM BO we need this range for 363 363 * @place: placement flags and restrictions 364 - * @mem: the resulting mem object 364 + * @res: the resulting mem object 365 365 * 366 366 * Allocate VRAM for the given BO. 367 367 */ ··· 487 487 * amdgpu_vram_mgr_del - free ranges 488 488 * 489 489 * @man: TTM memory type manager 490 - * @mem: TTM memory object 490 + * @res: TTM memory object 491 491 * 492 492 * Free the allocated VRAM again. 493 493 */ ··· 522 522 * amdgpu_vram_mgr_alloc_sgt - allocate and fill a sg table 523 523 * 524 524 * @adev: amdgpu device pointer 525 - * @mem: TTM memory object 525 + * @res: TTM memory object 526 526 * @offset: byte offset from the base of VRAM BO 527 527 * @length: number of bytes to export in sg_table 528 528 * @dev: the other device
+2
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
··· 258 258 amdgpu_virt_fini_data_exchange(adev); 259 259 atomic_set(&adev->in_gpu_reset, 1); 260 260 261 + xgpu_ai_mailbox_trans_msg(adev, IDH_READY_TO_RESET, 0, 0, 0); 262 + 261 263 do { 262 264 if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL) 263 265 goto flr_done;
+1
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h
··· 37 37 IDH_REQ_GPU_RESET_ACCESS, 38 38 39 39 IDH_LOG_VF_ERROR = 200, 40 + IDH_READY_TO_RESET = 201, 40 41 }; 41 42 42 43 enum idh_event {
+25 -5
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
··· 85 85 #define mmRCC_DEV0_EPF0_STRAP0_ALDE 0x0015 86 86 #define mmRCC_DEV0_EPF0_STRAP0_ALDE_BASE_IDX 2 87 87 88 - #define mmBIF_DOORBELL_INT_CNTL_ALDE 0x3878 88 + #define mmBIF_DOORBELL_INT_CNTL_ALDE 0x00fe 89 89 #define mmBIF_DOORBELL_INT_CNTL_ALDE_BASE_IDX 2 90 90 #define BIF_DOORBELL_INT_CNTL_ALDE__DOORBELL_INTERRUPT_DISABLE__SHIFT 0x18 91 91 #define BIF_DOORBELL_INT_CNTL_ALDE__DOORBELL_INTERRUPT_DISABLE_MASK 0x01000000L 92 + 93 + #define mmBIF_INTR_CNTL_ALDE 0x0101 94 + #define mmBIF_INTR_CNTL_ALDE_BASE_IDX 2 92 95 93 96 static void nbio_v7_4_query_ras_error_count(struct amdgpu_device *adev, 94 97 void *ras_error_status); ··· 443 440 */ 444 441 uint32_t bif_intr_cntl; 445 442 446 - bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL); 443 + if (adev->asic_type == CHIP_ALDEBARAN) 444 + bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE); 445 + else 446 + bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL); 447 + 447 448 if (state == AMDGPU_IRQ_STATE_ENABLE) { 448 449 /* set interrupt vector select bit to 0 to select 449 450 * vetcor 1 for bare metal case */ 450 451 bif_intr_cntl = REG_SET_FIELD(bif_intr_cntl, 451 452 BIF_INTR_CNTL, 452 453 RAS_INTR_VEC_SEL, 0); 453 - WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl); 454 + 455 + if (adev->asic_type == CHIP_ALDEBARAN) 456 + WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE, bif_intr_cntl); 457 + else 458 + WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl); 459 + 454 460 } 455 461 456 462 return 0; ··· 488 476 */ 489 477 uint32_t bif_intr_cntl; 490 478 491 - bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL); 479 + if (adev->asic_type == CHIP_ALDEBARAN) 480 + bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE); 481 + else 482 + bif_intr_cntl = RREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL); 483 + 492 484 if (state == AMDGPU_IRQ_STATE_ENABLE) { 493 485 /* set interrupt vector select bit to 0 to select 494 486 * vetcor 1 for bare metal case */ 495 487 bif_intr_cntl = REG_SET_FIELD(bif_intr_cntl, 496 488 BIF_INTR_CNTL, 497 489 RAS_INTR_VEC_SEL, 0); 498 - WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl); 490 + 491 + if (adev->asic_type == CHIP_ALDEBARAN) 492 + WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL_ALDE, bif_intr_cntl); 493 + else 494 + WREG32_SOC15(NBIO, 0, mmBIF_INTR_CNTL, bif_intr_cntl); 499 495 } 500 496 501 497 return 0;
+1 -8
drivers/gpu/drm/amd/amdgpu/vi.c
··· 904 904 case CHIP_POLARIS11: 905 905 case CHIP_POLARIS12: 906 906 case CHIP_TOPAZ: 907 - /* Disable BACO support for the specific polaris12 SKU temporarily */ 908 - if ((adev->pdev->device == 0x699F) && 909 - (adev->pdev->revision == 0xC7) && 910 - (adev->pdev->subsystem_vendor == 0x1028) && 911 - (adev->pdev->subsystem_device == 0x0039)) 912 - return false; 913 - else 914 - return amdgpu_dpm_is_baco_supported(adev); 907 + return amdgpu_dpm_is_baco_supported(adev); 915 908 default: 916 909 return false; 917 910 }
+2 -1
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
··· 2484 2484 } 2485 2485 if (!p->xnack_enabled) { 2486 2486 pr_debug("XNACK not enabled for pasid 0x%x\n", pasid); 2487 - return -EFAULT; 2487 + r = -EFAULT; 2488 + goto out; 2488 2489 } 2489 2490 svms = &p->svms; 2490 2491
+1 -1
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 1200 1200 dc_hardware_init(adev->dm.dc); 1201 1201 1202 1202 #if defined(CONFIG_DRM_AMD_DC_DCN) 1203 - if (adev->apu_flags) { 1203 + if ((adev->flags & AMD_IS_APU) && (adev->asic_type >= CHIP_CARRIZO)) { 1204 1204 struct dc_phy_addr_space_config pa_config; 1205 1205 1206 1206 mmhub_read_system_context(adev, &pa_config);
+5 -1
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_resource.c
··· 510 510 vpg = dcn303_vpg_create(ctx, vpg_inst); 511 511 afmt = dcn303_afmt_create(ctx, afmt_inst); 512 512 513 - if (!enc1 || !vpg || !afmt) 513 + if (!enc1 || !vpg || !afmt) { 514 + kfree(enc1); 515 + kfree(vpg); 516 + kfree(afmt); 514 517 return NULL; 518 + } 515 519 516 520 dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id, vpg, afmt, &stream_enc_regs[eng_id], 517 521 &se_shift, &se_mask);
+2 -2
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
··· 109 109 union dmub_rb_cmd cmd; 110 110 111 111 if (!dcn31_query_backlight_info(panel_cntl, &cmd)) 112 - return 0; 112 + return false; 113 113 114 114 return cmd.panel_cntl.data.is_backlight_on; 115 115 } ··· 119 119 union dmub_rb_cmd cmd; 120 120 121 121 if (!dcn31_query_backlight_info(panel_cntl, &cmd)) 122 - return 0; 122 + return false; 123 123 124 124 return cmd.panel_cntl.data.is_powered_on; 125 125 }
+1 -1
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
··· 2641 2641 for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) { 2642 2642 if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) { 2643 2643 if (mode_lib->vba.DRAMClockChangeWatermark > 2644 - dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark)) 2644 + dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark)) 2645 2645 mode_lib->vba.MinTTUVBlank[k] += 25; 2646 2646 } 2647 2647 }
+4 -4
drivers/gpu/drm/amd/pm/amdgpu_pm.c
··· 2005 2005 static struct amdgpu_device_attr amdgpu_device_attrs[] = { 2006 2006 AMDGPU_DEVICE_ATTR_RW(power_dpm_state, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2007 2007 AMDGPU_DEVICE_ATTR_RW(power_dpm_force_performance_level, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2008 - AMDGPU_DEVICE_ATTR_RO(pp_num_states, ATTR_FLAG_BASIC), 2009 - AMDGPU_DEVICE_ATTR_RO(pp_cur_state, ATTR_FLAG_BASIC), 2010 - AMDGPU_DEVICE_ATTR_RW(pp_force_state, ATTR_FLAG_BASIC), 2011 - AMDGPU_DEVICE_ATTR_RW(pp_table, ATTR_FLAG_BASIC), 2008 + AMDGPU_DEVICE_ATTR_RO(pp_num_states, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2009 + AMDGPU_DEVICE_ATTR_RO(pp_cur_state, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2010 + AMDGPU_DEVICE_ATTR_RW(pp_force_state, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2011 + AMDGPU_DEVICE_ATTR_RW(pp_table, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2012 2012 AMDGPU_DEVICE_ATTR_RW(pp_dpm_sclk, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2013 2013 AMDGPU_DEVICE_ATTR_RW(pp_dpm_mclk, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF), 2014 2014 AMDGPU_DEVICE_ATTR_RW(pp_dpm_socclk, ATTR_FLAG_BASIC|ATTR_FLAG_ONEVF),
+24
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
··· 1335 1335 #define WORKLOAD_MAP(profile, workload) \ 1336 1336 [profile] = {1, (workload)} 1337 1337 1338 + /** 1339 + * smu_memcpy_trailing - Copy the end of one structure into the middle of another 1340 + * 1341 + * @dst: Pointer to destination struct 1342 + * @first_dst_member: The member name in @dst where the overwrite begins 1343 + * @last_dst_member: The member name in @dst where the overwrite ends after 1344 + * @src: Pointer to the source struct 1345 + * @first_src_member: The member name in @src where the copy begins 1346 + * 1347 + */ 1348 + #define smu_memcpy_trailing(dst, first_dst_member, last_dst_member, \ 1349 + src, first_src_member) \ 1350 + ({ \ 1351 + size_t __src_offset = offsetof(typeof(*(src)), first_src_member); \ 1352 + size_t __src_size = sizeof(*(src)) - __src_offset; \ 1353 + size_t __dst_offset = offsetof(typeof(*(dst)), first_dst_member); \ 1354 + size_t __dst_size = offsetofend(typeof(*(dst)), last_dst_member) - \ 1355 + __dst_offset; \ 1356 + BUILD_BUG_ON(__src_size != __dst_size); \ 1357 + __builtin_memcpy((u8 *)(dst) + __dst_offset, \ 1358 + (u8 *)(src) + __src_offset, \ 1359 + __dst_size); \ 1360 + }) 1361 + 1338 1362 #if !defined(SWSMU_CODE_LAYER_L2) && !defined(SWSMU_CODE_LAYER_L3) && !defined(SWSMU_CODE_LAYER_L4) 1339 1363 int smu_get_power_limit(void *handle, 1340 1364 uint32_t *limit,
+16 -1
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
··· 27 27 #include <linux/pci.h> 28 28 #include <linux/slab.h> 29 29 #include <asm/div64.h> 30 + #if IS_ENABLED(CONFIG_X86_64) 31 + #include <asm/intel-family.h> 32 + #endif 30 33 #include <drm/amdgpu_drm.h> 31 34 #include "ppatomctrl.h" 32 35 #include "atombios.h" ··· 1736 1733 return result; 1737 1734 } 1738 1735 1736 + static bool intel_core_rkl_chk(void) 1737 + { 1738 + #if IS_ENABLED(CONFIG_X86_64) 1739 + struct cpuinfo_x86 *c = &cpu_data(0); 1740 + 1741 + return (c->x86 == 6 && c->x86_model == INTEL_FAM6_ROCKETLAKE); 1742 + #else 1743 + return false; 1744 + #endif 1745 + } 1746 + 1739 1747 static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr) 1740 1748 { 1741 1749 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend); ··· 1772 1758 1773 1759 data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true; 1774 1760 data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true; 1775 - data->pcie_dpm_key_disabled = hwmgr->feature_mask & PP_PCIE_DPM_MASK ? false : true; 1761 + data->pcie_dpm_key_disabled = 1762 + intel_core_rkl_chk() || !(hwmgr->feature_mask & PP_PCIE_DPM_MASK); 1776 1763 /* need to set voltage control types before EVV patching */ 1777 1764 data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE; 1778 1765 data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
+2 -4
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
··· 483 483 484 484 if ((smc_dpm_table->table_header.format_revision == 4) && 485 485 (smc_dpm_table->table_header.content_revision == 6)) 486 - memcpy(&smc_pptable->MaxVoltageStepGfx, 487 - &smc_dpm_table->maxvoltagestepgfx, 488 - sizeof(*smc_dpm_table) - offsetof(struct atom_smc_dpm_info_v4_6, maxvoltagestepgfx)); 489 - 486 + smu_memcpy_trailing(smc_pptable, MaxVoltageStepGfx, BoardReserved, 487 + smc_dpm_table, maxvoltagestepgfx); 490 488 return 0; 491 489 } 492 490
+4 -4
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
··· 431 431 432 432 switch (smc_dpm_table->table_header.content_revision) { 433 433 case 5: /* nv10 and nv14 */ 434 - memcpy(smc_pptable->I2cControllers, smc_dpm_table->I2cControllers, 435 - sizeof(*smc_dpm_table) - sizeof(smc_dpm_table->table_header)); 434 + smu_memcpy_trailing(smc_pptable, I2cControllers, BoardReserved, 435 + smc_dpm_table, I2cControllers); 436 436 break; 437 437 case 7: /* nv12 */ 438 438 ret = amdgpu_atombios_get_data_table(adev, index, NULL, NULL, NULL, 439 439 (uint8_t **)&smc_dpm_table_v4_7); 440 440 if (ret) 441 441 return ret; 442 - memcpy(smc_pptable->I2cControllers, smc_dpm_table_v4_7->I2cControllers, 443 - sizeof(*smc_dpm_table_v4_7) - sizeof(smc_dpm_table_v4_7->table_header)); 442 + smu_memcpy_trailing(smc_pptable, I2cControllers, BoardReserved, 443 + smc_dpm_table_v4_7, I2cControllers); 444 444 break; 445 445 default: 446 446 dev_err(smu->adev->dev, "smc_dpm_info with unsupported content revision %d!\n",
+1 -1
drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c
··· 1869 1869 } else { 1870 1870 if (smu->gfx_actual_hard_min_freq > smu->gfx_actual_soft_max_freq) { 1871 1871 dev_err(smu->adev->dev, 1872 - "The setting minimun sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 1872 + "The setting minimum sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 1873 1873 smu->gfx_actual_hard_min_freq, 1874 1874 smu->gfx_actual_soft_max_freq); 1875 1875 return -EINVAL;
+1 -1
drivers/gpu/drm/amd/pm/swsmu/smu12/renoir_ppt.c
··· 426 426 } else { 427 427 if (smu->gfx_actual_hard_min_freq > smu->gfx_actual_soft_max_freq) { 428 428 dev_err(smu->adev->dev, 429 - "The setting minimun sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 429 + "The setting minimum sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 430 430 smu->gfx_actual_hard_min_freq, 431 431 smu->gfx_actual_soft_max_freq); 432 432 return -EINVAL;
+2 -3
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
··· 409 409 410 410 if ((smc_dpm_table->table_header.format_revision == 4) && 411 411 (smc_dpm_table->table_header.content_revision == 10)) 412 - memcpy(&smc_pptable->GfxMaxCurrent, 413 - &smc_dpm_table->GfxMaxCurrent, 414 - sizeof(*smc_dpm_table) - offsetof(struct atom_smc_dpm_info_v4_10, GfxMaxCurrent)); 412 + smu_memcpy_trailing(smc_pptable, GfxMaxCurrent, reserved, 413 + smc_dpm_table, GfxMaxCurrent); 415 414 return 0; 416 415 } 417 416
+1 -1
drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
··· 731 731 } else { 732 732 if (smu->gfx_actual_hard_min_freq > smu->gfx_actual_soft_max_freq) { 733 733 dev_err(smu->adev->dev, 734 - "The setting minimun sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 734 + "The setting minimum sclk (%d) MHz is greater than the setting maximum sclk (%d) MHz\n", 735 735 smu->gfx_actual_hard_min_freq, 736 736 smu->gfx_actual_soft_max_freq); 737 737 return -EINVAL;
+1 -1
drivers/gpu/drm/i915/gt/intel_gt_requests.h
··· 6 6 #ifndef INTEL_GT_REQUESTS_H 7 7 #define INTEL_GT_REQUESTS_H 8 8 9 - #include <stddef.h> 9 + #include <linux/stddef.h> 10 10 11 11 struct intel_engine_cs; 12 12 struct intel_gt;
+1
drivers/gpu/drm/mgag200/mgag200_pll.c
··· 124 124 unsigned int computed; 125 125 126 126 m = n = p = s = 0; 127 + delta = 0xffffffff; 127 128 permitteddelta = clock * 5 / 1000; 128 129 129 130 for (testp = 8; testp > 0; testp /= 2) {
+11 -20
drivers/gpu/drm/panfrost/panfrost_mmu.c
··· 58 58 } 59 59 60 60 static void lock_region(struct panfrost_device *pfdev, u32 as_nr, 61 - u64 iova, size_t size) 61 + u64 iova, u64 size) 62 62 { 63 63 u8 region_width; 64 64 u64 region = iova & PAGE_MASK; 65 - /* 66 - * fls returns: 67 - * 1 .. 32 68 - * 69 - * 10 + fls(num_pages) 70 - * results in the range (11 .. 42) 65 + 66 + /* The size is encoded as ceil(log2) minus(1), which may be calculated 67 + * with fls. The size must be clamped to hardware bounds. 71 68 */ 72 - 73 - size = round_up(size, PAGE_SIZE); 74 - 75 - region_width = 10 + fls(size >> PAGE_SHIFT); 76 - if ((size >> PAGE_SHIFT) != (1ul << (region_width - 11))) { 77 - /* not pow2, so must go up to the next pow2 */ 78 - region_width += 1; 79 - } 69 + size = max_t(u64, size, AS_LOCK_REGION_MIN_SIZE); 70 + region_width = fls64(size - 1) - 1; 80 71 region |= region_width; 81 72 82 73 /* Lock the region that needs to be updated */ ··· 78 87 79 88 80 89 static int mmu_hw_do_operation_locked(struct panfrost_device *pfdev, int as_nr, 81 - u64 iova, size_t size, u32 op) 90 + u64 iova, u64 size, u32 op) 82 91 { 83 92 if (as_nr < 0) 84 93 return 0; ··· 95 104 96 105 static int mmu_hw_do_operation(struct panfrost_device *pfdev, 97 106 struct panfrost_mmu *mmu, 98 - u64 iova, size_t size, u32 op) 107 + u64 iova, u64 size, u32 op) 99 108 { 100 109 int ret; 101 110 ··· 112 121 u64 transtab = cfg->arm_mali_lpae_cfg.transtab; 113 122 u64 memattr = cfg->arm_mali_lpae_cfg.memattr; 114 123 115 - mmu_hw_do_operation_locked(pfdev, as_nr, 0, ~0UL, AS_COMMAND_FLUSH_MEM); 124 + mmu_hw_do_operation_locked(pfdev, as_nr, 0, ~0ULL, AS_COMMAND_FLUSH_MEM); 116 125 117 126 mmu_write(pfdev, AS_TRANSTAB_LO(as_nr), transtab & 0xffffffffUL); 118 127 mmu_write(pfdev, AS_TRANSTAB_HI(as_nr), transtab >> 32); ··· 128 137 129 138 static void panfrost_mmu_disable(struct panfrost_device *pfdev, u32 as_nr) 130 139 { 131 - mmu_hw_do_operation_locked(pfdev, as_nr, 0, ~0UL, AS_COMMAND_FLUSH_MEM); 140 + mmu_hw_do_operation_locked(pfdev, as_nr, 0, ~0ULL, AS_COMMAND_FLUSH_MEM); 132 141 133 142 mmu_write(pfdev, AS_TRANSTAB_LO(as_nr), 0); 134 143 mmu_write(pfdev, AS_TRANSTAB_HI(as_nr), 0); ··· 242 251 243 252 static void panfrost_mmu_flush_range(struct panfrost_device *pfdev, 244 253 struct panfrost_mmu *mmu, 245 - u64 iova, size_t size) 254 + u64 iova, u64 size) 246 255 { 247 256 if (mmu->as < 0) 248 257 return;
+2
drivers/gpu/drm/panfrost/panfrost_regs.h
··· 316 316 #define AS_FAULTSTATUS_ACCESS_TYPE_READ (0x2 << 8) 317 317 #define AS_FAULTSTATUS_ACCESS_TYPE_WRITE (0x3 << 8) 318 318 319 + #define AS_LOCK_REGION_MIN_SIZE (1ULL << 15) 320 + 319 321 #define gpu_write(dev, reg, data) writel(data, dev->iomem + reg) 320 322 #define gpu_read(dev, reg) readl(dev->iomem + reg) 321 323
+3 -3
drivers/gpu/drm/ttm/ttm_bo.c
··· 1160 1160 } 1161 1161 1162 1162 if (bo->deleted) { 1163 - ttm_bo_cleanup_refs(bo, false, false, locked); 1163 + ret = ttm_bo_cleanup_refs(bo, false, false, locked); 1164 1164 ttm_bo_put(bo); 1165 - return 0; 1165 + return ret == -EBUSY ? -ENOSPC : ret; 1166 1166 } 1167 1167 1168 1168 ttm_bo_del_from_lru(bo); ··· 1216 1216 if (locked) 1217 1217 dma_resv_unlock(bo->base.resv); 1218 1218 ttm_bo_put(bo); 1219 - return ret; 1219 + return ret == -EBUSY ? -ENOSPC : ret; 1220 1220 } 1221 1221 1222 1222 void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
+3 -4
drivers/gpu/drm/ttm/ttm_bo_util.c
··· 143 143 struct ttm_resource *src_mem = bo->resource; 144 144 struct ttm_resource_manager *src_man = 145 145 ttm_manager_type(bdev, src_mem->mem_type); 146 - struct ttm_resource src_copy = *src_mem; 147 146 union { 148 147 struct ttm_kmap_iter_tt tt; 149 148 struct ttm_kmap_iter_linear_io io; ··· 172 173 } 173 174 174 175 ttm_move_memcpy(bo, dst_mem->num_pages, dst_iter, src_iter); 175 - src_copy = *src_mem; 176 - ttm_bo_move_sync_cleanup(bo, dst_mem); 177 176 178 177 if (!src_iter->ops->maps_tt) 179 - ttm_kmap_iter_linear_io_fini(&_src_iter.io, bdev, &src_copy); 178 + ttm_kmap_iter_linear_io_fini(&_src_iter.io, bdev, src_mem); 179 + ttm_bo_move_sync_cleanup(bo, dst_mem); 180 + 180 181 out_src_iter: 181 182 if (!dst_iter->ops->maps_tt) 182 183 ttm_kmap_iter_linear_io_fini(&_dst_iter.io, bdev, dst_mem);
-1
drivers/gpu/drm/ttm/ttm_tt.c
··· 32 32 #define pr_fmt(fmt) "[TTM] " fmt 33 33 34 34 #include <linux/sched.h> 35 - #include <linux/pagemap.h> 36 35 #include <linux/shmem_fs.h> 37 36 #include <linux/file.h> 38 37 #include <drm/drm_cache.h>
+1 -1
drivers/gpu/drm/vc4/vc4_hdmi.c
··· 1462 1462 .audio_startup = vc4_hdmi_audio_startup, 1463 1463 }; 1464 1464 1465 - struct hdmi_codec_pdata vc4_hdmi_codec_pdata = { 1465 + static struct hdmi_codec_pdata vc4_hdmi_codec_pdata = { 1466 1466 .ops = &vc4_hdmi_codec_ops, 1467 1467 .max_i2s_channels = 8, 1468 1468 .i2s = 1,
+6
drivers/video/fbdev/core/fbmem.c
··· 962 962 struct fb_var_screeninfo old_var; 963 963 struct fb_videomode mode; 964 964 struct fb_event event; 965 + u32 unused; 965 966 966 967 if (var->activate & FB_ACTIVATE_INV_MODE) { 967 968 struct fb_videomode mode1, mode2; ··· 1007 1006 1008 1007 /* bitfill_aligned() assumes that it's at least 8x8 */ 1009 1008 if (var->xres < 8 || var->yres < 8) 1009 + return -EINVAL; 1010 + 1011 + /* Too huge resolution causes multiplication overflow. */ 1012 + if (check_mul_overflow(var->xres, var->yres, &unused) || 1013 + check_mul_overflow(var->xres_virtual, var->yres_virtual, &unused)) 1010 1014 return -EINVAL; 1011 1015 1012 1016 ret = info->fbops->fb_check_var(var, info);
+2 -1
include/drm/ttm/ttm_tt.h
··· 27 27 #ifndef _TTM_TT_H_ 28 28 #define _TTM_TT_H_ 29 29 30 + #include <linux/pagemap.h> 30 31 #include <linux/types.h> 31 32 #include <drm/ttm/ttm_caching.h> 32 33 #include <drm/ttm/ttm_kmap_iter.h> 33 34 34 - struct ttm_bo_device; 35 + struct ttm_device; 35 36 struct ttm_tt; 36 37 struct ttm_resource; 37 38 struct ttm_buffer_object;