Skip to content

Commit

Permalink
drm/asahi: render: Implement unknown value UAPI extension
Browse files Browse the repository at this point in the history
  • Loading branch information
asahilina committed Apr 26, 2023
1 parent 0585ff5 commit 967e339
Show file tree
Hide file tree
Showing 7 changed files with 183 additions and 54 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/asahi/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ pub(crate) enum DebugFlags {
Debug6 = 54,
Debug7 = 55,

AllowUnknownOverrides = 62,
OopsOnGpuCrash = 63,
}

Expand Down
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 @@ -63,7 +63,7 @@ pub(crate) mod raw {
pub(crate) microsequence: GpuPointer<'a, &'a [u8]>,
pub(crate) microsequence_size: u32,
pub(crate) job_params2: JobParameters2::ver<'a>,
pub(crate) encoder_params: job::raw::EncoderParams<'a>,
pub(crate) encoder_params: job::raw::EncoderParams,
pub(crate) meta: job::raw::JobMeta,
pub(crate) cur_ts: U64,
pub(crate) start_ts: Option<GpuPointer<'a, AtomicU64>>,
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 @@ -234,7 +234,7 @@ pub(crate) mod raw {
pub(crate) busy_flag: u32,
pub(crate) tvb_overflow_count: u32,
pub(crate) unk_878: u32,
pub(crate) encoder_params: job::raw::EncoderParams<'a>,
pub(crate) encoder_params: job::raw::EncoderParams,
pub(crate) process_empty_tiles: u32,
pub(crate) no_clear_pipeline_textures: u32,
pub(crate) msaa_zs: u32,
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/asahi/fw/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ pub(crate) mod raw {

#[derive(Debug)]
#[repr(C)]
pub(crate) struct EncoderParams<'a> {
pub(crate) struct EncoderParams {
pub(crate) unk_8: u32,
pub(crate) large_tib: u32,
pub(crate) unk_10: u32,
pub(crate) encoder_id: u32,
pub(crate) unk_18: u32,
pub(crate) iogpu_compute_unk44: u32,
pub(crate) seq_buffer: GpuPointer<'a, &'a [u64]>,
pub(crate) seq_buffer: U64,
pub(crate) unk_28: U64,
}

Expand Down
5 changes: 2 additions & 3 deletions drivers/gpu/drm/asahi/fw/vertex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ pub(crate) mod raw {
pub(crate) tvb_cluster_tilemaps: Option<GpuPointer<'a, &'a [u8]>>,
pub(crate) tpc: GpuPointer<'a, &'a [u8]>,
pub(crate) tvb_heapmeta: GpuPointer<'a, &'a [u8]>,
pub(crate) iogpu_unk_54: u32,
pub(crate) iogpu_unk_55: u32,
pub(crate) iogpu_unk_54: U64,
pub(crate) iogpu_unk_56: U64,
#[ver(G < G14)]
pub(crate) tvb_cluster_meta1: Option<GpuPointer<'a, &'a [u8]>>,
Expand Down Expand Up @@ -134,7 +133,7 @@ pub(crate) mod raw {
pub(crate) unk_pointee: u32,
pub(crate) unk_pad: u32,
pub(crate) job_params2: JobParameters2<'a>,
pub(crate) encoder_params: job::raw::EncoderParams<'a>,
pub(crate) encoder_params: job::raw::EncoderParams,
pub(crate) unk_55c: u32,
pub(crate) unk_560: u32,
pub(crate) memoryless_rts_used: u32,
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 @@ -298,7 +298,7 @@ impl super::Queue::ver {
encoder_id: cmdbuf.encoder_id,
unk_18: 0x0, // fixed
iogpu_compute_unk44: cmdbuf.iogpu_unk_44,
seq_buffer: inner.seq_buf.gpu_pointer(),
seq_buffer: U64(inner.seq_buf.gpu_pointer().into()),
unk_28: U64(0x0), // fixed
},
meta: fw::job::raw::JobMeta {
Expand Down
Loading

0 comments on commit 967e339

Please sign in to comment.