1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
|
/*
* Copyright (C) 2012 Spreadtrum Communications Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _SHARK_GSP_TYPES_H_
#define _SHARK_GSP_TYPES_H_
#ifdef __cplusplus
extern "C"
{
#endif
/**---------------------------------------------------------------------------*
** Indepence *
**---------------------------------------------------------------------------*/
//#include "sci_types.h"
#include <linux/types.h>
/**---------------------------------------------------------------------------*
** Data Type Define *
**---------------------------------------------------------------------------*/
#ifndef LOCAL
#define LOCAL static
#endif
#ifndef PUBLIC
#define PUBLIC
#endif
typedef enum
{
GSP_ADDR_TYPE_INVALUE,
GSP_ADDR_TYPE_PHYSICAL,
GSP_ADDR_TYPE_IOVIRTUAL,
GSP_ADDR_TYPE_MAX,
}
GSP_ADDR_TYPE_E;// the address type of gsp can process
typedef enum
{
GSP_MODULE_LAYER0,
GSP_MODULE_LAYER1,
GSP_MODULE_DST,
GSP_MODULE_ID_MAX,
}
GSP_MODULE_ID_E;
typedef enum _GSP_IRQ_MODE_
{
GSP_IRQ_MODE_PULSE = 0x00,
GSP_IRQ_MODE_LEVEL,
GSP_IRQ_MODE_LEVEL_INVALID,
} GSP_IRQ_MODE_E;
typedef enum _GSP_IRQ_TYPE_
{
GSP_IRQ_TYPE_DISABLE = 0x00,
GSP_IRQ_TYPE_ENABLE,
GSP_IRQ_TYPE_INVALID,
} GSP_IRQ_TYPE_E;
typedef enum _GSP_RNT_TAG_
{
GSP_RTN_SUCESS = 0x00,
GSP_RTN_POINTER_INVALID,
GSP_RTN_PARAM_INVALID,
} GSP_RTN_E;
typedef enum _GSP_ROT_ANGLE_TAG_
{
GSP_ROT_ANGLE_0 = 0x00,
GSP_ROT_ANGLE_90,
GSP_ROT_ANGLE_180,
GSP_ROT_ANGLE_270,
GSP_ROT_ANGLE_0_M,
GSP_ROT_ANGLE_90_M,
GSP_ROT_ANGLE_180_M,
GSP_ROT_ANGLE_270_M,
GSP_ROT_ANGLE_MAX_NUM,
} GSP_ROT_ANGLE_E;
/*Original: B3B2B1B0*/
typedef enum _GSP_WORD_ENDIAN_TAG_
{
GSP_WORD_ENDN_0 = 0x00, /*B3B2B1B0*/
GSP_WORD_ENDN_1, /*B0B1B2B3*/
GSP_WORD_ENDN_2, /*B2B3B0B1*/
GSP_WORD_ENDN_3, /*B1B0B3B2*/
GSP_WORD_ENDN_MAX_NUM,
} GSP_WORD_ENDN_E;
/*Original: B7B6B5B4B3B2B1B0*/
typedef enum _GSP_LONG_WORD_ENDN_TAG_
{
GSP_LNG_WRD_ENDN_0, /*B7B6B5B4B3B2B1B0*/
GSP_LNG_WRD_ENDN_1,
GSP_LNG_WRD_ENDN_MAX, /*B3B2B1B0_B7B6B5B4*/
} GSP_LNG_WRD_ENDN_E;
typedef enum _GSP_RGB_SWAP_MOD_TAG_
{
GSP_RGB_SWP_RGB = 0x00,
GSP_RGB_SWP_RBG,
GSP_RGB_SWP_GRB,
GSP_RGB_SWP_GBR,
GSP_RGB_SWP_BGR,
GSP_RGB_SWP_BRG,
GSP_RGB_SWP_MAX,
} GSP_RGB_SWAP_MOD_E;
typedef enum _GSP_A_SWAP_MOD_TAG_
{
GSP_A_SWAP_ARGB,
GSP_A_SWAP_RGBA,
GSP_A_SWAP_MAX,
} GSP_A_SWAP_MOD_E;
typedef enum _GSP_DATA_FMT_TAG_
{
GSP_FMT_ARGB888 = 0x00,
GSP_FMT_RGB888,
GSP_FMT_CMPESS_RGB888,
GSP_FMT_ARGB565,
GSP_FMT_RGB565,
GSP_FMT_YUV420_2P,
GSP_FMT_YUV420_3P,
GSP_FMT_YUV400,
GSP_FMT_YUV422,
GSP_FMT_8BPP,
GSP_FMT_PMARGB,
GSP_FMT_MAX_NUM,
} GSP_DATA_FMT_E;
typedef enum _GSP_ERR_CODE_TAG_
{
/*GSP HW defined err code, start*/
GSP_NO_ERR = 0,
GSP_DES_SIZE_ERR = 1,
GSP_SCL_OUT_RNG_ERR = 2,
GSP_SCAL_NO_SAME_XY_COOR_ERR = 3,
GSP_DES_FRMT_ERR0 = 4,
GSP_LYER0_FRMT_ERR = 5,
GSP_LYER1_FRMT_ERR = 6,
GSP_DES_R5_SWAP_ERR = 7,
GSP_LYER0_R5_SWAP_ERR = 8,
GSP_LYER1_R5_SWAP_ERR = 9,
GSP_LYER0_CLP_SIZE_ZERO_ERR = 10,
GSP_LYER1_CLP_SIZE_ZERO_ERR = 11,
GSP_DES_PITCH_ZERO_ERR = 12,
GSP_LYER0_PITCH_ZERO_ERR = 13,
GSP_LYER1_PITCH_ZERO_ERR = 14,
GSP_LYER0_CLP_SITUATION_ERR = 15,
GSP_LYER1_CLP_SITUATION_ERR = 16,
GSP_LYER0_OUT_SITUATION_ERR = 17,
GSP_LYER1_OUT_SITUATION_ERR = 18,
GSP_CMD_NUM_ERR = 19,
GSP_ALL_MODULE_DISABLE_ERR = 20,
/*GSP HW defined err code, end*/
/*GSP kernel driver defined err code, start*/
GSP_KERNEL_FULL = 0x81,//kernel driver only supports GSP_MAX_USER clients
GSP_KERNEL_OPEN_INTR = 0x82,//wait open semaphore, interrupt by signal
GSP_KERNEL_CFG_INTR = 0x83,//wait hw semaphore, interrupt by signal
GSP_KERNEL_COPY_ERR = 0x84,//copy cfg params err
GSP_KERNEL_CALLER_NOT_OWN_HW = 0x85,// the caller thread don't get the GSP-HW semaphore, have no power to trigger,waite done.
GSP_KERNEL_WORKAROUND_ALLOC_ERR = 0x86,//alloc CMDQ descriptor memory err
GSP_KERNEL_WORKAROUND_WAITDONE_TIMEOUT = 0x87,
GSP_KERNEL_WORKAROUND_WAITDONE_INTR = 0x88,
GSP_KERNEL_GEN_OUT_RANG = 0x89,
GSP_KERNEL_GEN_ALLOC_ERR = 0x8A,
GSP_KERNEL_GEN_COMMON_ERR = 0x8B,
GSP_KERNEL_WAITDONE_TIMEOUT = 0x8C,
GSP_KERNEL_WAITDONE_INTR = 0x8D,
GSP_KERNEL_FORCE_EXIT = 0x8E,//not an err
GSP_KERNEL_CTL_CMD_ERR = 0x8F,//not an err
GSP_KERNEL_ADDR_MAP_ERR = 0x90,//iommu map err
GSP_KERNEL_CLOCK_ERR = 0x91,//gsp relative clock check failed
/*GSP kernel driver defined err code, end*/
/*GSP HAL defined err code, start*/
GSP_HAL_PARAM_ERR = 0xA0,// common hal interface parameter err
GSP_HAL_PARAM_CHECK_ERR = 0xA1,// GSP config parameter check err
GSP_HAL_VITUAL_ADDR_NOT_SUPPORT = 0xA2,// GSP can't process virtual address
GSP_HAL_ALLOC_ERR = 0xA3,
GSP_HAL_KERNEL_DRIVER_NOT_EXIST = 0xA4,// gsp driver nod not exist
/*GSP HAL defined err code, end*/
GSP_ERR_MAX_NUM,
} GSP_ERR_CODE_E;
typedef enum _GSP_LAYER_SRC_DATA_FMT_TAG_
{
GSP_SRC_FMT_ARGB888 = 0x00,
GSP_SRC_FMT_RGB888,
GSP_SRC_FMT_ARGB565,
GSP_SRC_FMT_RGB565,
GSP_SRC_FMT_YUV420_2P,
GSP_SRC_FMT_YUV420_3P,
GSP_SRC_FMT_YUV400_1P,
GSP_SRC_FMT_YUV422_2P,
GSP_SRC_FMT_8BPP,
GSP_SRC_FMT_MAX_NUM,
} GSP_LAYER_SRC_DATA_FMT_E;
typedef enum _GSP_LAYER_DST_DATA_FMT_TAG_
{
GSP_DST_FMT_ARGB888 = 0x00,
GSP_DST_FMT_RGB888,
GSP_DST_FMT_ARGB565,
GSP_DST_FMT_RGB565,
GSP_DST_FMT_YUV420_2P,
GSP_DST_FMT_YUV420_3P,
GSP_DST_FMT_YUV422_2P,
GSP_DST_FMT_MAX_NUM,
} GSP_LAYER_DST_DATA_FMT_E;
typedef struct _GSP_ENDIAN_INFO_TAG_
{
GSP_LNG_WRD_ENDN_E y_lng_wrd_endn;
GSP_WORD_ENDN_E y_word_endn;
GSP_LNG_WRD_ENDN_E uv_lng_wrd_endn;
GSP_WORD_ENDN_E uv_word_endn;
GSP_LNG_WRD_ENDN_E va_lng_wrd_endn;
GSP_WORD_ENDN_E va_word_endn;
GSP_RGB_SWAP_MOD_E rgb_swap_mode;
GSP_A_SWAP_MOD_E a_swap_mode;
}
GSP_ENDIAN_INFO_PARAM_T;
typedef struct _GSP_RGB_TAG_
{
uint8_t b_val;
uint8_t g_val;
uint8_t r_val;
uint8_t a_val;//if necessary
}
GSP_RGB_T;
typedef struct _GSP_POS_TAG_
{
uint16_t pos_pt_x;
uint16_t pos_pt_y;
}
GSP_POS_PT_T;
typedef struct _GSP_RECT_TAG
{
uint16_t st_x;
uint16_t st_y;
uint16_t rect_w;
uint16_t rect_h;
}
GSP_RECT_T;
typedef struct _GSP_DATA_ADDR_TAG
{
uint32_t addr_y;
uint32_t addr_uv;
uint32_t addr_v; //for 3 plane
}
GSP_DATA_ADDR_T;
typedef struct _GSP_MEM_INFO
{
uint8_t is_pa;
int32_t share_fd;
uint32_t uv_offset;
uint32_t v_offset;
}
GSP_MEM_INFO;
typedef struct _GSP_LAYER0_CONFIG_INFO_TAG_
{
GSP_DATA_ADDR_T src_addr;
uint32_t pitch;
GSP_RECT_T clip_rect;
GSP_RECT_T des_rect;
GSP_RGB_T grey;
GSP_RGB_T colorkey;
GSP_ENDIAN_INFO_PARAM_T endian_mode;
GSP_LAYER_SRC_DATA_FMT_E img_format;
GSP_ROT_ANGLE_E rot_angle;
GSP_MEM_INFO mem_info;
uint8_t row_tap_mode;
uint8_t col_tap_mode;
uint8_t alpha;
uint8_t colorkey_en;
uint8_t pallet_en;
uint8_t scaling_en;
uint8_t layer_en;
uint8_t pmargb_en;
uint8_t pmargb_mod;
}
GSP_LAYER0_CONFIG_INFO_T;
typedef struct _GSP_LAYER1_CONFIG_INFO_TAG_
{
GSP_DATA_ADDR_T src_addr;
uint32_t pitch;
GSP_RECT_T clip_rect;
GSP_POS_PT_T des_pos;
GSP_RGB_T grey;
GSP_RGB_T colorkey;
GSP_ENDIAN_INFO_PARAM_T endian_mode;
GSP_LAYER_SRC_DATA_FMT_E img_format;
GSP_ROT_ANGLE_E rot_angle;
GSP_MEM_INFO mem_info;
uint8_t row_tap_mode;
uint8_t col_tap_mode;
uint8_t alpha;
uint8_t colorkey_en;
uint8_t pallet_en;
uint8_t layer_en;
uint8_t pmargb_en;
uint8_t pmargb_mod;
}
GSP_LAYER1_CONFIG_INFO_T;
typedef struct _GSP_LAYER_DST_CONFIG_INFO_TAG_
{
GSP_DATA_ADDR_T src_addr;
uint32_t pitch;
GSP_ENDIAN_INFO_PARAM_T endian_mode;
GSP_LAYER_DST_DATA_FMT_E img_format;
GSP_MEM_INFO mem_info;
uint8_t compress_r8_en;
//uint8_t layer_en;
}
GSP_LAYER_DES_CONFIG_INFO_T;
typedef struct _GSP_MISC_CONFIG_INFO_TAG_
{
uint8_t dithering_en;
uint8_t gsp_gap;//gsp ddr gap(0~255)
uint8_t gsp_clock;//gsp clock(0:96M 1:153.6M 2:192M 3:256M)
uint8_t ahb_clock;//ahb clock(0:26M 1:76M 2:128M 3:192M)
uint8_t split_pages;//0:not split 1: split
uint8_t y2r_opt;// 0 : full YUV; 1:reduce YUV
}
GSP_MISC_CONFIG_INFO_T;
typedef struct _GSP_CONFIG_INFO_TAG_
{
GSP_MISC_CONFIG_INFO_T misc_info;
GSP_LAYER0_CONFIG_INFO_T layer0_info;
GSP_LAYER1_CONFIG_INFO_T layer1_info;
GSP_LAYER_DES_CONFIG_INFO_T layer_des_info;
}
GSP_CONFIG_INFO_T;
typedef struct
{
uint16_t w;
uint16_t h;
} GSP_RECT_SIZE_T;
typedef struct
{
uint16_t x;
uint16_t y;
} GSP_POSITION_T;
#define CAPABILITY_MAGIC_NUMBER 0xDEEFBEEF
typedef struct __GSP_Capability_
{
uint32_t magic;//used to indicate struct is initialized
/*version
00: only support phy addr, shark
01: add IOMMU,but IOMMU ctl reg access bug and YUV need copy--blackline bug, output need phy addr, dolphin V1
02: with IOMMU, IOMMU ctl reg access ok, but YUV need copy--blackline bug, output need phy addr, dolphin V2
03: with IOMMU, IOMMU ctl reg access ok, YUV don't need copy--no blackline bug, output support IOVA, dolphin V3
04: with IOMMU, IOMMU ctl reg access ok, but YUV need copy--blackline bug, output need phy addr, GSP use different DDR port with DISPC,8830gea 7731gea
05: with IOMMU, IOMMU ctl reg access ok, YUV don't need copy--no blackline bug, output support IOVA, GSP use different DDR port with DISPC,7731gea AB
06:GSP with contrast saturation adjust, pike
07:GPP, whale
*/
uint8_t version;
uint8_t scale_updown_sametime;// 0:not supported; 1:supported
uint8_t OSD_scaling;// 0:not supported; 1:supported
uint8_t dummy;
uint16_t scale_range_up;// 1 means 1/16, 64 means 4
uint16_t scale_range_down;// 1 means 1/16, 64 means 4
uint8_t buf_type_support;// GSP_ADDR_TYPE_PHYSICAL:phy addr; GSP_ADDR_TYPE_IOVIRTUAL:IOVA addr
uint8_t yuv_xywh_even;// 0: even and odd both supported; 1:only even supported
uint8_t video_need_copy;// 0:don't need; 1:need,
uint8_t max_video_size;// 0: 1920x1080 1:1280x720, used to alloc copy temp buffer
/* blend_video_with_OSD
to video case, GSP only support 1 layer, because GSP is not able to strech YCbCr to YUV,
if GSP blend OSD layer, OSD color will be strech too in DISPC,
ofcourse, we can use GSP to blend video with OSD, if we don't care about that.
to UI case, GSP support blending a few times, and each layer can scaling/rotation.
multi-YUV layers, supported by GSP, but output color must YUV, so DISPC can strech it to 0~255
*/
uint8_t blend_video_with_OSD;// 0: only support YUV layer blend; 1:support YUV layers blend with RGB layers
uint8_t max_layer_cnt; // max layer count of GSP blending supported, depend on GSP process time
uint8_t max_videoLayer_cnt; //max video layer count
uint8_t max_layer_cnt_with_video; //max total layer count , when has video
GSP_RECT_SIZE_T crop_min;
GSP_RECT_SIZE_T crop_max;
GSP_RECT_SIZE_T out_min;
GSP_RECT_SIZE_T out_max;
} GSP_CAPABILITY_T;
enum gsp_ioctl_id
{
GSP_SET_PARAM = 0,
GSP_TRIGGER_RUN,
GSP_WAIT_FINISH,
GSP_GET_CAPABILITY,
//GSP_GET_ADDR_TYPE,
};
#define GSP_IO_MAGIC 'G'
#define GSP_IO_SET_PARAM _IOW(GSP_IO_MAGIC, GSP_SET_PARAM,GSP_CONFIG_INFO_T)
//#define GSP_IO_TRIGGER_RUN _IO(GSP_IO_MAGIC, GSP_TRIGGER_RUN)
//#define GSP_IO_WAIT_FINISH _IO(GSP_IO_MAGIC, GSP_WAIT_FINISH)
#define GSP_IO_GET_CAPABILITY _IOW(GSP_IO_MAGIC, GSP_GET_CAPABILITY,GSP_CAPABILITY_T)
//#define GSP_IO_GET_ADDR_TYPE _IO(GSP_IO_MAGIC, GSP_GET_ADDR_TYPE)
#ifndef CEIL
#define CEIL(x,y) ({uint32_t __x = (x),__y = (y);(__x + __y -1)/__y;})
#endif
typedef struct _GSP_REG_T_TAG_
{
union _GSP_CFG_TAG //0x0000
{
struct _GSP_CFG_MAP
{
volatile uint32_t gsp_run :1;
volatile uint32_t gsp_busy :1;
volatile uint32_t error_flag :1;
volatile uint32_t error_code :5;
volatile uint32_t dither_en :1;
volatile uint32_t pmargb_mod0 :1;
volatile uint32_t pmargb_mod1 :1;
volatile uint32_t pmargb_en :1;
volatile uint32_t scale_en :1;
volatile uint32_t y2r_opt :1; // 0 : full YUV; 1:reduce YUV
volatile uint32_t no_split :1; // 0: split, split into 2 burst request, 1 : not split, one burst stride pages boarder
volatile uint32_t scale_status_clr :1;
volatile uint32_t l0_en :1;
volatile uint32_t l1_en :1;
volatile uint32_t reserved3 :6;
volatile uint32_t dist_rb :8;
}
mBits;
volatile uint32_t dwValue;
} gsp_cfg_u;
union _GSP_INT_CFG_TAG//0x0004
{
struct _GSP_INT_CFG_MAP
{
volatile uint32_t int_en :1;
volatile uint32_t reserved1 :7;
volatile uint32_t int_mod :1;
volatile uint32_t reserved2 :7;
volatile uint32_t int_clr :1;
volatile uint32_t reserved3 :15;
}
mBits;
volatile uint32_t dwValue;
} gsp_int_cfg_u;
union _GSP_CMD_ADDR_TAG//0x0008
{
struct _GSP_CMD_ADDR_MAP
{
volatile uint32_t cmd_base_addr :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_cmd_addr_u;
union _GSP_CMD_CFG_TAG//0x000c
{
struct _GSP_CMD_CFG_MAP
{
volatile uint32_t cmd_num :16;
volatile uint32_t cmd_en :1;
volatile uint32_t reserved1 :7;
volatile uint32_t cmd_endian_mod :3;
volatile uint32_t reserved2 :5;
}
mBits;
volatile uint32_t dwValue;
} gsp_cmd_cfg_u;
union _GSP_DES_DATA_CFG_TAG//0x0010
{
struct _GSP_DES_DATA_CFG_MAP
{
volatile uint32_t des_img_format :3;
volatile uint32_t reserved1 :1;
volatile uint32_t compress_r8 :1;
volatile uint32_t reserved2 :27;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_data_cfg_u;
union _GSP_DES_Y_ADDR_TAG//0x0014
{
struct _GSP_DES_Y_ADDR_MAP
{
volatile uint32_t des_y_base_addr :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_y_addr_u;
union _GSP_DES_UV_ADDR_TAG//0x0018
{
struct _GSP_DES_UV_ADDR_MAP
{
volatile uint32_t des_uv_base_addr :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_uv_addr_u;
union _GSP_DES_V_ADDR_TAG//0x001c
{
struct _GSP_DES_V_ADDR_MAP
{
volatile uint32_t des_v_base_addr :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_v_addr_u;
union _GSP_DES_PITCH_TAG//0x0020
{
struct _GSP_DES_PITCH_MAP
{
volatile uint32_t des_pitch :12;
volatile uint32_t reserved :20;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_pitch_u;
union _GSP_DES_DATA_ENDIAN_TAG//0x0024
{
struct _GSP_DES_DATA_ENDIAN_MAP
{
volatile uint32_t y_endian_mod :3;
volatile uint32_t uv_endian_mod :3;
volatile uint32_t v_endian_mod :3;
volatile uint32_t rgb_swap_mod :3;
volatile uint32_t a_swap_mod :1;
volatile uint32_t reserved_unpred :19;
}
mBits;
volatile uint32_t dwValue;
} gsp_des_data_endian_u;
union _GSP_DES_SIZE_TAG//0x0028
{
struct _GSP_DES_SIZE_MAP
{
volatile uint32_t des_size_x_l0 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t des_size_y_l0 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_des_size_u;
volatile uint32_t resevered0;
union _GSP_LAYER0_CFG_TAG//0x0030
{
struct _GSP_LAYER0_CFG_MAP
{
volatile uint32_t img_format_l0 :4;
volatile uint32_t reserved0 :12;
volatile uint32_t rot_mod_l0 :3;
volatile uint32_t ck_en_l0 :1;
volatile uint32_t pallet_en_l0 :1;
volatile uint32_t reserved1 :3;
volatile uint32_t row_tap_mod :2;
volatile uint32_t col_tap_mod :2;
volatile uint32_t reserved2 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_cfg_u;
union _GSP_LAYER0_Y_ADDR_TAG//0x0034
{
struct _GSP_LAYER0_Y_ADDR_MAP
{
volatile uint32_t y_base_addr_l0 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_y_addr_u;
union _GSP_LAYER0_UV_ADDR_TAG//0x0038
{
struct _GSP_LAYER0_UV_ADDR_MAP
{
volatile uint32_t uv_base_addr_l0 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_uv_addr_u;
union _GSP_LAYER0_VA_ADDR_TAG//0x003c
{
struct _GSP_LAYER0_VA_ADDR_MAP
{
volatile uint32_t va_base_addr_l0 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_va_addr_u;
union _GSP_LAYER0_PITCH_TAG//0x0040
{
struct _GSP_LAYER0_PITCH_MAP
{
volatile uint32_t pitch0 :12;
volatile uint32_t reserved :20;
}
mBits;
} gsp_layer0_pitch_u;
union _GSP_LAYER0_CLIP_START_TAG//0x0044
{
struct _GSP_LAYER0_CLIP_START_MAP
{
volatile uint32_t clip_start_x_l0 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t clip_start_y_l0 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_clip_start_u;
union _GSP_LAYER0_CLIP_SIZE_TAG//0x0048
{
struct _GSP_LAYER0_CLIP_SIZE_MAP
{
volatile uint32_t clip_size_x_l0 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t clip_size_y_l0 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_clip_size_u;
union _GSP_LAYER0_DES_START_TAG//0x004c
{
struct _GSP_LAYER0_DES_START_MAP
{
volatile uint32_t des_start_x_l0 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t des_start_y_l0 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_des_start_u;
union _GSP_LAYER0_GREY_RGB_TAG//0x0050
{
struct _GSP_LAYER0_GREY_RGB_MAP
{
volatile uint32_t layer0_grey_b :8;
volatile uint32_t layer0_grey_g :8;
volatile uint32_t layer0_grey_r :8;
volatile uint32_t reserved :8;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_grey_rgb_u;
union _GSP_LAYER0_ENDIAN_TAG//0x0054
{
struct _GSP_LAYER0_ENDIAN_MAP
{
volatile uint32_t y_endian_mod_l0 :3;
volatile uint32_t uv_endian_mod_l0 :3;
volatile uint32_t va_endian_mod_l0 :3;
volatile uint32_t rgb_swap_mod_l0 :3;
volatile uint32_t a_swap_mod_l0 :1;
volatile uint32_t reserved :19;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_endian_u;
union _GSP_LAYER0_ALPHA_TAG//0x0058
{
struct _GSP_LAYER0_ALPHA_MAP
{
volatile uint32_t alpha_l0 :8;
volatile uint32_t reserved :24;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_alpha_u;
union _GSP_LAYER0_CK_TAG//0x005c
{
struct _GSP_LAYER0_CK_MAP
{
volatile uint32_t ck_b_l0 :8;
volatile uint32_t ck_g_l0 :8;
volatile uint32_t ck_r_l0 :8;
volatile uint32_t reserved :8;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer0_ck_u;
union _GSP_LAYER1_CFG_TAG//0x0060
{
struct _GSP_LAYER1_CFG_MAP
{
volatile uint32_t img_format_l1 :4;
volatile uint32_t reserved0 :12;
volatile uint32_t rot_mod_l1 :3;
volatile uint32_t ck_en_l1 :1;
volatile uint32_t pallet_en_l1 :1;
volatile uint32_t reserved1 :11;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_cfg_u;
union _GSP_LAYER1_Y_ADDR_TAG//0x0064
{
struct _GSP_LAYER1_Y_ADDR_MAP
{
volatile uint32_t y_base_addr_l1 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_y_addr_u;
union _GSP_LAYER1_UV_ADDR_TAG//0x0068
{
struct _GSP_LAYER1_UV_ADDR_MAP
{
volatile uint32_t uv_base_addr_l1 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_uv_addr_u;
union _GSP_LAYER1_VA_ADDR_TAG//0x006c
{
struct _GSP_LAYER1_VA_ADDR_MAP
{
volatile uint32_t va_base_addr_l1 :32;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_va_addr_u;
union _GSP_LAYER1_PITCH_TAG//0x0070
{
struct _GSP_LAYER1_PITCH_MAP
{
volatile uint32_t pitch1 :12;
volatile uint32_t reserved_unpred :20;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_pitch_u;
union _GSP_LAYER1_CLIP_START_TAG//0x0074
{
struct _GSP_LAYER1_CLIP_START_MAP
{
volatile uint32_t clip_start_x_l1 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t clip_start_y_l1 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_clip_start_u;
union _GSP_LAYER1_CLIP_SIZE_TAG//0x0078
{
struct _GSP_LAYER1_CLIP_SIZE_MAP
{
volatile uint32_t clip_size_x_l1 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t clip_size_y_l1 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_clip_size_u;
union _GSP_LAYER1_DES_START_TAG//0x007c
{
struct _GSP_LAYER1_DES_START_MAP
{
volatile uint32_t des_start_x_l1 :12;
volatile uint32_t reserved0 :4;
volatile uint32_t des_start_y_l1 :12;
volatile uint32_t reserved1 :4;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_des_start_u;
union _GSP_LAYER1_GREY_RGB_TAG//0x0080
{
struct _GSP_LAYER1_GREY_RGB_MAP
{
volatile uint32_t grey_b_l1 :8;
volatile uint32_t grey_g_l1 :8;
volatile uint32_t grey_r_l1 :8;
volatile uint32_t reserved :8;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_grey_rgb_u;
union _GSP_LAYER1_ENDIAN_TAG//0x0084
{
struct _GSP_LAYER1_ENDIAN_MAP
{
volatile uint32_t y_endian_mod_l1 :3;
volatile uint32_t uv_endian_mod_l1 :3;
volatile uint32_t va_endian_mod_l1 :3;
volatile uint32_t rgb_swap_mod_l1 :3;
volatile uint32_t a_swap_mod_l1 :1;
volatile uint32_t reserved :19;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_endian_u;
union _GSP_LAYER1_ALPHA_TAG//0x0088
{
struct _GSP_LAYER1_ALPHA_MAP
{
volatile uint32_t alpha_l1 :8;
volatile uint32_t reserved :24;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_alpha_u;
union _GSP_LAYER1_CK_TAG//0x008c
{
struct _GSP_LAYER1_CK_MAP
{
volatile uint32_t ck_b_l1 :8;
volatile uint32_t ck_g_l1 :8;
volatile uint32_t ck_r_l1 :8;
volatile uint32_t reserved :8;
}
mBits;
volatile uint32_t dwValue;
} gsp_layer1_ck_u;
}
GSP_REG_T;
#ifdef __cplusplus
}
#endif
#endif
//the end of Shark_gsp_types.h
|