|
@@ -65,7 +65,8 @@ void hw_de_init(struct lynx_accel *accel)
|
|
|
write_dpr(accel, DE_CONTROL, read_dpr(accel, DE_CONTROL) & ~clr);
|
|
|
}
|
|
|
|
|
|
-/* set2dformat only be called from setmode functions
|
|
|
+/*
|
|
|
+ * set2dformat only be called from setmode functions
|
|
|
* but if you need dual framebuffer driver,need call set2dformat
|
|
|
* every time you use 2d function
|
|
|
*/
|
|
@@ -90,7 +91,8 @@ int hw_fillrect(struct lynx_accel *accel,
|
|
|
u32 deCtrl;
|
|
|
|
|
|
if (accel->de_wait() != 0) {
|
|
|
- /* int time wait and always busy,seems hardware
|
|
|
+ /*
|
|
|
+ * int time wait and always busy,seems hardware
|
|
|
* got something error
|
|
|
*/
|
|
|
pr_debug("De engine always busy\n");
|
|
@@ -213,25 +215,29 @@ unsigned int rop2) /* ROP value */
|
|
|
opSign = (-1);
|
|
|
}
|
|
|
|
|
|
- /* Note:
|
|
|
+ /*
|
|
|
+ * Note:
|
|
|
* DE_FOREGROUND are DE_BACKGROUND are don't care.
|
|
|
* DE_COLOR_COMPARE and DE_COLOR_COMPARE_MAKS
|
|
|
* are set by set deSetTransparency().
|
|
|
*/
|
|
|
|
|
|
- /* 2D Source Base.
|
|
|
+ /*
|
|
|
+ * 2D Source Base.
|
|
|
* It is an address offset (128 bit aligned)
|
|
|
* from the beginning of frame buffer.
|
|
|
*/
|
|
|
write_dpr(accel, DE_WINDOW_SOURCE_BASE, sBase); /* dpr40 */
|
|
|
|
|
|
- /* 2D Destination Base.
|
|
|
+ /*
|
|
|
+ * 2D Destination Base.
|
|
|
* It is an address offset (128 bit aligned)
|
|
|
* from the beginning of frame buffer.
|
|
|
*/
|
|
|
write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase); /* dpr44 */
|
|
|
|
|
|
- /* Program pitch (distance between the 1st points of two adjacent lines).
|
|
|
+ /*
|
|
|
+ * Program pitch (distance between the 1st points of two adjacent lines).
|
|
|
* Note that input pitch is BYTE value, but the 2D Pitch register uses
|
|
|
* pixel values. Need Byte to pixel conversion.
|
|
|
*/
|
|
@@ -240,7 +246,8 @@ unsigned int rop2) /* ROP value */
|
|
|
DE_PITCH_DESTINATION_MASK) |
|
|
|
(sPitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
|
|
|
|
|
|
- /* Screen Window width in Pixels.
|
|
|
+ /*
|
|
|
+ * Screen Window width in Pixels.
|
|
|
* 2D engine uses this value to calculate the linear address in frame buffer
|
|
|
* for a given point.
|
|
|
*/
|
|
@@ -316,7 +323,8 @@ int hw_imageblit(struct lynx_accel *accel,
|
|
|
if (accel->de_wait() != 0)
|
|
|
return -1;
|
|
|
|
|
|
- /* 2D Source Base.
|
|
|
+ /*
|
|
|
+ * 2D Source Base.
|
|
|
* Use 0 for HOST Blt.
|
|
|
*/
|
|
|
write_dpr(accel, DE_WINDOW_SOURCE_BASE, 0);
|
|
@@ -326,16 +334,19 @@ int hw_imageblit(struct lynx_accel *accel,
|
|
|
* from the beginning of frame buffer.
|
|
|
*/
|
|
|
write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dBase);
|
|
|
- /* Program pitch (distance between the 1st points of two adjacent lines).
|
|
|
- * Note that input pitch is BYTE value, but the 2D Pitch register uses
|
|
|
- * pixel values. Need Byte to pixel conversion.
|
|
|
- */
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Program pitch (distance between the 1st points of two adjacent
|
|
|
+ * lines). Note that input pitch is BYTE value, but the 2D Pitch
|
|
|
+ * register uses pixel values. Need Byte to pixel conversion.
|
|
|
+ */
|
|
|
write_dpr(accel, DE_PITCH,
|
|
|
((dPitch / bytePerPixel << DE_PITCH_DESTINATION_SHIFT) &
|
|
|
DE_PITCH_DESTINATION_MASK) |
|
|
|
(dPitch / bytePerPixel & DE_PITCH_SOURCE_MASK)); /* dpr10 */
|
|
|
|
|
|
- /* Screen Window width in Pixels.
|
|
|
+ /*
|
|
|
+ * Screen Window width in Pixels.
|
|
|
* 2D engine uses this value to calculate the linear address
|
|
|
* in frame buffer for a given point.
|
|
|
*/
|
|
@@ -344,7 +355,8 @@ int hw_imageblit(struct lynx_accel *accel,
|
|
|
DE_WINDOW_WIDTH_DST_MASK) |
|
|
|
(dPitch / bytePerPixel & DE_WINDOW_WIDTH_SRC_MASK));
|
|
|
|
|
|
- /* Note: For 2D Source in Host Write, only X_K1_MONO field is needed,
|
|
|
+ /*
|
|
|
+ * Note: For 2D Source in Host Write, only X_K1_MONO field is needed,
|
|
|
* and Y_K2 field is not used.
|
|
|
* For mono bitmap, use startBit for X_K1.
|
|
|
*/
|