2019-06-03 05:44:50 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2011-05-06 06:15:49 +00:00
|
|
|
/*
|
2017-12-05 20:29:31 +00:00
|
|
|
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
|
2011-05-06 06:15:49 +00:00
|
|
|
* Author: Archit Taneja <archit@ti.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OMAP2_DISPC_REG_H
|
|
|
|
#define __OMAP2_DISPC_REG_H
|
|
|
|
|
2011-05-06 06:15:50 +00:00
|
|
|
/* DISPC common registers */
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_REVISION 0x0000
|
|
|
|
#define DISPC_SYSCONFIG 0x0010
|
|
|
|
#define DISPC_SYSSTATUS 0x0014
|
|
|
|
#define DISPC_IRQSTATUS 0x0018
|
|
|
|
#define DISPC_IRQENABLE 0x001C
|
|
|
|
#define DISPC_CONTROL 0x0040
|
|
|
|
#define DISPC_CONFIG 0x0044
|
|
|
|
#define DISPC_CAPABLE 0x0048
|
|
|
|
#define DISPC_LINE_STATUS 0x005C
|
|
|
|
#define DISPC_LINE_NUMBER 0x0060
|
|
|
|
#define DISPC_GLOBAL_ALPHA 0x0074
|
|
|
|
#define DISPC_CONTROL2 0x0238
|
|
|
|
#define DISPC_CONFIG2 0x0620
|
|
|
|
#define DISPC_DIVISOR 0x0804
|
2012-08-22 13:57:02 +00:00
|
|
|
#define DISPC_GLOBAL_BUFFER 0x0800
|
2012-06-29 05:13:13 +00:00
|
|
|
#define DISPC_CONTROL3 0x0848
|
|
|
|
#define DISPC_CONFIG3 0x084C
|
2013-03-26 13:45:25 +00:00
|
|
|
#define DISPC_MSTANDBY_CTRL 0x0858
|
2013-11-14 09:38:25 +00:00
|
|
|
#define DISPC_GLOBAL_MFLAG_ATTRIBUTE 0x085C
|
2011-05-06 06:15:49 +00:00
|
|
|
|
2016-06-07 12:09:15 +00:00
|
|
|
#define DISPC_GAMMA_TABLE0 0x0630
|
|
|
|
#define DISPC_GAMMA_TABLE1 0x0634
|
|
|
|
#define DISPC_GAMMA_TABLE2 0x0638
|
|
|
|
#define DISPC_GAMMA_TABLE3 0x0850
|
|
|
|
|
2011-05-06 06:15:49 +00:00
|
|
|
/* DISPC overlay registers */
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_BA0(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_BA0_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_BA1(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_BA1_OFFSET(n))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_BA0_UV(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_BA0_UV_OFFSET(n))
|
|
|
|
#define DISPC_OVL_BA1_UV(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_BA1_UV_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_POSITION(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_POS_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_SIZE(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_SIZE_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_ATTRIBUTES(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_ATTR_OFFSET(n))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_ATTRIBUTES2(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_ATTR2_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIFO_THRESHOLD(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIFO_THRESH_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIFO_SIZE_STATUS(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIFO_SIZE_STATUS_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_ROW_INC(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_ROW_INC_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_PIXEL_INC(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_PIX_INC_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_WINDOW_SKIP(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_WINDOW_SKIP_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_TABLE_BA(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_TABLE_BA_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIR(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIR_OFFSET(n))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_FIR2(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_FIR2_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_PICTURE_SIZE(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_PIC_SIZE_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_ACCU0(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_ACCU0_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_ACCU1(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_ACCU1_OFFSET(n))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_ACCU2_0(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_ACCU2_0_OFFSET(n))
|
|
|
|
#define DISPC_OVL_ACCU2_1(n) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_ACCU2_1_OFFSET(n))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIR_COEF_H(n, i) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIR_COEF_H_OFFSET(n, i))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIR_COEF_HV(n, i) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIR_COEF_HV_OFFSET(n, i))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_FIR_COEF_H2(n, i) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_FIR_COEF_H2_OFFSET(n, i))
|
|
|
|
#define DISPC_OVL_FIR_COEF_HV2(n, i) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_FIR_COEF_HV2_OFFSET(n, i))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_CONV_COEF(n, i) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_CONV_COEF_OFFSET(n, i))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_FIR_COEF_V(n, i) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_FIR_COEF_V_OFFSET(n, i))
|
2011-05-19 14:17:53 +00:00
|
|
|
#define DISPC_OVL_FIR_COEF_V2(n, i) (DISPC_OVL_BASE(n) + \
|
|
|
|
DISPC_FIR_COEF_V2_OFFSET(n, i))
|
2011-05-06 06:15:51 +00:00
|
|
|
#define DISPC_OVL_PRELOAD(n) (DISPC_OVL_BASE(n) + \
|
2011-05-06 06:15:49 +00:00
|
|
|
DISPC_PRELOAD_OFFSET(n))
|
2014-09-29 20:46:15 +00:00
|
|
|
#define DISPC_OVL_MFLAG_THRESHOLD(n) DISPC_MFLAG_THRESHOLD_OFFSET(n)
|
2011-05-06 06:15:49 +00:00
|
|
|
|
2011-12-19 08:33:44 +00:00
|
|
|
/* DISPC up/downsampling FIR filter coefficient structure */
|
|
|
|
struct dispc_coef {
|
|
|
|
s8 hc4_vc22;
|
|
|
|
s8 hc3_vc2;
|
|
|
|
u8 hc2_vc1;
|
|
|
|
s8 hc1_vc0;
|
|
|
|
s8 hc0_vc00;
|
|
|
|
};
|
|
|
|
|
|
|
|
const struct dispc_coef *dispc_ovl_get_scale_coef(int inc, int five_taps);
|
|
|
|
|
2011-05-06 06:15:50 +00:00
|
|
|
/* DISPC manager/channel specific registers */
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_DEFAULT_COLOR(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x004C;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0050;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03AC;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0814;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_TRANS_COLOR(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0054;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0058;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03B0;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0818;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_TIMING_H(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0064;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0400;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0840;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_TIMING_V(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0068;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0404;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0844;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_POL_FREQ(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x006C;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0408;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x083C;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_DIVISORo(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0070;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x040C;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0838;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Named as DISPC_SIZE_LCD, DISPC_SIZE_DIGIT and DISPC_SIZE_LCD2 in TRM */
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_SIZE_MGR(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x007C;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0078;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03CC;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0834;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_DATA_CYCLE1(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x01D4;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03C0;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0828;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_DATA_CYCLE2(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x01D8;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03C4;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x082C;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_DATA_CYCLE3(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x01DC;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03C8;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0830;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_CPR_COEF_R(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0220;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03BC;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0824;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_CPR_COEF_G(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0224;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03B8;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x0820;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:51 +00:00
|
|
|
static inline u16 DISPC_CPR_COEF_B(enum omap_channel channel)
|
2011-05-06 06:15:50 +00:00
|
|
|
{
|
|
|
|
switch (channel) {
|
|
|
|
case OMAP_DSS_CHANNEL_LCD:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x0228;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_DIGIT:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD2:
|
2011-05-06 06:15:51 +00:00
|
|
|
return 0x03B4;
|
2012-06-19 09:38:16 +00:00
|
|
|
case OMAP_DSS_CHANNEL_LCD3:
|
|
|
|
return 0x081C;
|
2011-05-06 06:15:50 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:49 +00:00
|
|
|
/* DISPC overlay register base addresses */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_OVL_BASE(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0080;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x00BC;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x014C;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0300;
|
2012-08-22 13:57:02 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0500;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* DISPC overlay register offsets */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_BA0_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0000;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0008;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_BA1_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0004;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x000C;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_BA0_UV_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0544;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x04BC;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0310;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0118;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_BA1_UV_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0548;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x04C0;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0314;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x011C;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_POS_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0008;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x009C;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_SIZE_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x000C;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x00A8;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ATTR_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0020;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0010;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0070;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ATTR2_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0568;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x04DC;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x032C;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0310;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIFO_THRESH_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0024;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0014;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x008C;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIFO_SIZE_STATUS_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0028;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0018;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-08-22 13:57:02 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0088;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ROW_INC_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x002C;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x001C;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x00A4;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_PIX_INC_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0030;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0020;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0098;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_WINDOW_SKIP_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0034;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2011-05-06 06:15:49 +00:00
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_TABLE_BA_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0038;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2011-05-06 06:15:49 +00:00
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0024;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0090;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR2_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0580;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x055C;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0424;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x290;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_PIC_SIZE_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0028;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0094;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ACCU0_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x002C;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0000;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ACCU2_0_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0584;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0560;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0428;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0294;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ACCU1_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0030;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0004;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_ACCU2_1_OFFSET(enum omap_plane_id plane)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0588;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0564;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x042C;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0298;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:49 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_H_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0034 + i * 0x8;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0010 + i * 0x8;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-19 14:17:53 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_H2_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x058C + i * 0x8;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0568 + i * 0x8;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0430 + i * 0x8;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x02A0 + i * 0x8;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:49 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_HV_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0038 + i * 0x8;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0014 + i * 0x8;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-19 14:17:53 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_HV2_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0590 + i * 8;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x056C + i * 0x8;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0434 + i * 0x8;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x02A4 + i * 0x8;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-06 06:15:49 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4,} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_CONV_COEF_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
case OMAP_DSS_VIDEO2:
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-05-06 06:15:49 +00:00
|
|
|
return 0x0074 + i * 0x4;
|
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_V_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0124 + i * 0x4;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x00B4 + i * 0x4;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
2011-09-13 12:50:33 +00:00
|
|
|
return 0x0050 + i * 0x4;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-19 14:17:53 +00:00
|
|
|
/* coef index i = {0, 1, 2, 3, 4, 5, 6, 7} */
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_FIR_COEF_V2_OFFSET(enum omap_plane_id plane, u16 i)
|
2011-05-19 14:17:53 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x05CC + i * 0x4;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x05A8 + i * 0x4;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x0470 + i * 0x4;
|
2012-07-16 10:24:24 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x02E0 + i * 0x4;
|
2011-05-19 14:17:53 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-19 14:17:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_PRELOAD_OFFSET(enum omap_plane_id plane)
|
2011-05-06 06:15:49 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x01AC;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0174;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x00E8;
|
2011-09-13 12:50:33 +00:00
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x00A0;
|
2011-05-06 06:15:49 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
2012-05-18 08:47:02 +00:00
|
|
|
return 0;
|
2011-05-06 06:15:49 +00:00
|
|
|
}
|
|
|
|
}
|
2013-11-14 09:38:25 +00:00
|
|
|
|
2017-03-24 14:47:52 +00:00
|
|
|
static inline u16 DISPC_MFLAG_THRESHOLD_OFFSET(enum omap_plane_id plane)
|
2013-11-14 09:38:25 +00:00
|
|
|
{
|
|
|
|
switch (plane) {
|
|
|
|
case OMAP_DSS_GFX:
|
|
|
|
return 0x0860;
|
|
|
|
case OMAP_DSS_VIDEO1:
|
|
|
|
return 0x0864;
|
|
|
|
case OMAP_DSS_VIDEO2:
|
|
|
|
return 0x0868;
|
|
|
|
case OMAP_DSS_VIDEO3:
|
|
|
|
return 0x086c;
|
2015-11-04 15:10:41 +00:00
|
|
|
case OMAP_DSS_WB:
|
|
|
|
return 0x0870;
|
2013-11-14 09:38:25 +00:00
|
|
|
default:
|
|
|
|
BUG();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
2011-05-06 06:15:49 +00:00
|
|
|
#endif
|