Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] w100fb: Add acceleration support to ATI Imageon

Add acceleration support in w100fb.c (i.e. ATI Imageons) for the copyarea and
fillrect operations.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Alberto Mardegan and committed by
Linus Torvalds
9b0e1c5d 1a37d5f5

+611 -299
+158 -4
drivers/video/w100fb.c
··· 4 4 * Frame Buffer Device for ATI Imageon w100 (Wallaby) 5 5 * 6 6 * Copyright (C) 2002, ATI Corp. 7 - * Copyright (C) 2004-2005 Richard Purdie 7 + * Copyright (C) 2004-2006 Richard Purdie 8 8 * Copyright (c) 2005 Ian Molton 9 + * Copyright (c) 2006 Alberto Mardegan 9 10 * 10 11 * Rewritten for 2.6 by Richard Purdie <rpurdie@rpsys.net> 11 12 * ··· 14 13 * and Richard Purdie <rpurdie@rpsys.net> 15 14 * 16 15 * w32xx support by Ian Molton 16 + * 17 + * Hardware acceleration support by Alberto Mardegan 18 + * <mardy@users.sourceforge.net> 17 19 * 18 20 * This program is free software; you can redistribute it and/or modify 19 21 * it under the terms of the GNU General Public License version 2 as ··· 51 47 static void w100_update_enable(void); 52 48 static void w100_update_disable(void); 53 49 static void calc_hsync(struct w100fb_par *par); 50 + static void w100_init_graphic_engine(struct w100fb_par *par); 54 51 struct w100_pll_info *w100_get_xtal_table(unsigned int freq); 55 52 56 53 /* Pseudo palette size */ ··· 253 248 } 254 249 255 250 251 + static void w100_fifo_wait(int entries) 252 + { 253 + union rbbm_status_u status; 254 + int i; 255 + 256 + for (i = 0; i < 2000000; i++) { 257 + status.val = readl(remapped_regs + mmRBBM_STATUS); 258 + if (status.f.cmdfifo_avail >= entries) 259 + return; 260 + udelay(1); 261 + } 262 + printk(KERN_ERR "w100fb: FIFO Timeout!\n"); 263 + } 264 + 265 + 266 + static int w100fb_sync(struct fb_info *info) 267 + { 268 + union rbbm_status_u status; 269 + int i; 270 + 271 + for (i = 0; i < 2000000; i++) { 272 + status.val = readl(remapped_regs + mmRBBM_STATUS); 273 + if (!status.f.gui_active) 274 + return 0; 275 + udelay(1); 276 + } 277 + printk(KERN_ERR "w100fb: Graphic engine timeout!\n"); 278 + return -EBUSY; 279 + } 280 + 281 + 282 + static void w100_init_graphic_engine(struct w100fb_par *par) 283 + { 284 + union dp_gui_master_cntl_u gmc; 285 + union dp_mix_u dp_mix; 286 + union dp_datatype_u dp_datatype; 287 + union dp_cntl_u dp_cntl; 288 + 289 + w100_fifo_wait(4); 290 + writel(W100_FB_BASE, remapped_regs + mmDST_OFFSET); 291 + writel(par->xres, remapped_regs + mmDST_PITCH); 292 + writel(W100_FB_BASE, remapped_regs + mmSRC_OFFSET); 293 + writel(par->xres, remapped_regs + mmSRC_PITCH); 294 + 295 + w100_fifo_wait(3); 296 + writel(0, remapped_regs + mmSC_TOP_LEFT); 297 + writel((par->yres << 16) | par->xres, remapped_regs + mmSC_BOTTOM_RIGHT); 298 + writel(0x1fff1fff, remapped_regs + mmSRC_SC_BOTTOM_RIGHT); 299 + 300 + w100_fifo_wait(4); 301 + dp_cntl.val = 0; 302 + dp_cntl.f.dst_x_dir = 1; 303 + dp_cntl.f.dst_y_dir = 1; 304 + dp_cntl.f.src_x_dir = 1; 305 + dp_cntl.f.src_y_dir = 1; 306 + dp_cntl.f.dst_major_x = 1; 307 + dp_cntl.f.src_major_x = 1; 308 + writel(dp_cntl.val, remapped_regs + mmDP_CNTL); 309 + 310 + gmc.val = 0; 311 + gmc.f.gmc_src_pitch_offset_cntl = 1; 312 + gmc.f.gmc_dst_pitch_offset_cntl = 1; 313 + gmc.f.gmc_src_clipping = 1; 314 + gmc.f.gmc_dst_clipping = 1; 315 + gmc.f.gmc_brush_datatype = GMC_BRUSH_NONE; 316 + gmc.f.gmc_dst_datatype = 3; /* from DstType_16Bpp_444 */ 317 + gmc.f.gmc_src_datatype = SRC_DATATYPE_EQU_DST; 318 + gmc.f.gmc_byte_pix_order = 1; 319 + gmc.f.gmc_default_sel = 0; 320 + gmc.f.gmc_rop3 = ROP3_SRCCOPY; 321 + gmc.f.gmc_dp_src_source = DP_SRC_MEM_RECTANGULAR; 322 + gmc.f.gmc_clr_cmp_fcn_dis = 1; 323 + gmc.f.gmc_wr_msk_dis = 1; 324 + gmc.f.gmc_dp_op = DP_OP_ROP; 325 + writel(gmc.val, remapped_regs + mmDP_GUI_MASTER_CNTL); 326 + 327 + dp_datatype.val = dp_mix.val = 0; 328 + dp_datatype.f.dp_dst_datatype = gmc.f.gmc_dst_datatype; 329 + dp_datatype.f.dp_brush_datatype = gmc.f.gmc_brush_datatype; 330 + dp_datatype.f.dp_src2_type = 0; 331 + dp_datatype.f.dp_src2_datatype = gmc.f.gmc_src_datatype; 332 + dp_datatype.f.dp_src_datatype = gmc.f.gmc_src_datatype; 333 + dp_datatype.f.dp_byte_pix_order = gmc.f.gmc_byte_pix_order; 334 + writel(dp_datatype.val, remapped_regs + mmDP_DATATYPE); 335 + 336 + dp_mix.f.dp_src_source = gmc.f.gmc_dp_src_source; 337 + dp_mix.f.dp_src2_source = 1; 338 + dp_mix.f.dp_rop3 = gmc.f.gmc_rop3; 339 + dp_mix.f.dp_op = gmc.f.gmc_dp_op; 340 + writel(dp_mix.val, remapped_regs + mmDP_MIX); 341 + } 342 + 343 + 344 + static void w100fb_fillrect(struct fb_info *info, 345 + const struct fb_fillrect *rect) 346 + { 347 + union dp_gui_master_cntl_u gmc; 348 + 349 + if (info->state != FBINFO_STATE_RUNNING) 350 + return; 351 + if (info->flags & FBINFO_HWACCEL_DISABLED) { 352 + cfb_fillrect(info, rect); 353 + return; 354 + } 355 + 356 + gmc.val = readl(remapped_regs + mmDP_GUI_MASTER_CNTL); 357 + gmc.f.gmc_rop3 = ROP3_PATCOPY; 358 + gmc.f.gmc_brush_datatype = GMC_BRUSH_SOLID_COLOR; 359 + w100_fifo_wait(2); 360 + writel(gmc.val, remapped_regs + mmDP_GUI_MASTER_CNTL); 361 + writel(rect->color, remapped_regs + mmDP_BRUSH_FRGD_CLR); 362 + 363 + w100_fifo_wait(2); 364 + writel((rect->dy << 16) | (rect->dx & 0xffff), remapped_regs + mmDST_Y_X); 365 + writel((rect->width << 16) | (rect->height & 0xffff), 366 + remapped_regs + mmDST_WIDTH_HEIGHT); 367 + } 368 + 369 + 370 + static void w100fb_copyarea(struct fb_info *info, 371 + const struct fb_copyarea *area) 372 + { 373 + u32 dx = area->dx, dy = area->dy, sx = area->sx, sy = area->sy; 374 + u32 h = area->height, w = area->width; 375 + union dp_gui_master_cntl_u gmc; 376 + 377 + if (info->state != FBINFO_STATE_RUNNING) 378 + return; 379 + if (info->flags & FBINFO_HWACCEL_DISABLED) { 380 + cfb_copyarea(info, area); 381 + return; 382 + } 383 + 384 + gmc.val = readl(remapped_regs + mmDP_GUI_MASTER_CNTL); 385 + gmc.f.gmc_rop3 = ROP3_SRCCOPY; 386 + gmc.f.gmc_brush_datatype = GMC_BRUSH_NONE; 387 + w100_fifo_wait(1); 388 + writel(gmc.val, remapped_regs + mmDP_GUI_MASTER_CNTL); 389 + 390 + w100_fifo_wait(3); 391 + writel((sy << 16) | (sx & 0xffff), remapped_regs + mmSRC_Y_X); 392 + writel((dy << 16) | (dx & 0xffff), remapped_regs + mmDST_Y_X); 393 + writel((w << 16) | (h & 0xffff), remapped_regs + mmDST_WIDTH_HEIGHT); 394 + } 395 + 396 + 256 397 /* 257 398 * Change the resolution by calling the appropriate hardware functions 258 399 */ ··· 416 265 w100_init_lcd(par); 417 266 w100_set_dispregs(par); 418 267 w100_update_enable(); 268 + w100_init_graphic_engine(par); 419 269 420 270 calc_hsync(par); 421 271 ··· 546 394 .fb_set_par = w100fb_set_par, 547 395 .fb_setcolreg = w100fb_setcolreg, 548 396 .fb_blank = w100fb_blank, 549 - .fb_fillrect = cfb_fillrect, 550 - .fb_copyarea = cfb_copyarea, 397 + .fb_fillrect = w100fb_fillrect, 398 + .fb_copyarea = w100fb_copyarea, 551 399 .fb_imageblit = cfb_imageblit, 400 + .fb_sync = w100fb_sync, 552 401 }; 553 402 554 403 #ifdef CONFIG_PM ··· 696 543 } 697 544 698 545 info->fbops = &w100fb_ops; 699 - info->flags = FBINFO_DEFAULT; 546 + info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA | 547 + FBINFO_HWACCEL_FILLRECT; 700 548 info->node = -1; 701 549 info->screen_base = remapped_fbuf + (W100_FB_BASE-MEM_WINDOW_BASE); 702 550 info->screen_size = REMAPPED_FB_LEN;
+453 -295
drivers/video/w100fb.h
··· 122 122 /* Block DISPLAY End: */ 123 123 124 124 /* Block GFX Start: */ 125 + #define mmDST_OFFSET 0x1004 126 + #define mmDST_PITCH 0x1008 127 + #define mmDST_Y_X 0x1038 128 + #define mmDST_WIDTH_HEIGHT 0x1198 129 + #define mmDP_GUI_MASTER_CNTL 0x106C 125 130 #define mmBRUSH_OFFSET 0x108C 126 131 #define mmBRUSH_Y_X 0x1074 132 + #define mmDP_BRUSH_FRGD_CLR 0x107C 133 + #define mmSRC_OFFSET 0x11AC 134 + #define mmSRC_PITCH 0x11B0 135 + #define mmSRC_Y_X 0x1034 127 136 #define mmDEFAULT_PITCH_OFFSET 0x10A0 128 137 #define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8 129 138 #define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC 139 + #define mmSC_TOP_LEFT 0x11BC 140 + #define mmSC_BOTTOM_RIGHT 0x11C0 141 + #define mmSRC_SC_BOTTOM_RIGHT 0x11C4 130 142 #define mmGLOBAL_ALPHA 0x1210 131 143 #define mmFILTER_COEF 0x1214 132 144 #define mmMVC_CNTL_START 0x11E0 133 145 #define mmE2_ARITHMETIC_CNTL 0x1220 146 + #define mmDP_CNTL 0x11C8 147 + #define mmDP_CNTL_DST_DIR 0x11CC 148 + #define mmDP_DATATYPE 0x12C4 149 + #define mmDP_MIX 0x12C8 150 + #define mmDP_WRITE_MSK 0x12CC 134 151 #define mmENG_CNTL 0x13E8 135 152 #define mmENG_PERF_CNT 0x13F0 136 153 /* Block GFX End: */ ··· 196 179 /* Block RBBM Start: */ 197 180 #define mmWAIT_UNTIL 0x1400 198 181 #define mmISYNC_CNTL 0x1404 182 + #define mmRBBM_STATUS 0x0140 199 183 #define mmRBBM_CNTL 0x0144 200 184 #define mmNQWAIT_UNTIL 0x0150 201 185 /* Block RBBM End: */ ··· 243 225 /* Register structure definitions */ 244 226 245 227 struct wrap_top_dir_t { 246 - unsigned long top_addr : 23; 247 - unsigned long : 9; 228 + u32 top_addr : 23; 229 + u32 : 9; 248 230 } __attribute__((packed)); 249 231 250 232 union wrap_top_dir_u { 251 - unsigned long val : 32; 233 + u32 val : 32; 252 234 struct wrap_top_dir_t f; 253 235 } __attribute__((packed)); 254 236 255 237 struct wrap_start_dir_t { 256 - unsigned long start_addr : 23; 257 - unsigned long : 9; 238 + u32 start_addr : 23; 239 + u32 : 9; 258 240 } __attribute__((packed)); 259 241 260 242 union wrap_start_dir_u { 261 - unsigned long val : 32; 243 + u32 val : 32; 262 244 struct wrap_start_dir_t f; 263 245 } __attribute__((packed)); 264 246 265 247 struct cif_cntl_t { 266 - unsigned long swap_reg : 2; 267 - unsigned long swap_fbuf_1 : 2; 268 - unsigned long swap_fbuf_2 : 2; 269 - unsigned long swap_fbuf_3 : 2; 270 - unsigned long pmi_int_disable : 1; 271 - unsigned long pmi_schmen_disable : 1; 272 - unsigned long intb_oe : 1; 273 - unsigned long en_wait_to_compensate_dq_prop_dly : 1; 274 - unsigned long compensate_wait_rd_size : 2; 275 - unsigned long wait_asserted_timeout_val : 2; 276 - unsigned long wait_masked_val : 2; 277 - unsigned long en_wait_timeout : 1; 278 - unsigned long en_one_clk_setup_before_wait : 1; 279 - unsigned long interrupt_active_high : 1; 280 - unsigned long en_overwrite_straps : 1; 281 - unsigned long strap_wait_active_hi : 1; 282 - unsigned long lat_busy_count : 2; 283 - unsigned long lat_rd_pm4_sclk_busy : 1; 284 - unsigned long dis_system_bits : 1; 285 - unsigned long dis_mr : 1; 286 - unsigned long cif_spare_1 : 4; 248 + u32 swap_reg : 2; 249 + u32 swap_fbuf_1 : 2; 250 + u32 swap_fbuf_2 : 2; 251 + u32 swap_fbuf_3 : 2; 252 + u32 pmi_int_disable : 1; 253 + u32 pmi_schmen_disable : 1; 254 + u32 intb_oe : 1; 255 + u32 en_wait_to_compensate_dq_prop_dly : 1; 256 + u32 compensate_wait_rd_size : 2; 257 + u32 wait_asserted_timeout_val : 2; 258 + u32 wait_masked_val : 2; 259 + u32 en_wait_timeout : 1; 260 + u32 en_one_clk_setup_before_wait : 1; 261 + u32 interrupt_active_high : 1; 262 + u32 en_overwrite_straps : 1; 263 + u32 strap_wait_active_hi : 1; 264 + u32 lat_busy_count : 2; 265 + u32 lat_rd_pm4_sclk_busy : 1; 266 + u32 dis_system_bits : 1; 267 + u32 dis_mr : 1; 268 + u32 cif_spare_1 : 4; 287 269 } __attribute__((packed)); 288 270 289 271 union cif_cntl_u { 290 - unsigned long val : 32; 272 + u32 val : 32; 291 273 struct cif_cntl_t f; 292 274 } __attribute__((packed)); 293 275 294 276 struct cfgreg_base_t { 295 - unsigned long cfgreg_base : 24; 296 - unsigned long : 8; 277 + u32 cfgreg_base : 24; 278 + u32 : 8; 297 279 } __attribute__((packed)); 298 280 299 281 union cfgreg_base_u { 300 - unsigned long val : 32; 282 + u32 val : 32; 301 283 struct cfgreg_base_t f; 302 284 } __attribute__((packed)); 303 285 304 286 struct cif_io_t { 305 - unsigned long dq_srp : 1; 306 - unsigned long dq_srn : 1; 307 - unsigned long dq_sp : 4; 308 - unsigned long dq_sn : 4; 309 - unsigned long waitb_srp : 1; 310 - unsigned long waitb_srn : 1; 311 - unsigned long waitb_sp : 4; 312 - unsigned long waitb_sn : 4; 313 - unsigned long intb_srp : 1; 314 - unsigned long intb_srn : 1; 315 - unsigned long intb_sp : 4; 316 - unsigned long intb_sn : 4; 317 - unsigned long : 2; 287 + u32 dq_srp : 1; 288 + u32 dq_srn : 1; 289 + u32 dq_sp : 4; 290 + u32 dq_sn : 4; 291 + u32 waitb_srp : 1; 292 + u32 waitb_srn : 1; 293 + u32 waitb_sp : 4; 294 + u32 waitb_sn : 4; 295 + u32 intb_srp : 1; 296 + u32 intb_srn : 1; 297 + u32 intb_sp : 4; 298 + u32 intb_sn : 4; 299 + u32 : 2; 318 300 } __attribute__((packed)); 319 301 320 302 union cif_io_u { 321 - unsigned long val : 32; 303 + u32 val : 32; 322 304 struct cif_io_t f; 323 305 } __attribute__((packed)); 324 306 325 307 struct cif_read_dbg_t { 326 - unsigned long unpacker_pre_fetch_trig_gen : 2; 327 - unsigned long dly_second_rd_fetch_trig : 1; 328 - unsigned long rst_rd_burst_id : 1; 329 - unsigned long dis_rd_burst_id : 1; 330 - unsigned long en_block_rd_when_packer_is_not_emp : 1; 331 - unsigned long dis_pre_fetch_cntl_sm : 1; 332 - unsigned long rbbm_chrncy_dis : 1; 333 - unsigned long rbbm_rd_after_wr_lat : 2; 334 - unsigned long dis_be_during_rd : 1; 335 - unsigned long one_clk_invalidate_pulse : 1; 336 - unsigned long dis_chnl_priority : 1; 337 - unsigned long rst_read_path_a_pls : 1; 338 - unsigned long rst_read_path_b_pls : 1; 339 - unsigned long dis_reg_rd_fetch_trig : 1; 340 - unsigned long dis_rd_fetch_trig_from_ind_addr : 1; 341 - unsigned long dis_rd_same_byte_to_trig_fetch : 1; 342 - unsigned long dis_dir_wrap : 1; 343 - unsigned long dis_ring_buf_to_force_dec : 1; 344 - unsigned long dis_addr_comp_in_16bit : 1; 345 - unsigned long clr_w : 1; 346 - unsigned long err_rd_tag_is_3 : 1; 347 - unsigned long err_load_when_ful_a : 1; 348 - unsigned long err_load_when_ful_b : 1; 349 - unsigned long : 7; 308 + u32 unpacker_pre_fetch_trig_gen : 2; 309 + u32 dly_second_rd_fetch_trig : 1; 310 + u32 rst_rd_burst_id : 1; 311 + u32 dis_rd_burst_id : 1; 312 + u32 en_block_rd_when_packer_is_not_emp : 1; 313 + u32 dis_pre_fetch_cntl_sm : 1; 314 + u32 rbbm_chrncy_dis : 1; 315 + u32 rbbm_rd_after_wr_lat : 2; 316 + u32 dis_be_during_rd : 1; 317 + u32 one_clk_invalidate_pulse : 1; 318 + u32 dis_chnl_priority : 1; 319 + u32 rst_read_path_a_pls : 1; 320 + u32 rst_read_path_b_pls : 1; 321 + u32 dis_reg_rd_fetch_trig : 1; 322 + u32 dis_rd_fetch_trig_from_ind_addr : 1; 323 + u32 dis_rd_same_byte_to_trig_fetch : 1; 324 + u32 dis_dir_wrap : 1; 325 + u32 dis_ring_buf_to_force_dec : 1; 326 + u32 dis_addr_comp_in_16bit : 1; 327 + u32 clr_w : 1; 328 + u32 err_rd_tag_is_3 : 1; 329 + u32 err_load_when_ful_a : 1; 330 + u32 err_load_when_ful_b : 1; 331 + u32 : 7; 350 332 } __attribute__((packed)); 351 333 352 334 union cif_read_dbg_u { 353 - unsigned long val : 32; 335 + u32 val : 32; 354 336 struct cif_read_dbg_t f; 355 337 } __attribute__((packed)); 356 338 357 339 struct cif_write_dbg_t { 358 - unsigned long packer_timeout_count : 2; 359 - unsigned long en_upper_load_cond : 1; 360 - unsigned long en_chnl_change_cond : 1; 361 - unsigned long dis_addr_comp_cond : 1; 362 - unsigned long dis_load_same_byte_addr_cond : 1; 363 - unsigned long dis_timeout_cond : 1; 364 - unsigned long dis_timeout_during_rbbm : 1; 365 - unsigned long dis_packer_ful_during_rbbm_timeout : 1; 366 - unsigned long en_dword_split_to_rbbm : 1; 367 - unsigned long en_dummy_val : 1; 368 - unsigned long dummy_val_sel : 1; 369 - unsigned long mask_pm4_wrptr_dec : 1; 370 - unsigned long dis_mc_clean_cond : 1; 371 - unsigned long err_two_reqi_during_ful : 1; 372 - unsigned long err_reqi_during_idle_clk : 1; 373 - unsigned long err_global : 1; 374 - unsigned long en_wr_buf_dbg_load : 1; 375 - unsigned long en_wr_buf_dbg_path : 1; 376 - unsigned long sel_wr_buf_byte : 3; 377 - unsigned long dis_rd_flush_wr : 1; 378 - unsigned long dis_packer_ful_cond : 1; 379 - unsigned long dis_invalidate_by_ops_chnl : 1; 380 - unsigned long en_halt_when_reqi_err : 1; 381 - unsigned long cif_spare_2 : 5; 382 - unsigned long : 1; 340 + u32 packer_timeout_count : 2; 341 + u32 en_upper_load_cond : 1; 342 + u32 en_chnl_change_cond : 1; 343 + u32 dis_addr_comp_cond : 1; 344 + u32 dis_load_same_byte_addr_cond : 1; 345 + u32 dis_timeout_cond : 1; 346 + u32 dis_timeout_during_rbbm : 1; 347 + u32 dis_packer_ful_during_rbbm_timeout : 1; 348 + u32 en_dword_split_to_rbbm : 1; 349 + u32 en_dummy_val : 1; 350 + u32 dummy_val_sel : 1; 351 + u32 mask_pm4_wrptr_dec : 1; 352 + u32 dis_mc_clean_cond : 1; 353 + u32 err_two_reqi_during_ful : 1; 354 + u32 err_reqi_during_idle_clk : 1; 355 + u32 err_global : 1; 356 + u32 en_wr_buf_dbg_load : 1; 357 + u32 en_wr_buf_dbg_path : 1; 358 + u32 sel_wr_buf_byte : 3; 359 + u32 dis_rd_flush_wr : 1; 360 + u32 dis_packer_ful_cond : 1; 361 + u32 dis_invalidate_by_ops_chnl : 1; 362 + u32 en_halt_when_reqi_err : 1; 363 + u32 cif_spare_2 : 5; 364 + u32 : 1; 383 365 } __attribute__((packed)); 384 366 385 367 union cif_write_dbg_u { 386 - unsigned long val : 32; 368 + u32 val : 32; 387 369 struct cif_write_dbg_t f; 388 370 } __attribute__((packed)); 389 371 ··· 421 403 } __attribute__((packed)); 422 404 423 405 struct crtc_total_t { 424 - unsigned long crtc_h_total : 10; 425 - unsigned long : 6; 426 - unsigned long crtc_v_total : 10; 427 - unsigned long : 6; 406 + u32 crtc_h_total : 10; 407 + u32 : 6; 408 + u32 crtc_v_total : 10; 409 + u32 : 6; 428 410 } __attribute__((packed)); 429 411 430 412 union crtc_total_u { 431 - unsigned long val : 32; 413 + u32 val : 32; 432 414 struct crtc_total_t f; 433 415 } __attribute__((packed)); 434 416 435 417 struct crtc_ss_t { 436 - unsigned long ss_start : 10; 437 - unsigned long : 6; 438 - unsigned long ss_end : 10; 439 - unsigned long : 2; 440 - unsigned long ss_align : 1; 441 - unsigned long ss_pol : 1; 442 - unsigned long ss_run_mode : 1; 443 - unsigned long ss_en : 1; 418 + u32 ss_start : 10; 419 + u32 : 6; 420 + u32 ss_end : 10; 421 + u32 : 2; 422 + u32 ss_align : 1; 423 + u32 ss_pol : 1; 424 + u32 ss_run_mode : 1; 425 + u32 ss_en : 1; 444 426 } __attribute__((packed)); 445 427 446 428 union crtc_ss_u { 447 - unsigned long val : 32; 429 + u32 val : 32; 448 430 struct crtc_ss_t f; 449 431 } __attribute__((packed)); 450 432 451 433 struct active_h_disp_t { 452 - unsigned long active_h_start : 10; 453 - unsigned long : 6; 454 - unsigned long active_h_end : 10; 455 - unsigned long : 6; 434 + u32 active_h_start : 10; 435 + u32 : 6; 436 + u32 active_h_end : 10; 437 + u32 : 6; 456 438 } __attribute__((packed)); 457 439 458 440 union active_h_disp_u { 459 - unsigned long val : 32; 441 + u32 val : 32; 460 442 struct active_h_disp_t f; 461 443 } __attribute__((packed)); 462 444 463 445 struct active_v_disp_t { 464 - unsigned long active_v_start : 10; 465 - unsigned long : 6; 466 - unsigned long active_v_end : 10; 467 - unsigned long : 6; 446 + u32 active_v_start : 10; 447 + u32 : 6; 448 + u32 active_v_end : 10; 449 + u32 : 6; 468 450 } __attribute__((packed)); 469 451 470 452 union active_v_disp_u { 471 - unsigned long val : 32; 453 + u32 val : 32; 472 454 struct active_v_disp_t f; 473 455 } __attribute__((packed)); 474 456 475 457 struct graphic_h_disp_t { 476 - unsigned long graphic_h_start : 10; 477 - unsigned long : 6; 478 - unsigned long graphic_h_end : 10; 479 - unsigned long : 6; 458 + u32 graphic_h_start : 10; 459 + u32 : 6; 460 + u32 graphic_h_end : 10; 461 + u32 : 6; 480 462 } __attribute__((packed)); 481 463 482 464 union graphic_h_disp_u { 483 - unsigned long val : 32; 465 + u32 val : 32; 484 466 struct graphic_h_disp_t f; 485 467 } __attribute__((packed)); 486 468 487 469 struct graphic_v_disp_t { 488 - unsigned long graphic_v_start : 10; 489 - unsigned long : 6; 490 - unsigned long graphic_v_end : 10; 491 - unsigned long : 6; 470 + u32 graphic_v_start : 10; 471 + u32 : 6; 472 + u32 graphic_v_end : 10; 473 + u32 : 6; 492 474 } __attribute__((packed)); 493 475 494 476 union graphic_v_disp_u{ 495 - unsigned long val : 32; 477 + u32 val : 32; 496 478 struct graphic_v_disp_t f; 497 479 } __attribute__((packed)); 498 480 499 481 struct graphic_ctrl_t_w100 { 500 - unsigned long color_depth : 3; 501 - unsigned long portrait_mode : 2; 502 - unsigned long low_power_on : 1; 503 - unsigned long req_freq : 4; 504 - unsigned long en_crtc : 1; 505 - unsigned long en_graphic_req : 1; 506 - unsigned long en_graphic_crtc : 1; 507 - unsigned long total_req_graphic : 9; 508 - unsigned long lcd_pclk_on : 1; 509 - unsigned long lcd_sclk_on : 1; 510 - unsigned long pclk_running : 1; 511 - unsigned long sclk_running : 1; 512 - unsigned long : 6; 482 + u32 color_depth : 3; 483 + u32 portrait_mode : 2; 484 + u32 low_power_on : 1; 485 + u32 req_freq : 4; 486 + u32 en_crtc : 1; 487 + u32 en_graphic_req : 1; 488 + u32 en_graphic_crtc : 1; 489 + u32 total_req_graphic : 9; 490 + u32 lcd_pclk_on : 1; 491 + u32 lcd_sclk_on : 1; 492 + u32 pclk_running : 1; 493 + u32 sclk_running : 1; 494 + u32 : 6; 513 495 } __attribute__((packed)); 514 496 515 497 struct graphic_ctrl_t_w32xx { 516 - unsigned long color_depth : 3; 517 - unsigned long portrait_mode : 2; 518 - unsigned long low_power_on : 1; 519 - unsigned long req_freq : 4; 520 - unsigned long en_crtc : 1; 521 - unsigned long en_graphic_req : 1; 522 - unsigned long en_graphic_crtc : 1; 523 - unsigned long total_req_graphic : 10; 524 - unsigned long lcd_pclk_on : 1; 525 - unsigned long lcd_sclk_on : 1; 526 - unsigned long pclk_running : 1; 527 - unsigned long sclk_running : 1; 528 - unsigned long : 5; 498 + u32 color_depth : 3; 499 + u32 portrait_mode : 2; 500 + u32 low_power_on : 1; 501 + u32 req_freq : 4; 502 + u32 en_crtc : 1; 503 + u32 en_graphic_req : 1; 504 + u32 en_graphic_crtc : 1; 505 + u32 total_req_graphic : 10; 506 + u32 lcd_pclk_on : 1; 507 + u32 lcd_sclk_on : 1; 508 + u32 pclk_running : 1; 509 + u32 sclk_running : 1; 510 + u32 : 5; 529 511 } __attribute__((packed)); 530 512 531 513 union graphic_ctrl_u { 532 - unsigned long val : 32; 514 + u32 val : 32; 533 515 struct graphic_ctrl_t_w100 f_w100; 534 516 struct graphic_ctrl_t_w32xx f_w32xx; 535 517 } __attribute__((packed)); 536 518 537 519 struct video_ctrl_t { 538 - unsigned long video_mode : 1; 539 - unsigned long keyer_en : 1; 540 - unsigned long en_video_req : 1; 541 - unsigned long en_graphic_req_video : 1; 542 - unsigned long en_video_crtc : 1; 543 - unsigned long video_hor_exp : 2; 544 - unsigned long video_ver_exp : 2; 545 - unsigned long uv_combine : 1; 546 - unsigned long total_req_video : 9; 547 - unsigned long video_ch_sel : 1; 548 - unsigned long video_portrait : 2; 549 - unsigned long yuv2rgb_en : 1; 550 - unsigned long yuv2rgb_option : 1; 551 - unsigned long video_inv_hor : 1; 552 - unsigned long video_inv_ver : 1; 553 - unsigned long gamma_sel : 2; 554 - unsigned long dis_limit : 1; 555 - unsigned long en_uv_hblend : 1; 556 - unsigned long rgb_gamma_sel : 2; 520 + u32 video_mode : 1; 521 + u32 keyer_en : 1; 522 + u32 en_video_req : 1; 523 + u32 en_graphic_req_video : 1; 524 + u32 en_video_crtc : 1; 525 + u32 video_hor_exp : 2; 526 + u32 video_ver_exp : 2; 527 + u32 uv_combine : 1; 528 + u32 total_req_video : 9; 529 + u32 video_ch_sel : 1; 530 + u32 video_portrait : 2; 531 + u32 yuv2rgb_en : 1; 532 + u32 yuv2rgb_option : 1; 533 + u32 video_inv_hor : 1; 534 + u32 video_inv_ver : 1; 535 + u32 gamma_sel : 2; 536 + u32 dis_limit : 1; 537 + u32 en_uv_hblend : 1; 538 + u32 rgb_gamma_sel : 2; 557 539 } __attribute__((packed)); 558 540 559 541 union video_ctrl_u { 560 - unsigned long val : 32; 542 + u32 val : 32; 561 543 struct video_ctrl_t f; 562 544 } __attribute__((packed)); 563 545 564 546 struct disp_db_buf_cntl_rd_t { 565 - unsigned long en_db_buf : 1; 566 - unsigned long update_db_buf_done : 1; 567 - unsigned long db_buf_cntl : 6; 568 - unsigned long : 24; 547 + u32 en_db_buf : 1; 548 + u32 update_db_buf_done : 1; 549 + u32 db_buf_cntl : 6; 550 + u32 : 24; 569 551 } __attribute__((packed)); 570 552 571 553 union disp_db_buf_cntl_rd_u { 572 - unsigned long val : 32; 554 + u32 val : 32; 573 555 struct disp_db_buf_cntl_rd_t f; 574 556 } __attribute__((packed)); 575 557 576 558 struct disp_db_buf_cntl_wr_t { 577 - unsigned long en_db_buf : 1; 578 - unsigned long update_db_buf : 1; 579 - unsigned long db_buf_cntl : 6; 580 - unsigned long : 24; 559 + u32 en_db_buf : 1; 560 + u32 update_db_buf : 1; 561 + u32 db_buf_cntl : 6; 562 + u32 : 24; 581 563 } __attribute__((packed)); 582 564 583 565 union disp_db_buf_cntl_wr_u { 584 - unsigned long val : 32; 566 + u32 val : 32; 585 567 struct disp_db_buf_cntl_wr_t f; 586 568 } __attribute__((packed)); 587 569 588 570 struct gamma_value1_t { 589 - unsigned long gamma1 : 8; 590 - unsigned long gamma2 : 8; 591 - unsigned long gamma3 : 8; 592 - unsigned long gamma4 : 8; 571 + u32 gamma1 : 8; 572 + u32 gamma2 : 8; 573 + u32 gamma3 : 8; 574 + u32 gamma4 : 8; 593 575 } __attribute__((packed)); 594 576 595 577 union gamma_value1_u { 596 - unsigned long val : 32; 578 + u32 val : 32; 597 579 struct gamma_value1_t f; 598 580 } __attribute__((packed)); 599 581 600 582 struct gamma_value2_t { 601 - unsigned long gamma5 : 8; 602 - unsigned long gamma6 : 8; 603 - unsigned long gamma7 : 8; 604 - unsigned long gamma8 : 8; 583 + u32 gamma5 : 8; 584 + u32 gamma6 : 8; 585 + u32 gamma7 : 8; 586 + u32 gamma8 : 8; 605 587 } __attribute__((packed)); 606 588 607 589 union gamma_value2_u { 608 - unsigned long val : 32; 590 + u32 val : 32; 609 591 struct gamma_value2_t f; 610 592 } __attribute__((packed)); 611 593 612 594 struct gamma_slope_t { 613 - unsigned long slope1 : 3; 614 - unsigned long slope2 : 3; 615 - unsigned long slope3 : 3; 616 - unsigned long slope4 : 3; 617 - unsigned long slope5 : 3; 618 - unsigned long slope6 : 3; 619 - unsigned long slope7 : 3; 620 - unsigned long slope8 : 3; 621 - unsigned long : 8; 595 + u32 slope1 : 3; 596 + u32 slope2 : 3; 597 + u32 slope3 : 3; 598 + u32 slope4 : 3; 599 + u32 slope5 : 3; 600 + u32 slope6 : 3; 601 + u32 slope7 : 3; 602 + u32 slope8 : 3; 603 + u32 : 8; 622 604 } __attribute__((packed)); 623 605 624 606 union gamma_slope_u { 625 - unsigned long val : 32; 607 + u32 val : 32; 626 608 struct gamma_slope_t f; 627 609 } __attribute__((packed)); 628 610 629 611 struct mc_ext_mem_location_t { 630 - unsigned long mc_ext_mem_start : 16; 631 - unsigned long mc_ext_mem_top : 16; 612 + u32 mc_ext_mem_start : 16; 613 + u32 mc_ext_mem_top : 16; 632 614 } __attribute__((packed)); 633 615 634 616 union mc_ext_mem_location_u { 635 - unsigned long val : 32; 617 + u32 val : 32; 636 618 struct mc_ext_mem_location_t f; 637 619 } __attribute__((packed)); 638 620 639 621 struct mc_fb_location_t { 640 - unsigned long mc_fb_start : 16; 641 - unsigned long mc_fb_top : 16; 622 + u32 mc_fb_start : 16; 623 + u32 mc_fb_top : 16; 642 624 } __attribute__((packed)); 643 625 644 626 union mc_fb_location_u { 645 - unsigned long val : 32; 627 + u32 val : 32; 646 628 struct mc_fb_location_t f; 647 629 } __attribute__((packed)); 648 630 649 631 struct clk_pin_cntl_t { 650 - unsigned long osc_en : 1; 651 - unsigned long osc_gain : 5; 652 - unsigned long dont_use_xtalin : 1; 653 - unsigned long xtalin_pm_en : 1; 654 - unsigned long xtalin_dbl_en : 1; 655 - unsigned long : 7; 656 - unsigned long cg_debug : 16; 632 + u32 osc_en : 1; 633 + u32 osc_gain : 5; 634 + u32 dont_use_xtalin : 1; 635 + u32 xtalin_pm_en : 1; 636 + u32 xtalin_dbl_en : 1; 637 + u32 : 7; 638 + u32 cg_debug : 16; 657 639 } __attribute__((packed)); 658 640 659 641 union clk_pin_cntl_u { 660 - unsigned long val : 32; 642 + u32 val : 32; 661 643 struct clk_pin_cntl_t f; 662 644 } __attribute__((packed)); 663 645 664 646 struct pll_ref_fb_div_t { 665 - unsigned long pll_ref_div : 4; 666 - unsigned long : 4; 667 - unsigned long pll_fb_div_int : 6; 668 - unsigned long : 2; 669 - unsigned long pll_fb_div_frac : 3; 670 - unsigned long : 1; 671 - unsigned long pll_reset_time : 4; 672 - unsigned long pll_lock_time : 8; 647 + u32 pll_ref_div : 4; 648 + u32 : 4; 649 + u32 pll_fb_div_int : 6; 650 + u32 : 2; 651 + u32 pll_fb_div_frac : 3; 652 + u32 : 1; 653 + u32 pll_reset_time : 4; 654 + u32 pll_lock_time : 8; 673 655 } __attribute__((packed)); 674 656 675 657 union pll_ref_fb_div_u { 676 - unsigned long val : 32; 658 + u32 val : 32; 677 659 struct pll_ref_fb_div_t f; 678 660 } __attribute__((packed)); 679 661 680 662 struct pll_cntl_t { 681 - unsigned long pll_pwdn : 1; 682 - unsigned long pll_reset : 1; 683 - unsigned long pll_pm_en : 1; 684 - unsigned long pll_mode : 1; 685 - unsigned long pll_refclk_sel : 1; 686 - unsigned long pll_fbclk_sel : 1; 687 - unsigned long pll_tcpoff : 1; 688 - unsigned long pll_pcp : 3; 689 - unsigned long pll_pvg : 3; 690 - unsigned long pll_vcofr : 1; 691 - unsigned long pll_ioffset : 2; 692 - unsigned long pll_pecc_mode : 2; 693 - unsigned long pll_pecc_scon : 2; 694 - unsigned long pll_dactal : 4; 695 - unsigned long pll_cp_clip : 2; 696 - unsigned long pll_conf : 3; 697 - unsigned long pll_mbctrl : 2; 698 - unsigned long pll_ring_off : 1; 663 + u32 pll_pwdn : 1; 664 + u32 pll_reset : 1; 665 + u32 pll_pm_en : 1; 666 + u32 pll_mode : 1; 667 + u32 pll_refclk_sel : 1; 668 + u32 pll_fbclk_sel : 1; 669 + u32 pll_tcpoff : 1; 670 + u32 pll_pcp : 3; 671 + u32 pll_pvg : 3; 672 + u32 pll_vcofr : 1; 673 + u32 pll_ioffset : 2; 674 + u32 pll_pecc_mode : 2; 675 + u32 pll_pecc_scon : 2; 676 + u32 pll_dactal : 4; 677 + u32 pll_cp_clip : 2; 678 + u32 pll_conf : 3; 679 + u32 pll_mbctrl : 2; 680 + u32 pll_ring_off : 1; 699 681 } __attribute__((packed)); 700 682 701 683 union pll_cntl_u { 702 - unsigned long val : 32; 684 + u32 val : 32; 703 685 struct pll_cntl_t f; 704 686 } __attribute__((packed)); 705 687 706 688 struct sclk_cntl_t { 707 - unsigned long sclk_src_sel : 2; 708 - unsigned long : 2; 709 - unsigned long sclk_post_div_fast : 4; 710 - unsigned long sclk_clkon_hys : 3; 711 - unsigned long sclk_post_div_slow : 4; 712 - unsigned long disp_cg_ok2switch_en : 1; 713 - unsigned long sclk_force_reg : 1; 714 - unsigned long sclk_force_disp : 1; 715 - unsigned long sclk_force_mc : 1; 716 - unsigned long sclk_force_extmc : 1; 717 - unsigned long sclk_force_cp : 1; 718 - unsigned long sclk_force_e2 : 1; 719 - unsigned long sclk_force_e3 : 1; 720 - unsigned long sclk_force_idct : 1; 721 - unsigned long sclk_force_bist : 1; 722 - unsigned long busy_extend_cp : 1; 723 - unsigned long busy_extend_e2 : 1; 724 - unsigned long busy_extend_e3 : 1; 725 - unsigned long busy_extend_idct : 1; 726 - unsigned long : 3; 689 + u32 sclk_src_sel : 2; 690 + u32 : 2; 691 + u32 sclk_post_div_fast : 4; 692 + u32 sclk_clkon_hys : 3; 693 + u32 sclk_post_div_slow : 4; 694 + u32 disp_cg_ok2switch_en : 1; 695 + u32 sclk_force_reg : 1; 696 + u32 sclk_force_disp : 1; 697 + u32 sclk_force_mc : 1; 698 + u32 sclk_force_extmc : 1; 699 + u32 sclk_force_cp : 1; 700 + u32 sclk_force_e2 : 1; 701 + u32 sclk_force_e3 : 1; 702 + u32 sclk_force_idct : 1; 703 + u32 sclk_force_bist : 1; 704 + u32 busy_extend_cp : 1; 705 + u32 busy_extend_e2 : 1; 706 + u32 busy_extend_e3 : 1; 707 + u32 busy_extend_idct : 1; 708 + u32 : 3; 727 709 } __attribute__((packed)); 728 710 729 711 union sclk_cntl_u { 730 - unsigned long val : 32; 712 + u32 val : 32; 731 713 struct sclk_cntl_t f; 732 714 } __attribute__((packed)); 733 715 734 716 struct pclk_cntl_t { 735 - unsigned long pclk_src_sel : 2; 736 - unsigned long : 2; 737 - unsigned long pclk_post_div : 4; 738 - unsigned long : 8; 739 - unsigned long pclk_force_disp : 1; 740 - unsigned long : 15; 717 + u32 pclk_src_sel : 2; 718 + u32 : 2; 719 + u32 pclk_post_div : 4; 720 + u32 : 8; 721 + u32 pclk_force_disp : 1; 722 + u32 : 15; 741 723 } __attribute__((packed)); 742 724 743 725 union pclk_cntl_u { 744 - unsigned long val : 32; 726 + u32 val : 32; 745 727 struct pclk_cntl_t f; 746 728 } __attribute__((packed)); 747 729 ··· 753 735 #define TESTCLK_SRC_XTAL 0x06 754 736 755 737 struct clk_test_cntl_t { 756 - unsigned long testclk_sel : 4; 757 - unsigned long : 3; 758 - unsigned long start_check_freq : 1; 759 - unsigned long tstcount_rst : 1; 760 - unsigned long : 15; 761 - unsigned long test_count : 8; 738 + u32 testclk_sel : 4; 739 + u32 : 3; 740 + u32 start_check_freq : 1; 741 + u32 tstcount_rst : 1; 742 + u32 : 15; 743 + u32 test_count : 8; 762 744 } __attribute__((packed)); 763 745 764 746 union clk_test_cntl_u { 765 - unsigned long val : 32; 747 + u32 val : 32; 766 748 struct clk_test_cntl_t f; 767 749 } __attribute__((packed)); 768 750 769 751 struct pwrmgt_cntl_t { 770 - unsigned long pwm_enable : 1; 771 - unsigned long : 1; 772 - unsigned long pwm_mode_req : 2; 773 - unsigned long pwm_wakeup_cond : 2; 774 - unsigned long pwm_fast_noml_hw_en : 1; 775 - unsigned long pwm_noml_fast_hw_en : 1; 776 - unsigned long pwm_fast_noml_cond : 4; 777 - unsigned long pwm_noml_fast_cond : 4; 778 - unsigned long pwm_idle_timer : 8; 779 - unsigned long pwm_busy_timer : 8; 752 + u32 pwm_enable : 1; 753 + u32 : 1; 754 + u32 pwm_mode_req : 2; 755 + u32 pwm_wakeup_cond : 2; 756 + u32 pwm_fast_noml_hw_en : 1; 757 + u32 pwm_noml_fast_hw_en : 1; 758 + u32 pwm_fast_noml_cond : 4; 759 + u32 pwm_noml_fast_cond : 4; 760 + u32 pwm_idle_timer : 8; 761 + u32 pwm_busy_timer : 8; 780 762 } __attribute__((packed)); 781 763 782 764 union pwrmgt_cntl_u { 783 - unsigned long val : 32; 765 + u32 val : 32; 784 766 struct pwrmgt_cntl_t f; 767 + } __attribute__((packed)); 768 + 769 + #define SRC_DATATYPE_EQU_DST 3 770 + 771 + #define ROP3_SRCCOPY 0xcc 772 + #define ROP3_PATCOPY 0xf0 773 + 774 + #define GMC_BRUSH_SOLID_COLOR 13 775 + #define GMC_BRUSH_NONE 15 776 + 777 + #define DP_SRC_MEM_RECTANGULAR 2 778 + 779 + #define DP_OP_ROP 0 780 + 781 + struct dp_gui_master_cntl_t { 782 + u32 gmc_src_pitch_offset_cntl : 1; 783 + u32 gmc_dst_pitch_offset_cntl : 1; 784 + u32 gmc_src_clipping : 1; 785 + u32 gmc_dst_clipping : 1; 786 + u32 gmc_brush_datatype : 4; 787 + u32 gmc_dst_datatype : 4; 788 + u32 gmc_src_datatype : 3; 789 + u32 gmc_byte_pix_order : 1; 790 + u32 gmc_default_sel : 1; 791 + u32 gmc_rop3 : 8; 792 + u32 gmc_dp_src_source : 3; 793 + u32 gmc_clr_cmp_fcn_dis : 1; 794 + u32 : 1; 795 + u32 gmc_wr_msk_dis : 1; 796 + u32 gmc_dp_op : 1; 797 + } __attribute__((packed)); 798 + 799 + union dp_gui_master_cntl_u { 800 + u32 val : 32; 801 + struct dp_gui_master_cntl_t f; 802 + } __attribute__((packed)); 803 + 804 + struct rbbm_status_t { 805 + u32 cmdfifo_avail : 7; 806 + u32 : 1; 807 + u32 hirq_on_rbb : 1; 808 + u32 cprq_on_rbb : 1; 809 + u32 cfrq_on_rbb : 1; 810 + u32 hirq_in_rtbuf : 1; 811 + u32 cprq_in_rtbuf : 1; 812 + u32 cfrq_in_rtbuf : 1; 813 + u32 cf_pipe_busy : 1; 814 + u32 eng_ev_busy : 1; 815 + u32 cp_cmdstrm_busy : 1; 816 + u32 e2_busy : 1; 817 + u32 rb2d_busy : 1; 818 + u32 rb3d_busy : 1; 819 + u32 se_busy : 1; 820 + u32 re_busy : 1; 821 + u32 tam_busy : 1; 822 + u32 tdm_busy : 1; 823 + u32 pb_busy : 1; 824 + u32 : 6; 825 + u32 gui_active : 1; 826 + } __attribute__((packed)); 827 + 828 + union rbbm_status_u { 829 + u32 val : 32; 830 + struct rbbm_status_t f; 831 + } __attribute__((packed)); 832 + 833 + struct dp_datatype_t { 834 + u32 dp_dst_datatype : 4; 835 + u32 : 4; 836 + u32 dp_brush_datatype : 4; 837 + u32 dp_src2_type : 1; 838 + u32 dp_src2_datatype : 3; 839 + u32 dp_src_datatype : 3; 840 + u32 : 11; 841 + u32 dp_byte_pix_order : 1; 842 + u32 : 1; 843 + } __attribute__((packed)); 844 + 845 + union dp_datatype_u { 846 + u32 val : 32; 847 + struct dp_datatype_t f; 848 + } __attribute__((packed)); 849 + 850 + struct dp_mix_t { 851 + u32 : 8; 852 + u32 dp_src_source : 3; 853 + u32 dp_src2_source : 3; 854 + u32 : 2; 855 + u32 dp_rop3 : 8; 856 + u32 dp_op : 1; 857 + u32 : 7; 858 + } __attribute__((packed)); 859 + 860 + union dp_mix_u { 861 + u32 val : 32; 862 + struct dp_mix_t f; 863 + } __attribute__((packed)); 864 + 865 + struct eng_cntl_t { 866 + u32 erc_reg_rd_ws : 1; 867 + u32 erc_reg_wr_ws : 1; 868 + u32 erc_idle_reg_wr : 1; 869 + u32 dis_engine_triggers : 1; 870 + u32 dis_rop_src_uses_dst_w_h : 1; 871 + u32 dis_src_uses_dst_dirmaj : 1; 872 + u32 : 6; 873 + u32 force_3dclk_when_2dclk : 1; 874 + u32 : 19; 875 + } __attribute__((packed)); 876 + 877 + union eng_cntl_u { 878 + u32 val : 32; 879 + struct eng_cntl_t f; 880 + } __attribute__((packed)); 881 + 882 + struct dp_cntl_t { 883 + u32 dst_x_dir : 1; 884 + u32 dst_y_dir : 1; 885 + u32 src_x_dir : 1; 886 + u32 src_y_dir : 1; 887 + u32 dst_major_x : 1; 888 + u32 src_major_x : 1; 889 + u32 : 26; 890 + } __attribute__((packed)); 891 + 892 + union dp_cntl_u { 893 + u32 val : 32; 894 + struct dp_cntl_t f; 895 + } __attribute__((packed)); 896 + 897 + struct dp_cntl_dst_dir_t { 898 + u32 : 15; 899 + u32 dst_y_dir : 1; 900 + u32 : 15; 901 + u32 dst_x_dir : 1; 902 + } __attribute__((packed)); 903 + 904 + union dp_cntl_dst_dir_u { 905 + u32 val : 32; 906 + struct dp_cntl_dst_dir_t f; 785 907 } __attribute__((packed)); 786 908 787 909 #endif