summaryrefslogblamecommitdiff
path: root/drivers/gpu/drm/xe/xe_mocs.h
blob: 63500a1d6660a2d0c95895eb55ecf2bb42d173a3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                      














                                                                             
/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2022 Intel Corporation
 */

#ifndef _XE_MOCS_H_
#define _XE_MOCS_H_

#include <linux/types.h>

struct xe_engine;
struct xe_gt;

void xe_mocs_init(struct xe_gt *gt);

/**
 * xe_mocs_index_to_value - Translate mocs index to the mocs value exected by
 * most blitter commands.
 * @mocs_index: index into the mocs tables
 *
 * Return: The corresponding mocs value to be programmed.
 */
static inline u32 xe_mocs_index_to_value(u32 mocs_index)
{
	return mocs_index << 1;
}

#endif