mirror of
https://github.com/torvalds/linux.git
synced 2026-04-24 17:42:27 -04:00
Some DSS can only be available for geometry while others can only be available for compute. So here adding helpers to loop only available DSS for given usage. User of this helper will come in the next patch. v2: - drop has_dss() Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Zhanjun Dong <zhanjun.dong@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240424140319.61651-2-jose.souza@intel.com
40 lines
962 B
C
40 lines
962 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2022 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_GT_TOPOLOGY_H_
|
|
#define _XE_GT_TOPOLOGY_H_
|
|
|
|
#include "xe_gt_types.h"
|
|
|
|
/*
|
|
* Loop over each DSS with the bit is 1 in geometry or compute mask
|
|
* @dss: iterated DSS bit from the DSS mask
|
|
* @gt: GT structure
|
|
*/
|
|
#define for_each_dss(dss, gt) \
|
|
for_each_or_bit((dss), \
|
|
(gt)->fuse_topo.g_dss_mask, \
|
|
(gt)->fuse_topo.c_dss_mask, \
|
|
XE_MAX_DSS_FUSE_BITS)
|
|
|
|
struct drm_printer;
|
|
|
|
void xe_gt_topology_init(struct xe_gt *gt);
|
|
|
|
void xe_gt_topology_dump(struct xe_gt *gt, struct drm_printer *p);
|
|
|
|
unsigned int
|
|
xe_dss_mask_group_ffs(const xe_dss_mask_t mask, int groupsize, int groupnum);
|
|
|
|
bool xe_dss_mask_empty(const xe_dss_mask_t mask);
|
|
|
|
bool
|
|
xe_gt_topology_has_dss_in_quadrant(struct xe_gt *gt, int quad);
|
|
|
|
bool xe_gt_has_geometry_dss(struct xe_gt *gt, unsigned int dss);
|
|
bool xe_gt_has_compute_dss(struct xe_gt *gt, unsigned int dss);
|
|
|
|
#endif /* _XE_GT_TOPOLOGY_H_ */
|