Skip to content

Commit f259ebb

Browse files
Krzysztof-HLinus Torvalds
authored andcommitted
pm3fb: header file reduction
This patch removes constants named AAA_DISABLE with value 0. They are redudant and misleading ( a |= AAA_DISABLE does nothing and usually should be a &= ~AAA_ENABLE). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 65faaeb commit f259ebb

2 files changed

Lines changed: 2 additions & 40 deletions

File tree

‎drivers/video/pm3fb.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ static int pm3fb_set_par(struct fb_info *info)
886886
if ((info->var.activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW)
887887
par->video |= PM3VideoControl_ENABLE;
888888
else {
889-
par->video |= PM3VideoControl_DISABLE;
889+
par->video &= ~PM3VideoControl_ENABLE;
890890
DPRINTK("PM3Video disabled\n");
891891
}
892892
switch (bpp) {
@@ -911,8 +911,7 @@ static int pm3fb_set_par(struct fb_info *info)
911911

912912
/* pm3fb_clear_memory(info, 0);*/
913913
pm3fb_clear_colormap(par, 0, 0, 0);
914-
PM3_WRITE_DAC_REG(par, PM3RD_CursorMode,
915-
PM3RD_CursorMode_CURSOR_DISABLE);
914+
PM3_WRITE_DAC_REG(par, PM3RD_CursorMode, 0);
916915
pm3fb_init_engine(info);
917916
pm3fb_write_mode(info);
918917
return 0;

‎include/video/pm3fb.h‎

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
#define PM3ByApertureMode_BYTESWAP_BADC (1<<0)
5656
#define PM3ByApertureMode_BYTESWAP_CDAB (2<<0)
5757
#define PM3ByApertureMode_BYTESWAP_DCBA (3<<0)
58-
#define PM3ByApertureMode_PATCH_DISABLE (0<<2)
5958
#define PM3ByApertureMode_PATCH_ENABLE (1<<2)
6059
#define PM3ByApertureMode_FORMAT_RAW (0<<3)
6160
#define PM3ByApertureMode_FORMAT_YUYV (1<<3)
@@ -112,7 +111,6 @@
112111
#define PM3VsStart 0x3048
113112
#define PM3VsEnd 0x3050
114113
#define PM3VideoControl 0x3058
115-
#define PM3VideoControl_DISABLE (0<<0)
116114
#define PM3VideoControl_ENABLE (1<<0)
117115
#define PM3VideoControl_BLANK_ACTIVE_HIGH (0<<1)
118116
#define PM3VideoControl_BLANK_ACTIVE_LOW (1<<1)
@@ -133,7 +131,6 @@
133131
#define PM3VideoControl_BUFFER_SWAP_SYNCON_FRAMEBLANK (0<<9)
134132
#define PM3VideoControl_BUFFER_SWAP_FREE_RUNNING (1<<9)
135133
#define PM3VideoControl_BUFFER_SWAP_LIMITETO_FRAMERATE (2<<9)
136-
#define PM3VideoControl_STEREO_DISABLE (0<<11)
137134
#define PM3VideoControl_STEREO_ENABLE (1<<11)
138135
#define PM3VideoControl_RIGHT_EYE_ACTIVE_HIGH (0<<12)
139136
#define PM3VideoControl_RIGHT_EYE_ACTIVE_LOW (1<<12)
@@ -142,12 +139,10 @@
142139
#define PM3VideoControl_SYNC_MODE_INDEPENDENT (0<<16)
143140
#define PM3VideoControl_SYNC_MODE_SYNCTO_VSA (1<<16)
144141
#define PM3VideoControl_SYNC_MODE_SYNCTO_VSB (2<<16)
145-
#define PM3VideoControl_PATCH_DISABLE (0<<18)
146142
#define PM3VideoControl_PATCH_ENABLE (1<<18)
147143
#define PM3VideoControl_PIXELSIZE_8BIT (0<<19)
148144
#define PM3VideoControl_PIXELSIZE_16BIT (1<<19)
149145
#define PM3VideoControl_PIXELSIZE_32BIT (2<<19)
150-
#define PM3VideoControl_DISPLAY_DISABLE (0<<21)
151146
#define PM3VideoControl_DISPLAY_ENABLE (1<<21)
152147
#define PM3VideoControl_PATCH_OFFSET_X(off) (((off)&0x3f)<<22)
153148
#define PM3VideoControl_PATCH_OFFSET_Y(off) (((off)&0x3f)<<28)
@@ -159,10 +154,8 @@
159154
#define PM3MiscControl 0x3088
160155

161156
#define PM3VideoOverlayUpdate 0x3100
162-
#define PM3VideoOverlayUpdate_DISABLE (0<<0)
163157
#define PM3VideoOverlayUpdate_ENABLE (1<<0)
164158
#define PM3VideoOverlayMode 0x3108
165-
#define PM3VideoOverlayMode_DISABLE (0<<0)
166159
#define PM3VideoOverlayMode_ENABLE (1<<0)
167160
#define PM3VideoOverlayMode_BUFFERSYNC_MANUAL (0<<1)
168161
#define PM3VideoOverlayMode_BUFFERSYNC_VIDEOSTREAMA (1<<1)
@@ -250,25 +243,16 @@
250243
#define PM3RD_IndexedData 0x4030
251244
#define PM3RD_IndexControl 0x4038
252245
#define PM3RD_IndexControl_AUTOINCREMENT_ENABLE (1<<0)
253-
#define PM3RD_IndexControl_AUTOINCREMENT_DISABLE (0<<0)
254246

255247
/* Indirect Registers */
256248
#define PM3RD_MiscControl 0x000
257-
#define PM3RD_MiscControl_HIGHCOLOR_RES_DISABLE (0<<0)
258249
#define PM3RD_MiscControl_HIGHCOLOR_RES_ENABLE (1<<0)
259-
#define PM3RD_MiscControl_PIXELDOUBLE_DISABLE (0<<1)
260250
#define PM3RD_MiscControl_PIXELDOUBLE_ENABLE (1<<1)
261-
#define PM3RD_MiscControl_LASTREAD_ADDR_DISABLE (0<<2)
262251
#define PM3RD_MiscControl_LASTREAD_ADDR_ENABLE (1<<2)
263-
#define PM3RD_MiscControl_DIRECTCOLOR_DISABLE (0<<3)
264252
#define PM3RD_MiscControl_DIRECTCOLOR_ENABLE (1<<3)
265-
#define PM3RD_MiscControl_OVERLAY_DISABLE (0<<4)
266253
#define PM3RD_MiscControl_OVERLAY_ENABLE (1<<4)
267-
#define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_DISABLE (0<<5)
268254
#define PM3RD_MiscControl_PIXELDOUBLE_BUFFER_ENABLE (1<<5)
269-
#define PM3RD_MiscControl_VSB_OUTPUT_DISABLE (0<<6)
270255
#define PM3RD_MiscControl_VSB_OUTPUT_ENABLE (1<<6)
271-
#define PM3RD_MiscControl_STEREODOUBLE_BUFFER_DISABLE (0<<7)
272256
#define PM3RD_MiscControl_STEREODOUBLE_BUFFER_ENABLE (1<<7)
273257
#define PM3RD_SyncControl 0x001
274258
#define PM3RD_SyncControl_HSYNC_ACTIVE_LOW (0<<0)
@@ -288,15 +272,10 @@
288272
#define PM3RD_DACControl 0x002
289273
#define PM3RD_DACControl_DAC_POWER_ON (0<<0)
290274
#define PM3RD_DACControl_DAC_POWER_OFF (1<<0)
291-
#define PM3RD_DACControl_SYNC_ON_GREEN_DISABLE (0<<3)
292275
#define PM3RD_DACControl_SYNC_ON_GREEN_ENABLE (1<<3)
293-
#define PM3RD_DACControl_BLANK_RED_DAC_DISABLE (0<<4)
294276
#define PM3RD_DACControl_BLANK_RED_DAC_ENABLE (1<<4)
295-
#define PM3RD_DACControl_BLANK_GREEN_DAC_DISABLE (0<<5)
296277
#define PM3RD_DACControl_BLANK_GREEN_DAC_ENABLE (1<<5)
297-
#define PM3RD_DACControl_BLANK_BLUE_DAC_DISABLE (0<<6)
298278
#define PM3RD_DACControl_BLANK_BLUE_DAC_ENABLE (1<<6)
299-
#define PM3RD_DACControl_BLANK_PEDESTAL_DISABLE (0<<7)
300279
#define PM3RD_DACControl_BLANK_PEDESTAL_ENABLE (1<<7)
301280
#define PM3RD_PixelSize 0x003
302281
#define PM3RD_PixelSize_24_BIT_PIXELS (4<<0)
@@ -305,7 +284,6 @@
305284
#define PM3RD_PixelSize_8_BIT_PIXELS (0<<0)
306285
#define PM3RD_ColorFormat 0x004
307286
#define PM3RD_ColorFormat_LINEAR_COLOR_EXT_ENABLE (1<<6)
308-
#define PM3RD_ColorFormat_LINEAR_COLOR_EXT_DISABLE (0<<6)
309287
#define PM3RD_ColorFormat_COLOR_ORDER_BLUE_LOW (1<<5)
310288
#define PM3RD_ColorFormat_COLOR_ORDER_RED_LOW (0<<5)
311289
#define PM3RD_ColorFormat_COLOR_FORMAT_MASK (0x1f<<0)
@@ -323,7 +301,6 @@
323301
#define PM3RD_ColorFormat_565_FRONT_COLOR (16<<0)
324302
#define PM3RD_ColorFormat_565_BACK_COLOR (17<<0)
325303
#define PM3RD_CursorMode 0x005
326-
#define PM3RD_CursorMode_CURSOR_DISABLE (0<<0)
327304
#define PM3RD_CursorMode_CURSOR_ENABLE (1<<0)
328305
#define PM3RD_CursorMode_FORMAT_64x64_2BPE_P0123 (0<<2)
329306
#define PM3RD_CursorMode_FORMAT_32x32_2BPE_P0 (1<<2)
@@ -334,16 +311,12 @@
334311
#define PM3RD_CursorMode_FORMAT_32x32_4BPE_P23 (6<<2)
335312
#define PM3RD_CursorMode_TYPE_MS (0<<4)
336313
#define PM3RD_CursorMode_TYPE_X (1<<4)
337-
#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_DISABLE (0<<6)
338314
#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_ENABLE (1<<6)
339315
#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_3_COLOR (2<<6)
340316
#define PM3RD_CursorMode_REVERSE_PIXEL_ORDER_15_COLOR (3<<6)
341317
#define PM3RD_CursorControl 0x006
342-
#define PM3RD_CursorControl_DOUBLE_X_DISABLED (0<<0)
343318
#define PM3RD_CursorControl_DOUBLE_X_ENABLED (1<<0)
344-
#define PM3RD_CursorControl_DOUBLE_Y_DISABLED (0<<1)
345319
#define PM3RD_CursorControl_DOUBLE_Y_ENABLED (1<<1)
346-
#define PM3RD_CursorControl_READBACK_POS_DISABLED (0<<2)
347320
#define PM3RD_CursorControl_READBACK_POS_ENABLED (1<<2)
348321

349322
#define PM3RD_CursorXLow 0x007
@@ -354,16 +327,12 @@
354327
#define PM3RD_CursorHotSpotY 0x00c
355328
#define PM3RD_OverlayKey 0x00d
356329
#define PM3RD_Pan 0x00e
357-
#define PM3RD_Pan_DISABLE (0<<0)
358330
#define PM3RD_Pan_ENABLE (1<<0)
359-
#define PM3RD_Pan_GATE_DISABLE (0<<1)
360331
#define PM3RD_Pan_GATE_ENABLE (1<<1)
361332
#define PM3RD_Sense 0x00f
362333

363334
#define PM3RD_CheckControl 0x018
364-
#define PM3RD_CheckControl_PIXEL_DISABLED (0<<0)
365335
#define PM3RD_CheckControl_PIXEL_ENABLED (1<<0)
366-
#define PM3RD_CheckControl_LUT_DISABLED (0<<1)
367336
#define PM3RD_CheckControl_LUT_ENABLED (1<<1)
368337
#define PM3RD_CheckPixelRed 0x019
369338
#define PM3RD_CheckPixelGreen 0x01a
@@ -374,14 +343,12 @@
374343
#define PM3RD_Scratch 0x01f
375344

376345
#define PM3RD_VideoOverlayControl 0x020
377-
#define PM3RD_VideoOverlayControl_DISABLE (0<<0)
378346
#define PM3RD_VideoOverlayControl_ENABLE (1<<0)
379347
#define PM3RD_VideoOverlayControl_MODE_MASK (3<<1)
380348
#define PM3RD_VideoOverlayControl_MODE_MAINKEY (0<<1)
381349
#define PM3RD_VideoOverlayControl_MODE_OVERLAYKEY (1<<1)
382350
#define PM3RD_VideoOverlayControl_MODE_ALWAYS (2<<1)
383351
#define PM3RD_VideoOverlayControl_MODE_BLEND (3<<1)
384-
#define PM3RD_VideoOverlayControl_DIRECTCOLOR_DISABLED (0<<3)
385352
#define PM3RD_VideoOverlayControl_DIRECTCOLOR_ENABLED (1<<3)
386353
#define PM3RD_VideoOverlayControl_BLENDSRC_MAIN (0<<4)
387354
#define PM3RD_VideoOverlayControl_BLENDSRC_REGISTER (1<<4)
@@ -420,7 +387,6 @@
420387
#define PM3RD_DClkControl_LOCKED (1<<1)
421388
#define PM3RD_DClkControl_NOT_LOCKED (0<<1)
422389
#define PM3RD_DClkControl_ENABLE (1<<0)
423-
#define PM3RD_DClkControl_DISABLE (0<<0)
424390
#define PM3RD_DClk0PreScale 0x201
425391
#define PM3RD_DClk0FeedbackScale 0x202
426392
#define PM3RD_DClk0PostScale 0x203
@@ -435,7 +401,6 @@
435401
#define PM3RD_DClk3FeedbackScale 0x20b
436402
#define PM3RD_DClk3PostScale 0x20c
437403
#define PM3RD_KClkControl 0x20d
438-
#define PM3RD_KClkControl_DISABLE (0<<0)
439404
#define PM3RD_KClkControl_ENABLE (1<<0)
440405
#define PM3RD_KClkControl_NOT_LOCKED (0<<1)
441406
#define PM3RD_KClkControl_LOCKED (1<<1)
@@ -450,7 +415,6 @@
450415
#define PM3RD_KClkFeedbackScale 0x20f
451416
#define PM3RD_KClkPostScale 0x210
452417
#define PM3RD_MClkControl 0x211
453-
#define PM3RD_MClkControl_DISABLE (0<<0)
454418
#define PM3RD_MClkControl_ENABLE (1<<0)
455419
#define PM3RD_MClkControl_NOT_LOCKED (0<<1)
456420
#define PM3RD_MClkControl_LOCKED (1<<1)
@@ -468,7 +432,6 @@
468432
#define PM3RD_MClkFeedbackScale 0x213
469433
#define PM3RD_MClkPostScale 0x214
470434
#define PM3RD_SClkControl 0x215
471-
#define PM3RD_SClkControl_DISABLE (0<<0)
472435
#define PM3RD_SClkControl_ENABLE (1<<0)
473436
#define PM3RD_SClkControl_NOT_LOCKED (0<<1)
474437
#define PM3RD_SClkControl_LOCKED (1<<1)

0 commit comments

Comments
 (0)