diff --git a/arch/arm64/boot/dts/apple/t8011-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8011-pmgr.dtsi index f4ed57e5521bc3..14ad0025b43b1d 100644 --- a/arch/arm64/boot/dts/apple/t8011-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8011-pmgr.dtsi @@ -87,12 +87,19 @@ apple,always-on; /* Core device */ }; + /* + * DWI carries the voltage manager's requests to the PMIC: with it + * off the GPU rail never comes up and the first RGX access hangs the + * bus. iBoot and iPadOS keep it on; the boot chain can hand it over + * off, so this turns it on at probe. + */ ps_dwi: power-controller@80110 { compatible = "apple,t8010-pmgr-pwrstate", "apple,pmgr-pwrstate"; reg = <0x80110 4>; #power-domain-cells = <0>; #reset-cells = <0>; label = "dwi"; + apple,always-on; }; ps_gpio: power-controller@80118 { diff --git a/arch/arm64/boot/dts/apple/t8011.dtsi b/arch/arm64/boot/dts/apple/t8011.dtsi index 86c81e2bf53077..05c77a0fd9bce3 100644 --- a/arch/arm64/boot/dts/apple/t8011.dtsi +++ b/arch/arm64/boot/dts/apple/t8011.dtsi @@ -18,6 +18,10 @@ #address-cells = <2>; #size-cells = <2>; + aliases { + gpu = &gpu; /* the bootloader fills its OPP table */ + }; + nco_clkref: clock-ref-nco { compatible = "fixed-clock"; #clock-cells = <0>; @@ -149,6 +153,16 @@ #endif }; + /* + * The GPU's performance states. The bootloader (m1n1) fills one entry + * per powered state from the Apple device tree's sgx node: opp-hz, + * opp-microvolt and opp-level, the state number the GPU's power + * controller takes. The table stays empty without it. + */ + gpu_opp: opp-table-gpu { + compatible = "operating-points-v2"; + }; + soc { compatible = "simple-bus"; #address-cells = <2>; @@ -337,6 +351,38 @@ status = "disabled"; }; + /* + * The A10X GPU (G9G): the A10's register windows (ADT sgx and + * gfx-kf: rgx, Fender, IOP at the same addresses); its own + * firmware (AGXFirmwareKextG9GRTBuddy, not the A10's G9P). + */ + gpu: gpu@201000000 { + compatible = "apple,t8011-gpu"; + reg = <0x2 0x01000000 0x0 0x100000>, + <0x2 0x01d00000 0x0 0x5000>, + <0x2 0x01d20000 0x0 0x4000>; + reg-names = "rgx", "fender", "iop"; + mboxes = <&gpu_mbox>; + power-domains = <&ps_gfx>; + operating-points-v2 = <&gpu_opp>; + firmware-name = "apple/gfx-t8011.bin"; + }; + + /* ADT gfx-kf interrupts 186, 185, 188, 187: the A10's minus 4 */ + gpu_mbox: mbox@201d24000 { + compatible = "apple,t8010-a7iop-mailbox"; + reg = <0x2 0x01d24000 0x0 0x1000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_gfx>; + }; + /* * The H9G display pipe. Only its registers are described: the * boot framebuffer names it so that the boot scanout cadence diff --git a/drivers/gpu/drm/imagination/pvr_apple.c b/drivers/gpu/drm/imagination/pvr_apple.c index aeb5a8278ce964..faa180874bc77d 100644 --- a/drivers/gpu/drm/imagination/pvr_apple.c +++ b/drivers/gpu/drm/imagination/pvr_apple.c @@ -2599,9 +2599,21 @@ void pvr_apple_device_info_init(struct pvr_device *pvr_dev) /* * The A7 (S5L8960X, BVNC 1.70.4.3) has 4 clusters (CORE_ID); with 6, * the GPU info reported 2 phantoms and Mesa's Rogue render path, which - * expects one on a 4-cluster core, refused to record a draw. + * expects one on a 4-cluster core, refused to record a draw. The A10X + * (T8011, 13.7.12.2) has 12: Mesa takes three phantoms from that, one + * per pipe of its G9G firmware. */ - pvr_dev->features.num_clusters = pvr_dev->gpu_id.b == 1 ? 4 : 6; + switch (pvr_gpu_id_to_packed_bvnc(&pvr_dev->gpu_id)) { + case PVR_PACKED_BVNC(1, 70, 4, 3): /* A7 */ + pvr_dev->features.num_clusters = 4; + break; + case PVR_PACKED_BVNC(13, 7, 12, 2): /* A10X */ + pvr_dev->features.num_clusters = 12; + break; + default: + pvr_dev->features.num_clusters = 6; + break; + } pvr_dev->features.has_phys_bus_width = true; pvr_dev->features.phys_bus_width = 40; pvr_dev->features.has_virtual_address_space_bits = true; diff --git a/drivers/gpu/drm/imagination/pvr_apple.h b/drivers/gpu/drm/imagination/pvr_apple.h index 38ab492dd8389f..9aeb0523248f53 100644 --- a/drivers/gpu/drm/imagination/pvr_apple.h +++ b/drivers/gpu/drm/imagination/pvr_apple.h @@ -30,6 +30,7 @@ extern const struct pvr_apple_chip pvr_apple_chip_s5l8960x; extern const struct pvr_apple_chip pvr_apple_chip_s8003; extern const struct pvr_apple_chip pvr_apple_chip_t7000; extern const struct pvr_apple_chip pvr_apple_chip_t8010; +extern const struct pvr_apple_chip pvr_apple_chip_t8011; extern const struct pvr_apple_chip pvr_apple_chip_t8015; /* diff --git a/drivers/gpu/drm/imagination/pvr_apple_chip.h b/drivers/gpu/drm/imagination/pvr_apple_chip.h index ea6a1c52f9c38d..f248551cf1c16c 100644 --- a/drivers/gpu/drm/imagination/pvr_apple_chip.h +++ b/drivers/gpu/drm/imagination/pvr_apple_chip.h @@ -366,6 +366,8 @@ struct pvr_apple { */ struct pvr_apple_chip { const char *fw_name; + /* End of the image and its runtime data in the window; 0: PVR_APPLE_FW_RUNTIME */ + u32 fw_runtime; u32 perf_state_max; bool fixed_perf_state; u32 compute_slots; diff --git a/drivers/gpu/drm/imagination/pvr_apple_layout.c b/drivers/gpu/drm/imagination/pvr_apple_layout.c index d04cfc0ee6a427..c6aa440adeeda0 100644 --- a/drivers/gpu/drm/imagination/pvr_apple_layout.c +++ b/drivers/gpu/drm/imagination/pvr_apple_layout.c @@ -27,6 +27,7 @@ #include #include +#include #include #define FW_VA_HEAP 0x00100000u /* heap descriptor 0 */ @@ -513,10 +514,10 @@ void pvr_apple_layout_write_ta_job(u8 *heap, u32 seq, const struct pvr_apple_ta_ { u32 base = HEAP_TA_JOBS + ((seq - 1) % JOBS_TA) * JOB_TA_STRIDE; u32 cmd = base, useq = base + 0x600, sc = base + 0x900, ctx = base + 0xa00; - u32 regs32 = base + 0x700, regs64 = base + 0x800; + u32 regs32 = base + 0x700, regs64 = base + job->regs64_offset; u32 fl = HEAP_TA_FREE_LIST, slot = HEAP_TA_PM_SLOT; u32 work = HEAP_TA_RING + ((seq - 1) % RING_ENTRIES) * WORK_ENTRY_SIZE; - u32 i; + u32 i, n; for (i = base; i < base + JOB_TA_STRIDE; i++) heap[i] = 0; @@ -524,7 +525,11 @@ void pvr_apple_layout_write_ta_job(u8 *heap, u32 seq, const struct pvr_apple_ta_ heap[i] = 0; for (i = 0; i < 8; i++) wr32(heap, regs32 + 4 * i, job->regs32[i]); - for (i = 0; i < 28; i++) + /* The 64-bit block sits after the 32-bit one and ends before +0x900 */ + n = job->regs64_count; + if (WARN_ON_ONCE(job->regs64_offset < 0x720 || job->regs64_offset + 8 * n > 0x900)) + n = 0; + for (i = 0; i < n; i++) wr64(heap, regs64 + 8 * i, job->regs64[i]); wr32(heap, sc + TA_CANCEL, 0xffffffff); wr32(heap, sc + TA_CANCEL + 4, 0xffffffff); @@ -651,7 +656,8 @@ void pvr_apple_layout_write_3d_job(u8 *heap, u32 seq, const struct pvr_apple_3d_ heap[i] = 0; for (i = 0; i < 18; i++) wr32(heap, cmd + 0x3b0 + 4 * i, job->regs32[i]); - for (i = 0; i < 29; i++) + /* Up to 0x3b0, where the 32-bit block starts */ + for (i = 0; i < min_t(u32, job->regs64_count, (0x3b0 - 0x68) / 8); i++) wr64(heap, cmd + 0x68 + 8 * i, job->regs64[i]); wr32(heap, sc + F_CANCEL, 0xffffffff); wr32(heap, sc + F_CANCEL + 4, 0xffffffff); diff --git a/drivers/gpu/drm/imagination/pvr_apple_layout.h b/drivers/gpu/drm/imagination/pvr_apple_layout.h index 1796162cf81c8d..8473d26da47de6 100644 --- a/drivers/gpu/drm/imagination/pvr_apple_layout.h +++ b/drivers/gpu/drm/imagination/pvr_apple_layout.h @@ -21,9 +21,19 @@ void pvr_apple_layout_build(u8 *win, u64 win_pa, u8 *heap, u64 heap_pa, u64 gpu_ #define PVR_APPLE_GPU_DATA 0x200000ull /* stream at +0, PDS HALT at +0x1000 */ void pvr_apple_layout_write_compute_job(u8 *heap, u32 seq, u64 stream, u64 ctx_state); /* A geometry (TA) job; see pvr_apple_layout_write_ta_job() */ +/* + * The register blocks' largest sizes: the A10X's G9G firmware loads its + * per-cluster registers for 12 clusters and 0xfc0 for three pipes. + */ +#define PVR_APPLE_TA_REGS64_MAX 34 +#define PVR_APPLE_3D_REGS64_MAX 42 + struct pvr_apple_ta_job { u32 regs32[8]; /* RGX 0xc78, 0xc88, 0xc98, 0xc18, 0xc08, 0xc10, 0xc20, 0xc28 */ - u64 regs64[28]; /* RGX 0xc90 ... 0x408, 0xf058 ... 0xf040, 0x11030 x 6 */ + /* RGX 0xc90 ... 0x408, 0xf058 ... 0xf040, 0x11030 per cluster (6 or 12) */ + u64 regs64[PVR_APPLE_TA_REGS64_MAX]; + u32 regs64_count; /* words StartTA loads: 28 on the A10, 34 on the A10X */ + u32 regs64_offset; /* the 64-bit block's place in the job record */ u64 free_list; /* GPU address of the free stack (u32 page numbers) */ u32 free_list_pages; u64 mlist, mtile_array, vheap_table; @@ -41,7 +51,9 @@ u32 pvr_apple_layout_ta_pm_state_offset(void); /* A fragment (3D) job; see pvr_apple_layout_write_3d_job() */ struct pvr_apple_3d_job { u32 regs32[18]; /* RGX 0xf18, 0xf80, 0xf88, -, 0x6d0, 0x618 ... 0x11f8 */ - u64 regs64[29]; /* RGX 0xfa8 ... 0xf30, 0x11020 x 6, 0x11080 x 6, 0xfd0 */ + /* RGX 0xfa8 ... 0xf30, 0x11020 and 0x11080 per cluster, 0xfd0 */ + u64 regs64[PVR_APPLE_3D_REGS64_MAX]; + u32 regs64_count; /* words Start3D loads: 29 on the A10, 42 on the A10X */ }; void pvr_apple_layout_build_3d(u8 *heap); diff --git a/drivers/gpu/drm/imagination/pvr_apple_t8010.c b/drivers/gpu/drm/imagination/pvr_apple_t8010.c index 8ed13bcc57487f..d52359c7911247 100644 --- a/drivers/gpu/drm/imagination/pvr_apple_t8010.c +++ b/drivers/gpu/drm/imagination/pvr_apple_t8010.c @@ -151,6 +151,12 @@ static void pvr_apple_set_window(struct pvr_apple *apple) writel(1, t->iop + IOP_WINDOW_ENABLE); } +/* Where the RTKit buffers may start: after the image and its data */ +static u32 pvr_apple_t8010_fw_runtime(struct pvr_apple *apple) +{ + return apple->chip->fw_runtime ?: PVR_APPLE_FW_RUNTIME; +} + static int pvr_apple_t8010_init(struct pvr_apple *apple) { struct device *dev = apple_dev(apple); @@ -179,10 +185,10 @@ static int pvr_apple_t8010_init(struct pvr_apple *apple) if (!IS_ALIGNED(t->win_dma, SZ_16K)) return dev_err_probe(dev, -EINVAL, "firmware window %pad not 16 KiB aligned\n", &t->win_dma); - t->win_next = PVR_APPLE_FW_RUNTIME; + t->win_next = pvr_apple_t8010_fw_runtime(apple); /* The firmware writes into its image while it runs: the copy is for a reset */ - err = pvr_apple_fw_load(apple, PVR_APPLE_FW_RUNTIME); + err = pvr_apple_fw_load(apple, pvr_apple_t8010_fw_runtime(apple)); if (err) return err; memcpy(t->win, apple->fw_image, apple->fw_size); @@ -323,7 +329,7 @@ static void pvr_apple_t8010_restore_image(struct pvr_apple *apple) /* The window as at probe: the image, zeroes after it, RTKit buffers anew */ memset(t->win, 0, pvr_apple_layout_init_offset()); memcpy(t->win, apple->fw_image, apple->fw_size); - t->win_next = PVR_APPLE_FW_RUNTIME; + t->win_next = pvr_apple_t8010_fw_runtime(apple); wmb(); } @@ -341,8 +347,37 @@ static void pvr_apple_t8010_write_compute(struct pvr_apple *apple, u32 seq, u64 pvr_apple_layout_write_compute_job(apple->heap, seq, stream, ctx_state); } +/* + * The firmware's per-cluster and per-pipe register counts. The A10's G9P + * loads six clusters and 0xfc0 for two pipes; the A10X's G9G loads twelve + * clusters and three pipes (Start3D's loads at fw 0xc02c-0xc2c2, StartTA's + * clusters up to fw 0xb164), so every Start3D slot after 0xfc0 moves by one + * word. The + * userspace extension carries one value per A10 cluster; the clusters are + * set alike, so cluster n takes value n % 6. + */ +struct pvr_apple_t8010_regs { + unsigned int clusters; + unsigned int pipes; + /* + * StartTA's 64-bit block in the geometry job record, which the + * firmware takes by pointer: the A10's 28 words fit at +0x800, before + * the scratch words at +0x900; the A10X's 34 do not, and go to +0x780. + */ + u32 ta_regs64; +}; + +static const struct pvr_apple_t8010_regs pvr_apple_t8010_regs = { + .clusters = 6, .pipes = 2, .ta_regs64 = 0x800, +}; +static const struct pvr_apple_t8010_regs pvr_apple_t8011_regs = { + .clusters = 12, .pipes = 3, .ta_regs64 = 0x780, +}; + +#define APPLE_EXT_CLUSTERS 6 + static void pvr_apple_geom_job_init(struct pvr_apple_ta_job *ta, const struct pvr_apple_cmd_geom *cmd, - struct pvr_hwrt_data *hwrt) + struct pvr_hwrt_data *hwrt, const struct pvr_apple_t8010_regs *layout) { const struct pvr_hwrt_dataset *set = hwrt->hwrt_dataset; const struct rogue_fwif_hwrtdata_common *common = &set->common; @@ -372,7 +407,10 @@ static void pvr_apple_geom_job_init(struct pvr_apple_ta_job *ta, const struct pv ta->regs64[14] = apple->vdm_call_stack; /* 0x418 */ ta->regs64[15] = cmd->cmd.regs.vdm_ctrl_stream_base; /* 0x408 */ memcpy(&ta->regs64[16], apple->pds_state, sizeof(apple->pds_state)); - memcpy(&ta->regs64[22], apple->cluster, sizeof(apple->cluster)); + for (unsigned int i = 0; i < layout->clusters; i++) + ta->regs64[22 + i] = apple->cluster[i % APPLE_EXT_CLUSTERS]; /* 0x11030 */ + ta->regs64_count = 22 + layout->clusters; + ta->regs64_offset = layout->ta_regs64; mutex_lock(&fl->lock); offset = (u64)(fl->max_pages - fl->current_pages) * sizeof(u32); @@ -386,10 +424,13 @@ static void pvr_apple_geom_job_init(struct pvr_apple_ta_job *ta, const struct pv /* Start3D's register blocks from the Rogue fragment command and the Apple extension */ static void pvr_apple_frag_job_init(struct pvr_apple_3d_job *frag, - const struct pvr_apple_cmd_frag *cmd, struct pvr_hwrt_data *hwrt) + const struct pvr_apple_cmd_frag *cmd, struct pvr_hwrt_data *hwrt, + const struct pvr_apple_t8010_regs *layout) { const struct rogue_fwif_frag_regs *regs = &cmd->cmd.regs; const struct pvr_apple_frag_regs *apple = &cmd->apple; + u64 *r64 = frag->regs64; + unsigned int i, n = 0; memset(frag, 0, sizeof(*frag)); frag->regs32[0] = hwrt->hwrt_dataset->common.isp_mtile_size; /* 0xf18 */ @@ -404,40 +445,58 @@ static void pvr_apple_frag_job_init(struct pvr_apple_3d_job *frag, frag->regs32[10] = apple->r_fd8; frag->regs32[11] = apple->r_4070; memcpy(&frag->regs32[12], apple->line, sizeof(apple->line)); - frag->regs64[0] = apple->isp_sample_pos; /* 0xfa8 */ - frag->regs64[1] = regs->isp_scissor_base; /* 0xfb0 */ - frag->regs64[2] = regs->isp_dbias_base; /* 0xfb8 */ - frag->regs64[3] = regs->isp_oclqry_base; /* 0xfc0, pipe 0 */ - frag->regs64[4] = regs->isp_oclqry_base; /* 0xfc0, pipe 1 */ + r64[n++] = apple->isp_sample_pos; /* 0xfa8 */ + r64[n++] = regs->isp_scissor_base; /* 0xfb0 */ + r64[n++] = regs->isp_dbias_base; /* 0xfb8 */ + for (i = 0; i < layout->pipes; i++) + r64[n++] = regs->isp_oclqry_base; /* 0xfc0, per pipe */ /* * Depth load and store bases, then stencil's (measured: the depth * store reaches memory only with the base in 0xf58) */ - frag->regs64[5] = regs->isp_zlsctl; /* 0xf48 */ - frag->regs64[6] = regs->isp_zload_store_base; /* 0xf50 Z load */ - frag->regs64[7] = regs->isp_zload_store_base; /* 0xf58 Z store */ - frag->regs64[8] = regs->isp_stencil_load_store_base; /* 0xf60 S load */ - frag->regs64[9] = regs->isp_stencil_load_store_base; /* 0xf68 S store */ - frag->regs64[10] = apple->isp_rgn; /* 0xf28 */ - memcpy(&frag->regs64[11], apple->pds_bgnd, sizeof(apple->pds_bgnd)); - frag->regs64[15] = regs->isp_aa; /* 0xf30 */ - memcpy(&frag->regs64[16], apple->cluster0, sizeof(apple->cluster0)); - memcpy(&frag->regs64[22], apple->cluster1, sizeof(apple->cluster1)); - frag->regs64[28] = apple->r_fd0; + r64[n++] = regs->isp_zlsctl; /* 0xf48 */ + r64[n++] = regs->isp_zload_store_base; /* 0xf50 Z load */ + r64[n++] = regs->isp_zload_store_base; /* 0xf58 Z store */ + r64[n++] = regs->isp_stencil_load_store_base; /* 0xf60 S load */ + r64[n++] = regs->isp_stencil_load_store_base; /* 0xf68 S store */ + r64[n++] = apple->isp_rgn; /* 0xf28 */ + for (i = 0; i < ARRAY_SIZE(apple->pds_bgnd); i++) + r64[n++] = apple->pds_bgnd[i]; /* 0x6a0 ... 0x6b8 */ + r64[n++] = regs->isp_aa; /* 0xf30 */ + for (i = 0; i < layout->clusters; i++) + r64[n++] = apple->cluster0[i % APPLE_EXT_CLUSTERS]; /* 0x11020 */ + for (i = 0; i < layout->clusters; i++) + r64[n++] = apple->cluster1[i % APPLE_EXT_CLUSTERS]; /* 0x11080 */ + r64[n++] = apple->r_fd0; /* 0xfd0 */ + frag->regs64_count = n; } static void pvr_apple_t8010_prepare_geom(void *hw, struct pvr_job *job) { union pvr_apple_t8010_render_job *render = hw; - pvr_apple_geom_job_init(&render->ta, job->cmd, job->hwrt); + pvr_apple_geom_job_init(&render->ta, job->cmd, job->hwrt, &pvr_apple_t8010_regs); +} + +static void pvr_apple_t8011_prepare_geom(void *hw, struct pvr_job *job) +{ + union pvr_apple_t8010_render_job *render = hw; + + pvr_apple_geom_job_init(&render->ta, job->cmd, job->hwrt, &pvr_apple_t8011_regs); } static void pvr_apple_t8010_prepare_frag(void *hw, struct pvr_job *job) { union pvr_apple_t8010_render_job *render = hw; - pvr_apple_frag_job_init(&render->frag, job->cmd, job->hwrt); + pvr_apple_frag_job_init(&render->frag, job->cmd, job->hwrt, &pvr_apple_t8010_regs); +} + +static void pvr_apple_t8011_prepare_frag(void *hw, struct pvr_job *job) +{ + union pvr_apple_t8010_render_job *render = hw; + + pvr_apple_frag_job_init(&render->frag, job->cmd, job->hwrt, &pvr_apple_t8011_regs); } static void pvr_apple_t8010_write_geom(struct pvr_apple *apple, u32 seq, const void *hw) @@ -489,3 +548,35 @@ const struct pvr_apple_chip pvr_apple_chip_t8010 = { .write_frag = pvr_apple_t8010_write_frag, .report_hang = pvr_apple_t8010_report_hang, }; + +/* + * The A10X (T8011): the A10's register windows and RTKit build, with its own + * G9G firmware (AGXFirmwareKextG9GRTBuddy). + */ +const struct pvr_apple_chip pvr_apple_chip_t8011 = { + .fw_name = "apple/gfx-t8011.bin", + /* Its data ends at 0x8ff04 (start-up literal at 0x470), 0x1000 past the A10's */ + .fw_runtime = 0x90000, + .perf_state_max = 4, /* live ADT sgx: 426, 616, 848 and 1086 MHz */ + .compute_slots = APPLE_JOB_SLOTS, + .render_job_size = sizeof(union pvr_apple_t8010_render_job), + .geom_stream = &pvr_apple_cmd_geom_stream, + .frag_stream = &pvr_apple_cmd_frag_stream, + .geom_ext_type = PVR_STREAM_EXTHDR_TYPE_GEOM_APPLE, + .geom_ext_mask = PVR_STREAM_EXTHDR_GEOM_APPLE_REGS, + .frag_ext_type = PVR_STREAM_EXTHDR_TYPE_FRAG_APPLE, + .frag_ext_mask = PVR_STREAM_EXTHDR_FRAG_APPLE_REGS, + .init = pvr_apple_t8010_init, + .boot = pvr_apple_t8010_boot, + .start = pvr_apple_t8010_start, + .stop = pvr_apple_t8010_stop, + .idle = pvr_apple_t8010_idle, + .restore_image = pvr_apple_t8010_restore_image, + .kick = pvr_apple_t8010_kick, + .write_compute = pvr_apple_t8010_write_compute, + .prepare_geom = pvr_apple_t8011_prepare_geom, + .prepare_frag = pvr_apple_t8011_prepare_frag, + .write_geom = pvr_apple_t8010_write_geom, + .write_frag = pvr_apple_t8010_write_frag, + .report_hang = pvr_apple_t8010_report_hang, +}; diff --git a/drivers/gpu/drm/imagination/pvr_device.c b/drivers/gpu/drm/imagination/pvr_device.c index 580e76e7d91e3e..e1271ad81c819b 100644 --- a/drivers/gpu/drm/imagination/pvr_device.c +++ b/drivers/gpu/drm/imagination/pvr_device.c @@ -547,6 +547,7 @@ pvr_gpu_support_level(const struct pvr_gpu_id *gpu_id) return PVR_GPU_SUPPORTED; case PVR_PACKED_BVNC(1, 70, 4, 3): /* Apple A7 (S5L8960X), the J71's */ + case PVR_PACKED_BVNC(13, 7, 12, 2): /* Apple A10X (T8011) */ return PVR_GPU_EXPERIMENTAL; default: diff --git a/drivers/gpu/drm/imagination/pvr_drv.c b/drivers/gpu/drm/imagination/pvr_drv.c index f84b607c829966..61ebab16192231 100644 --- a/drivers/gpu/drm/imagination/pvr_drv.c +++ b/drivers/gpu/drm/imagination/pvr_drv.c @@ -1554,6 +1554,12 @@ static const struct pvr_device_data pvr_device_data_apple = { .apple_chip = &pvr_apple_chip_t8010, }; +static const struct pvr_device_data pvr_device_data_apple_t8011 = { + .pwr_ops = &pvr_power_sequence_ops_apple, + .apple_fw = true, + .apple_chip = &pvr_apple_chip_t8011, +}; + static const struct pvr_device_data pvr_device_data_apple_t8015 = { .pwr_ops = &pvr_power_sequence_ops_apple, .apple_fw = true, @@ -1589,6 +1595,10 @@ static const struct of_device_id dt_match[] = { .compatible = "apple,t8010-gpu", .data = &pvr_device_data_apple, }, + { + .compatible = "apple,t8011-gpu", + .data = &pvr_device_data_apple_t8011, + }, { .compatible = "apple,t8015-gpu", .data = &pvr_device_data_apple_t8015,