📄 dp_hardware_marathon.c
字号:
/*********************************************************************************
*********************************************************************************
**
** Name : dp_hardware_marathon.c
** Title : Hardware implementation specific module for display pipeline
** Author : P. Buxton
** Created : November 2002
**
** Copyright : 2002 by Imagination Technologies Limited. All rights reserved
** : No part of this software, either material or conceptual
** : may be copied or distributed, transmitted, transcribed,
** : stored in a retrieval system or translated into any
** : human or computer language in any form by any means,
** : electronic, mechanical, manual or other-wise, or
** : disclosed to third parties without the express written
** : permission of Imagination Technologies Limited, Unit 8,
** : HomePark Industrial Estate, King's Langley, Hertfordshire,
** : WD4 8LZ, U.K.
**
** Description : This module contains the hardware field mappings and
** capabilities table for each stream present in the current
** hardware implementation. This file must be hand modified for
** each different implementation of the display pipeline.
**
** Platform : Platform independent (modify 'types.h' accordingly)
** $Log: dp_hardware_marathon.c $
**
** --- Revision Logs Removed ---
**
*********************************************************************************
*********************************************************************************/
/* This file is implementation dependant - each different version */
/* of the display pipeline must have its own version of this file */
#include "img_defs.h"
#include "dp_types.h"
#include "dp_init_marathon.h"
#include "dp_hardware.h"
#include "dp_hardware_dispatcher.h"
#if defined (_WIN32)
DP_PUINT_32 DP_pui32BaseAddress = 0x00000000;
#define SLOT_SIZE 2
#else
DP_PUINT_32 DP_pui32BaseAddress = DTV_PDP_HWBASE;
#endif
DP_UINT_16 DP_ui16ActualDisplayHeight = 0;
/************************************************/
/* These are present for interrupt testing only */
/************************************************/
DP_UINT_32 IntCountCursor2Underrun;
DP_UINT_32 IntCountCursor1Underrun;
DP_UINT_32 IntCountPlane6Underrun;
DP_UINT_32 IntCountPlane5Underrun;
DP_UINT_32 IntCountPlane4Underrun;
DP_UINT_32 IntCountPlane3Underrun;
DP_UINT_32 IntCountPlane2Underrun;
DP_UINT_32 IntCountPlane1Underrun;
DP_UINT_32 IntCountPlane2BufferOverrun;
DP_UINT_32 IntCountPlane1BufferOverrun;
DP_UINT_32 IntCountVerticalBlanking_SecondField;
DP_UINT_32 IntCountVerticalBlanking_FirstField;
DP_UINT_32 IntCountHorizontalBlanking_SecondField;
DP_UINT_32 IntCountHorizontalBlanking_FirstField;
/************************************************/
const DP_FieldTarget DP_asStreamFieldTargets [ DP_NO_OF_STREAMS ][ DP_NO_OF_STREAM_SPECIFIC_FIELDS ] =
{
/* Read Target Write Mask */
/* from address from */
/* bit offset bit */
/* Graphics */
{
0, (0x18<<SLOT_SIZE), 27, 0x18000000, /* Field 0 - Alpha blend mode */
0, (0x08<<SLOT_SIZE), 24, 0xFF000000, /* Field 1 - Alpha blend global value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 2 - Blinking enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 3 - Blinking rate */
0, (0x18<<SLOT_SIZE), 30, 0x40000000, /* Field 4 - Colour key enabled */
0, (0x18<<SLOT_SIZE), 29, 0x20000000, /* Field 5 - Colour key against this plane */
0, (0x08<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 6 - Colour key colour */
0, (0x10<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 7 - Colour key mask */
0, (0x00<<SLOT_SIZE), 25, 0x02000000, /* Field 8 - Colour space conversion enabled */
0, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 9 - Colour space conversion mode */
0, (0x00<<SLOT_SIZE), 26, 0x04000000, /* Field 10 - Gamma correction enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 11 - Graphics wrapping enabled */
0, (0x00<<SLOT_SIZE), 31, 0x80000000, /* Field 12 - Palette enabled */
0, (0x00<<SLOT_SIZE), 27, 0xF8000000, /* Field 13 - Pixel colour format */
0, (0x00<<SLOT_SIZE), 22, 0x00000000, /* Field 14 - Offset luma samples flag */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 15 - Source frame X position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 16 - Source frame Y position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 17 - Source image height */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 18 - Slave Plane enabled */
4, (0x18<<SLOT_SIZE), 0, 0x007FFFFF, /* Field 19 - Source buffer base address */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 20 - Source buffer U address */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 21 - Source buffer V address */
0, (0x30<<SLOT_SIZE), 22, 0xFFC00000, /* Field 22 - Source buffer stride */
0, (0x20<<SLOT_SIZE), 31, 0x80000000, /* Field 23 - Source buffer UV strides halved */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 24 - Field interlaced */
0, (0x18<<SLOT_SIZE), 24, 0x03000000, /* Field 25 - Draw order position */
0, (0x30<<SLOT_SIZE), 11, 0x003FF800, /* Field 26 - Plane X position */
0, (0x30<<SLOT_SIZE), 0, 0x000007FF, /* Field 27 - Plane Y position */
0, (0x00<<SLOT_SIZE), 11, 0x003FF800, /* Field 28 - Source frame width */
0, (0x00<<SLOT_SIZE), 0, 0x000007FF, /* Field 29 - Source frame height */
0, (0x18<<SLOT_SIZE), 31, 0x80000000, /* Field 30 - Plane visible */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 31 - Scaler horizontal bypass */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 32 - Scaler vertical bypass */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 33 - Scaling order */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 34 - Scaler vertical filter order */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 35 - Scaler vertical pitch */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 36 - Scaler vertical coef block start */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 37 - Scaler initial horizontal position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 38 - Scaler horizontal pitch */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 39 - Scaler horizontal coef block start */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 40 - Scaler horizontal skip */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 41 - Scaler horizontal decimation control */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 42 - Scaler scaled width */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 43 - Scaler scaled height */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 44 - Scaler Initial 1 */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 45 - Scaler Initial 0 */
0, (0x10<<SLOT_SIZE), 31, 0x80000000, /* Field 46 - Scaler pixel doubling on /off */
0, (0x10<<SLOT_SIZE), 30, 0x40000000, /* Field 47 - Scaler pixel halving on / off */
0, (0x10<<SLOT_SIZE), 29, 0x20000000, /* Field 48 - Scaler line doubling on / off */
0, (0x10<<SLOT_SIZE), 28, 0x10000000, /* Field 49 - Scaler line halving on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 50 - Panning left hand edge clip value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 51 - Panning top edge lines to clip value */
0, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 52 - Panning external access on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 53 - Panning external panning control on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 54 - Panning external fields on / off */
},
/* Video */
{
0, (0x19<<SLOT_SIZE), 27, 0x18000000, /* Field 0 - Alpha blend mode */
0, (0x09<<SLOT_SIZE), 24, 0xFF000000, /* Field 1 - Alpha blend global value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 2 - Blinking enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 3 - Blinking rate */
0, (0x19<<SLOT_SIZE), 30, 0x40000000, /* Field 4 - Colour key enabled */
0, (0x19<<SLOT_SIZE), 29, 0x20000000, /* Field 5 - Colour key against this plane */
0, (0x09<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 6 - Colour key colour */
0, (0x11<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 7 - Colour key mask */
0, (0x01<<SLOT_SIZE), 25, 0x02000000, /* Field 8 - Colour space conversion enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 9 - Colour space conversion mode */
0, (0x01<<SLOT_SIZE), 26, 0x04000000, /* Field 10 - Gamma correction enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 11 - Graphics wrapping enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 12 - Palette enabled */
0, (0x01<<SLOT_SIZE), 27, 0xF8000000, /* Field 13 - Pixel colour format */
0, (0x01<<SLOT_SIZE), 22, 0x00400000, /* Field 14 - Offset luma samples flag */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 15 - Source frame X position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 16 - Source frame Y position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 17 - Source image height */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 18 - Slave Plane enabled */
4, (0x19<<SLOT_SIZE), 0, 0x007FFFFF, /* Field 19 - Source buffer base address */
3, (0x21<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 20 - Source buffer U address */
3, (0x29<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 21 - Source buffer V address */
0, (0x31<<SLOT_SIZE), 22, 0xFFC00000, /* Field 22 - Source buffer stride */
0, (0x21<<SLOT_SIZE), 31, 0x80000000, /* Field 23 - Source buffer UV strides halved */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 24 - Field interlaced */
0, (0x19<<SLOT_SIZE), 24, 0x03000000, /* Field 25 - Draw order position */
0, (0x31<<SLOT_SIZE), 11, 0x003FF800, /* Field 26 - Plane X position */
0, (0x31<<SLOT_SIZE), 0, 0x000007FF, /* Field 27 - Plane Y position */
0, (0x01<<SLOT_SIZE), 11, 0x003FF800, /* Field 28 - Source frame width */
0, (0x01<<SLOT_SIZE), 0, 0x000007FF, /* Field 29 - Source frame height */
0, (0x19<<SLOT_SIZE), 31, 0x80000000, /* Field 30 - Plane visible */
0, (0x64<<SLOT_SIZE), 31, 0x80000000, /* Field 31 - Scaler horizontal bypass */
0, (0x64<<SLOT_SIZE), 30, 0x40000000, /* Field 32 - Scaler vertical bypass */
0, (0x64<<SLOT_SIZE), 29, 0x20000000, /* Field 33 - Scaling order */
0, (0x64<<SLOT_SIZE), 16, 0x00030000, /* Field 34 - Scaler vertical filter order */
0, (0x64<<SLOT_SIZE), 0, 0x0000FFFF, /* Field 35 - Scaler vertical pitch */
0, (0x66<<SLOT_SIZE), 0, 0xFFFFFFFF, /* Field 36 - Scaler vertical coef block start */
0, (0x6C<<SLOT_SIZE), 16, 0xFFFF0000, /* Field 37 - Scaler initial horizontal position */
0, (0x6C<<SLOT_SIZE), 0, 0x00007FFF, /* Field 38 - Scaler horizontal pitch */
0, (0x6D<<SLOT_SIZE), 0, 0x0000FFFF, /* Field 39 - Scaler horizontal coef block start */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 40 - Scaler horizontal skip */
0, (0x6C<<SLOT_SIZE), 15, 0x00008000, /* Field 41 - Scaler horizontal decimation control */
0, (0x76<<SLOT_SIZE), 16, 0x07FF0000, /* Field 42 - Scaler scaled width */
0, (0x76<<SLOT_SIZE), 0, 0x000007FF, /* Field 43 - Scaler scaled height */
0, (0x65<<SLOT_SIZE), 16, 0xFFFF0000, /* Field 44 - Scaler Initial 1 */
0, (0x65<<SLOT_SIZE), 0, 0x0000FFFF, /* Field 45 - Scaler Initial 0 */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 46 - Scaler pixel doubling on /off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 47 - Scaler pixel halving on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 48 - Scaler line doubling on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 49 - Scaler line halving on / off */
0, (0x63<<SLOT_SIZE), 16, 0x07FF0000, /* Field 50 - Panning left hand edge clip value */
0, (0x63<<SLOT_SIZE), 0, 0x000007FF, /* Field 51 - Panning top edge lines to clip value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 52 - Panning external access on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 53 - Panning external panning control on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 54 - Panning external fields on / off */
},
/* Cursor */
{
0, (0x40<<SLOT_SIZE), 26, 0x0C000000, /* Field 0 - Alpha blend mode */
0, (0x4C<<SLOT_SIZE), 24, 0xFF000000, /* Field 1 - Alpha blend global value */
0, (0x48<<SLOT_SIZE), 30, 0x40000000, /* Field 2 - Blinking enabled */
0, (0x48<<SLOT_SIZE), 24, 0x3F000000, /* Field 3 - Blinking rate */
0, (0x40<<SLOT_SIZE), 29, 0x20000000, /* Field 4 - Colour key enabled */
0, (0x40<<SLOT_SIZE), 28, 0x10000000, /* Field 5 - Colour key against this plane */
0, (0x4C<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 6 - Colour key colour */
0, (0x50<<SLOT_SIZE), 0, 0x00FFFFFF, /* Field 7 - Colour key mask */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 8 - Colour space conversion enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 9 - Colour space conversion mode */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 10 - Gamma correction enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 11 - Graphics wrapping enabled */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 12 - Palette enabled */
0, (0x40<<SLOT_SIZE), 23, 0x03800000, /* Field 13 - Pixel colour format */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 14 - Offset luma samples flag */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 15 - Source frame X position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 16 - Source frame Y position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 17 - Source image height */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 18 - Slave Plane enabled */
4, (0x40<<SLOT_SIZE), 0, 0x007FFFFF, /* Field 19 - Source buffer base address */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 20 - Source buffer U address */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 21 - Source buffer V address */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 22 - Source buffer stride */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 23 - Source buffer UV strides halved */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 24 - Field interlaced */
0, (0x44<<SLOT_SIZE), 29, 0xE0000000, /* Field 25 - Draw order position */
0, (0x48<<SLOT_SIZE), 12, 0x00FFF000, /* Field 26 - Plane X position */
0, (0x48<<SLOT_SIZE), 0, 0x00000FFF, /* Field 27 - Plane Y position */
0, (0x44<<SLOT_SIZE), 16, 0x00070000, /* Field 28 - Source frame width */
0, (0x44<<SLOT_SIZE), 0, 0x00000007, /* Field 29 - Source frame height */
0, (0x40<<SLOT_SIZE), 31, 0x80000000, /* Field 30 - Plane visible */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 31 - Scaler horizontal bypass */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 32 - Scaler vertical bypass */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 33 - Scaling order */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 34 - Scaler vertical filter order */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 35 - Scaler vertical pitch */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 36 - Scaler vertical coef block start */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 37 - Scaler initial horizontal position */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 38 - Scaler horizontal pitch */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 39 - Scaler horizontal coef block start */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 40 - Scaler horizontal skip */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 41 - Scaler horizontal decimation control */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 42 - Scaler scaled width */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 43 - Scaler scaled height */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 44 - Scaler Initial 1 */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 45 - Scaler Initial 0 */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 46 - Scaler pixel doubling on /off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 47 - Scaler pixel halving on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 48 - Scaler line doubling on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 49 - Scaler line halving on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 50 - Panning left hand edge clip value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 51 - Panning top edge lines to clip value */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 52 - Panning external access on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 53 - Panning external panning control on / off */
DP_NO_REG, DP_NO_REG, DP_NO_REG, DP_NO_REG, /* Field 54 - Panning external fields on / off */
}
};
const DP_FieldTarget DP_asGlobalFieldTargets [ DP_NO_OF_GLOBAL_FIELDS ] =
{
/* Read Target Write Mask */
/* from address from */
/* bit bit */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -