Skip to content
Merged
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: 7 additions & 0 deletions drivers/gpu/drm/asahi/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,13 @@ impl File {
cls_pr_debug!(Errors, "queue_create: Invalid priority\n");
return Err(EINVAL);
}
// HIGH has only been run on G17; G13 and G14 keep refusing it.
if data.priority == uapi::drm_asahi_priority_DRM_ASAHI_PRIORITY_HIGH
&& !reg_data.gpu.as_any().is::<crate::g17::Gpu>()
{
cls_pr_debug!(Errors, "queue_create: HIGH priority is not supported on this GPU\n");
return Err(EINVAL);
}
// SAFETY: capable() only reads the calling task's credentials (ioctl process context).
if data.priority == uapi::drm_asahi_priority_DRM_ASAHI_PRIORITY_HIGH
&& !unsafe { bindings::capable(bindings::CAP_SYS_NICE as _) }
Expand Down
3 changes: 2 additions & 1 deletion drivers/media/platform/apple/isp/isp-cam.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ static int isp_ch_load_setfile(struct apple_isp *isp, u32 ch)
memcpy(isp->data_surf->virt, fw->data, len);
memset(isp->data_surf->virt + len, 0, setfile->size - len);
release_firmware(fw);
if (isp->hw->fw_abi == ISP_FW_ABI_H17)
/* Seen on T6040 only; T8140 runs its setfiles as they are. */
if (isp->hw->gen == ISP_GEN_T6040)
isp_setfile_fixup_h17(isp->data_surf->virt, len);

return isp_cmd_ch_set_file_load(isp, ch, isp->data_surf->iova,
Expand Down
4 changes: 3 additions & 1 deletion drivers/media/platform/apple/isp/isp-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ static int apple_isp_init_iommu(struct apple_isp *isp)
* firmware's main memory only up to the end of it. The rest, up to
* the heap top, is the host's to back.
*/
err = isp_of_region_iova(dev, "data", &data_base, &data_size);
err = -ENOENT;
if (isp->hw->gen == ISP_GEN_T6040)
err = isp_of_region_iova(dev, "data", &data_base, &data_size);
if (!err) {
isp->fw.data_top = data_base + data_size;
if (isp->fw.data_top <= isp->fw.heap_base ||
Expand Down