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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'drm-intel-next-fixes-2023-06-21' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

One fix for incorrect error handling in the frame buffer mmap callback,
HuC init error handling fix, missing wakeref during GSC init and a build
fix when !CONFIG_PROC_FS.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZJLI8ON96ApPTl8H@tursulin-desk

+18 -13
+2 -2
drivers/gpu/drm/i915/gem/i915_gem_mman.c
··· 1085 1085 /* handle stolen and smem objects */ 1086 1086 mmap_type = i915_ggtt_has_aperture(ggtt) ? I915_MMAP_TYPE_GTT : I915_MMAP_TYPE_WC; 1087 1087 mmo = mmap_offset_attach(obj, mmap_type, NULL); 1088 - if (!mmo) 1089 - return -ENODEV; 1088 + if (IS_ERR(mmo)) 1089 + return PTR_ERR(mmo); 1090 1090 } 1091 1091 1092 1092 /*
+14 -8
drivers/gpu/drm/i915/gt/uc/intel_gsc_fw.c
··· 24 24 GSC_FW_CURRENT_STATE_RESET; 25 25 } 26 26 27 + static u32 gsc_uc_get_fw_status(struct intel_uncore *uncore) 28 + { 29 + intel_wakeref_t wakeref; 30 + u32 fw_status = 0; 31 + 32 + with_intel_runtime_pm(uncore->rpm, wakeref) 33 + fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG); 34 + 35 + return fw_status; 36 + } 37 + 27 38 bool intel_gsc_uc_fw_proxy_init_done(struct intel_gsc_uc *gsc) 28 39 { 29 - struct intel_uncore *uncore = gsc_uc_to_gt(gsc)->uncore; 30 - u32 fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG); 31 - 32 - return REG_FIELD_GET(GSC_FW_CURRENT_STATE, fw_status) == 40 + return REG_FIELD_GET(GSC_FW_CURRENT_STATE, 41 + gsc_uc_get_fw_status(gsc_uc_to_gt(gsc)->uncore)) == 33 42 GSC_FW_PROXY_STATE_NORMAL; 34 43 } 35 44 36 45 bool intel_gsc_uc_fw_init_done(struct intel_gsc_uc *gsc) 37 46 { 38 - struct intel_uncore *uncore = gsc_uc_to_gt(gsc)->uncore; 39 - u32 fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG); 40 - 41 - return fw_status & GSC_FW_INIT_COMPLETE_BIT; 47 + return gsc_uc_get_fw_status(gsc_uc_to_gt(gsc)->uncore) & GSC_FW_INIT_COMPLETE_BIT; 42 48 } 43 49 44 50 static int emit_gsc_fw_load(struct i915_request *rq, struct intel_gsc_uc *gsc)
+1
drivers/gpu/drm/i915/gt/uc/intel_huc.c
··· 384 384 385 385 vma = intel_guc_allocate_vma(&gt->uc.guc, PXP43_HUC_AUTH_INOUT_SIZE * 2); 386 386 if (IS_ERR(vma)) { 387 + err = PTR_ERR(vma); 387 388 huc_info(huc, "Failed to allocate heci pkt\n"); 388 389 goto out; 389 390 }
+1 -1
drivers/gpu/drm/i915/i915_driver.c
··· 1816 1816 .open = i915_driver_open, 1817 1817 .lastclose = i915_driver_lastclose, 1818 1818 .postclose = i915_driver_postclose, 1819 - .show_fdinfo = i915_drm_client_fdinfo, 1819 + .show_fdinfo = PTR_IF(IS_ENABLED(CONFIG_PROC_FS), i915_drm_client_fdinfo), 1820 1820 1821 1821 .prime_handle_to_fd = drm_gem_prime_handle_to_fd, 1822 1822 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
-2
drivers/gpu/drm/i915/i915_drm_client.h
··· 47 47 48 48 struct i915_drm_client *i915_drm_client_alloc(void); 49 49 50 - #ifdef CONFIG_PROC_FS 51 50 void i915_drm_client_fdinfo(struct drm_printer *p, struct drm_file *file); 52 - #endif 53 51 54 52 #endif /* !__I915_DRM_CLIENT_H__ */