android_kernel_samsung_sm86.../adreno_a3xx.h
Mohammed Mirza Mandayappurath Manzoor 37683929f0 msm: kgsl: Overhaul coresight
Do a major reorganization of the coresight code. Move all the
coresight definitions to their own files that are conditional on
CONFIG_QCOM_KGSL_CORESIGHT. Next, add the regmap for "cx_dbgc" so that
we can get rid of the single purpose cx_dgbc registers and replace them
with the standard register read/write functions. Then finish making the
coresight functions more generic and have the individual targets
register themselves with coresight instead of keeping a pointer in the
gpudev struct.

Change-Id: Ic479934ef2ec6413cbac7498206d0202e7f76d5a
Signed-off-by: Nitheesh Muthuraj <quic_nmuthuraj@quicinc.com>
Signed-off-by: Mohammed Mirza Mandayappurath Manzoor <quic_mmandaya@quicinc.com>
2022-06-08 02:54:48 -07:00

77 lines
2.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2013-2016, 2019-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef __A3XX_H
#define __A3XX_H
#include "a3xx_reg.h"
/**
* struct adreno_a3xx_core - a3xx specific GPU core definitions
*/
struct adreno_a3xx_core {
/** @base: Container for the generic &struct adreno_gpu_core */
struct adreno_gpu_core base;
/** pm4fw_name: Name of the PM4 microcode file */
const char *pm4fw_name;
/** pfpfw_name: Name of the PFP microcode file */
const char *pfpfw_name;
/** @vbif: List of registers and values to write for VBIF */
const struct kgsl_regmap_list *vbif;
/** @vbif_count: Number of registers in @vbif */
u32 vbif_count;
};
struct adreno_device;
/**
* to_a3xx_core - return the a3xx specific GPU core struct
* @adreno_dev: An Adreno GPU device handle
*
* Returns:
* A pointer to the a3xx specific GPU core struct
*/
static inline const struct adreno_a3xx_core *
to_a3xx_core(struct adreno_device *adreno_dev)
{
const struct adreno_gpu_core *core = adreno_dev->gpucore;
return container_of(core, struct adreno_a3xx_core, base);
}
void a3xx_snapshot(struct adreno_device *adreno_dev,
struct kgsl_snapshot *snapshot);
extern const struct adreno_perfcounters adreno_a3xx_perfcounters;
/**
* a3xx_ringbuffer_init - Initialize the ringbuffer
* @adreno_dev: An Adreno GPU handle
*
* Initialize the ringbuffer for a3xx.
* Return: 0 on success or negative on failure
*/
int a3xx_ringbuffer_init(struct adreno_device *adreno_dev);
/**
* a3xx_ringbuffer_submitcmd - Submit a user command to the ringbuffer
* @adreno_dev: An Adreno GPU handle
* @cmdobj: Pointer to a user command object
* @flags: Internal submit flags
* @time: Optional pointer to a adreno_submit_time container
*
* Return: 0 on success or negative on failure
*/
int a3xx_ringbuffer_submitcmd(struct adreno_device *adreno_dev,
struct kgsl_drawobj_cmd *cmdobj, u32 flags,
struct adreno_submit_time *time);
#ifdef CONFIG_QCOM_KGSL_CORESIGHT
void a3xx_coresight_init(struct adreno_device *device);
#else
static inline void a3xx_coresight_init(struct adreno_device *device) { }
#endif
#endif /*__A3XX_H */