Skip to content

Commit abc9a00

Browse files
committed
drm/asahi: Identify and implement helper config register
Signed-off-by: Asahi Lina <[email protected]>
1 parent 9ff27ec commit abc9a00

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

drivers/gpu/drm/asahi/fw/compute.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub(crate) mod raw {
2424
pub(crate) helper_program: u32,
2525
pub(crate) unk_44: u32,
2626
pub(crate) helper_arg: U64,
27-
pub(crate) helper_unk: u32,
27+
pub(crate) helper_cfg: u32,
2828
pub(crate) unk_54: u32,
2929
pub(crate) unk_58: u32,
3030
pub(crate) unk_5c: u32,

drivers/gpu/drm/asahi/fw/fragment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub(crate) mod raw {
141141
pub(crate) isp_bgobjvals: u32,
142142
pub(crate) unk_38: u32,
143143
pub(crate) unk_3c: u32,
144-
pub(crate) unk_40: u32,
144+
pub(crate) helper_cfg: u32,
145145
pub(crate) __pad: Pad<0xac>,
146146
}
147147

drivers/gpu/drm/asahi/fw/vertex.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ pub(crate) mod raw {
2525
pub(crate) tpc_stride: u32,
2626
pub(crate) unk_24: u32,
2727
pub(crate) unk_28: u32,
28-
pub(crate) __pad: Pad<0x74>,
28+
pub(crate) helper_cfg: u32,
29+
pub(crate) __pad: Pad<0x70>,
2930
}
3031

3132
#[versions(AGX)]

drivers/gpu/drm/asahi/queue/compute.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl super::Queue::ver {
279279
helper_program: cmdbuf.helper_program, // Internal program addr | 1
280280
unk_44: 0,
281281
helper_arg: U64(cmdbuf.helper_arg), // Only if internal program used
282-
helper_unk: cmdbuf.helper_unk, // 0x40 if internal program used
282+
helper_cfg: cmdbuf.helper_cfg, // 0x40 if internal program used
283283
unk_54: 0,
284284
unk_58: 1,
285285
unk_5c: 0,
@@ -300,7 +300,7 @@ impl super::Queue::ver {
300300
r.add(0x10071, 0x1100000000); // USC_EXEC_BASE_CP
301301
r.add(0x11841, cmdbuf.helper_program.into());
302302
r.add(0x11849, cmdbuf.helper_arg);
303-
r.add(0x11f81, cmdbuf.helper_unk.into());
303+
r.add(0x11f81, cmdbuf.helper_cfg.into());
304304
r.add(0x1a440, 0x24201);
305305
r.add(0x12091, cmdbuf.iogpu_unk_40.into());
306306
/*

drivers/gpu/drm/asahi/queue/render.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ impl super::Queue::ver {
200200
} else {
201201
0x8000
202202
},
203+
helper_cfg: cmdbuf.vertex_helper_cfg,
203204
__pad: Default::default(),
204205
},
205206
})
@@ -859,7 +860,7 @@ impl super::Queue::ver {
859860
isp_bgobjvals: unks.load_bgobjvals as u32,
860861
unk_38: unks.frg_unk_38 as u32,
861862
unk_3c: unks.frg_unk_3c as u32,
862-
unk_40: unks.frg_unk_40 as u32,
863+
helper_cfg: cmdbuf.fragment_helper_cfg,
863864
__pad: Default::default(),
864865
}),
865866
#[ver(G >= G14X)]
@@ -932,7 +933,7 @@ impl super::Queue::ver {
932933
r.add(0x16451, 0x0); // ISP_RENDER_ORIGIN
933934
r.add(0x11821, cmdbuf.fragment_helper_program.into());
934935
r.add(0x11829, cmdbuf.fragment_helper_arg);
935-
r.add(0x11f79, 0);
936+
r.add(0x11f79, cmdbuf.fragment_helper_cfg.into());
936937
r.add(0x15359, 0);
937938
r.add(0x10069, 0x11_00000000); // USC_EXEC_BASE_ISP
938939
r.add(0x16020, 0);
@@ -1426,7 +1427,7 @@ impl super::Queue::ver {
14261427
r.add(0x10061, 0x11_00000000); // USC_EXEC_BASE_TA
14271428
r.add(0x11801, cmdbuf.vertex_helper_program.into());
14281429
r.add(0x11809, cmdbuf.vertex_helper_arg);
1429-
r.add(0x11f71, 0);
1430+
r.add(0x11f71, cmdbuf.vertex_helper_cfg.into());
14301431
r.add(0x1c0b1, tile_info.params.rgn_size.into()); // TE_PSG
14311432
r.add(0x1c850, tile_info.params.rgn_size.into());
14321433
r.add(0x10131, tile_info.params.unk_4.into());

0 commit comments

Comments
 (0)