Commit 825d8ab8 authored by hanetzer's avatar hanetzer

drm/panfrost: add job handling stubs

Signed-off-by: hanetzer's avatarMarty E. Plummer <hanetzer@startmail.com>
parent 5372efc4
......@@ -6,6 +6,7 @@
#include "panfrost_device.h"
#include "panfrost_gpu.h"
#include "panfrost_job.h"
#include "panfrost_mmu.h"
struct panfrost_ip_desc {
......
......@@ -53,9 +53,6 @@ struct panfrost_device {
int panfrost_device_init(struct panfrost_device *pfdev);
void panfrost_device_fini(struct panfrost_device *pfdev);
int panfrost_job_init(struct panfrost_ip *ip);
void panfrost_job_fini(struct panfrost_ip *ip);
const char *panfrost_ip_name(struct panfrost_ip *ip);
#endif
......@@ -2,6 +2,13 @@
/* Copyright 2018 Panfrost Team */
#include "panfrost_device.h"
#include "panfrost_job.h"
#include "panfrost_regs.h"
#define job_write(reg, data) writel(data, ip->iomem + PAN_JOB_##reg)
#define job_read(reg) readl(ip->iomem + PAN_JOB_##reg)
#define job_slot_write(js, reg, data) writel(data, ip->iomem + PAN_JOB_SLOT0 + ((js) << 7) + PAN_JS_##reg)
#define job_slot_read(js, reg) readl(ip->iomem + PAN_JOB_SLOT0 + ((js) << 7) + PAN_JS_##reg)
int panfrost_job_init(struct panfrost_ip *ip)
{
......
// SPDX-License-Identifier: GPL-2.0
/* Copyright 2018 Panfrost Team */
#ifndef __PANFROST_JOB_H__
#define __PANFROST_JOB_H__
struct panfrost_ip;
struct panfrost_device;
int panfrost_job_init(struct panfrost_ip *ip);
void panfrost_job_fini(struct panfrost_ip *ip);
#endif
......@@ -40,6 +40,32 @@
#define PAN_GPU_CMD_SOFT_RESET 0x01
#define PAN_GPU_STATUS 0x34
/* Job Control regs */
#define PAN_JOB_INT_RAWSTAT 0x000
#define PAN_JOB_INT_CLEAR 0x004
#define PAN_JOB_INT_MASK 0x008
#define PAN_JOB_INT_STAT 0x00c
#define PAN_JOB_JS_STATE 0x010
#define PAN_JOB_INT_THROTTLE 0x014
#define PAN_JOB_SLOT0 0x800
#define PAN_JS_HEAD_LO 0x000
#define PAN_JS_HEAD_HI 0x004
#define PAN_JS_TAIL_LO 0x008
#define PAN_JS_TAIL_HI 0x00c
#define PAN_JS_AFFINITY_LO 0x010
#define PAN_JS_AFFINITY_HI 0x014
#define PAN_JS_CONFIG 0x018
#define PAN_JS_XAFFINITY 0x01c
#define PAN_JS_COMMAND 0x020
#define PAN_JS_STATUS 0x024
#define PAN_JS_HEAD_NEXT_LO 0x040
#define PAN_JS_HEAD_NEXT_HI 0x044
#define PAN_JS_AFFINITY_NEXT_LO 0x050
#define PAN_JS_AFFINITY_NEXT_HI 0x054
#define PAN_JS_CONFIG_NEXT 0x058
#define PAN_JS_COMMAND_NEXT 0x060
#define PAN_JS_FLUSH_ID_NEXT 0x070
/* MMU regs */
#define PAN_MMU_INT_RAWSTAT 0x00
#define PAN_MMU_INT_CLEAR 0x04
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment