Lines Matching refs:afb
721 static int convert_tiling_flags_to_modifier(struct amdgpu_framebuffer *afb) in convert_tiling_flags_to_modifier() argument
723 struct amdgpu_device *adev = drm_to_adev(afb->base.dev); in convert_tiling_flags_to_modifier()
731 if (!afb->tiling_flags || !AMDGPU_TILING_GET(afb->tiling_flags, SWIZZLE_MODE)) { in convert_tiling_flags_to_modifier()
734 int swizzle = AMDGPU_TILING_GET(afb->tiling_flags, SWIZZLE_MODE); in convert_tiling_flags_to_modifier()
743 uint32_t dcc_offset = AMDGPU_TILING_GET(afb->tiling_flags, DCC_OFFSET_256B); in convert_tiling_flags_to_modifier()
786 if (!has_xor && afb->base.format->cpp[0] != 4) in convert_tiling_flags_to_modifier()
825 AMD_FMT_MOD_SET(TILE, AMDGPU_TILING_GET(afb->tiling_flags, SWIZZLE_MODE)) | in convert_tiling_flags_to_modifier()
832 bool dcc_i64b = AMDGPU_TILING_GET(afb->tiling_flags, DCC_INDEPENDENT_64B) != 0; in convert_tiling_flags_to_modifier()
853 afb->base.offsets[1] = dcc_offset * 256 + afb->base.offsets[0]; in convert_tiling_flags_to_modifier()
854 afb->base.pitches[1] = in convert_tiling_flags_to_modifier()
855 AMDGPU_TILING_GET(afb->tiling_flags, DCC_PITCH_MAX) + 1; in convert_tiling_flags_to_modifier()
865 if (extract_render_dcc_offset(adev, afb->base.obj[0], in convert_tiling_flags_to_modifier()
868 render_dcc_offset != afb->base.offsets[1] && in convert_tiling_flags_to_modifier()
873 afb->base.offsets[2] = render_dcc_offset; in convert_tiling_flags_to_modifier()
889 dcc_block_bits -= ilog2(afb->base.format->cpp[0]); in convert_tiling_flags_to_modifier()
890 afb->base.pitches[2] = ALIGN(afb->base.width, in convert_tiling_flags_to_modifier()
893 format_info = amdgpu_lookup_format_info(afb->base.format->format, in convert_tiling_flags_to_modifier()
898 afb->base.format = format_info; in convert_tiling_flags_to_modifier()
902 afb->base.modifier = modifier; in convert_tiling_flags_to_modifier()
903 afb->base.flags |= DRM_MODE_FB_MODIFIERS; in convert_tiling_flags_to_modifier()
908 static int check_tiling_flags_gfx6(struct amdgpu_framebuffer *afb) in check_tiling_flags_gfx6() argument
913 if (AMDGPU_TILING_GET(afb->tiling_flags, SWIZZLE_MODE) == 0) in check_tiling_flags_gfx6()
916 micro_tile_mode = AMDGPU_TILING_GET(afb->tiling_flags, MICRO_TILE_MODE); in check_tiling_flags_gfx6()
922 drm_dbg_kms(afb->base.dev, in check_tiling_flags_gfx6()