Skip to content

Commit

Permalink
drm/asahi: Identify and implement helper config register
Browse files Browse the repository at this point in the history
Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed Jan 17, 2024
1 parent 7cbd770 commit 73ff2c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/fw/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) mod raw {
pub(crate) helper_program: u32,
pub(crate) unk_44: u32,
pub(crate) helper_arg: U64,
pub(crate) helper_unk: u32,
pub(crate) helper_cfg: u32,
pub(crate) unk_54: u32,
pub(crate) unk_58: u32,
pub(crate) unk_5c: u32,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/fw/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub(crate) mod raw {
pub(crate) isp_bgobjvals: u32,
pub(crate) unk_38: u32,
pub(crate) unk_3c: u32,
pub(crate) unk_40: u32,
pub(crate) helper_cfg: u32,
pub(crate) __pad: Pad<0xac>,
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/asahi/fw/vertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ pub(crate) mod raw {
pub(crate) tpc_stride: u32,
pub(crate) unk_24: u32,
pub(crate) unk_28: u32,
pub(crate) __pad: Pad<0x74>,
pub(crate) helper_cfg: u32,
pub(crate) __pad: Pad<0x70>,
}

#[versions(AGX)]
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/asahi/queue/compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl super::Queue::ver {
helper_program: cmdbuf.helper_program, // Internal program addr | 1
unk_44: 0,
helper_arg: U64(cmdbuf.helper_arg), // Only if internal program used
helper_unk: cmdbuf.helper_unk, // 0x40 if internal program used
helper_cfg: cmdbuf.helper_cfg, // 0x40 if internal program used
unk_54: 0,
unk_58: 1,
unk_5c: 0,
Expand Down
3 changes: 2 additions & 1 deletion drivers/gpu/drm/asahi/queue/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ impl super::Queue::ver {
} else {
0x8000
},
helper_cfg: cmdbuf.vertex_helper_cfg,
__pad: Default::default(),
},
})
Expand Down Expand Up @@ -862,7 +863,7 @@ impl super::Queue::ver {
isp_bgobjvals: unks.load_bgobjvals as u32,
unk_38: unks.frg_unk_38 as u32,
unk_3c: unks.frg_unk_3c as u32,
unk_40: unks.frg_unk_40 as u32,
helper_cfg: cmdbuf.fragment_helper_cfg,
__pad: Default::default(),
}),
#[ver(G >= G14X)]
Expand Down

0 comments on commit 73ff2c6

Please sign in to comment.