<div dir="ltr">On Thu, Mar 20, 2014 at 6:06 PM, Arthur Borsboom <span dir="ltr"><<a href="mailto:arthurborsboom@gmail.com" target="_blank">arthurborsboom@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Mainly styling fixes of inline documentation<br>
<br>
Signed-off-by: Arthur Borsboom <<a href="mailto:arthurborsboom@gmail.com">arthurborsboom@gmail.com</a>><br></blockquote><div><br></div><div>Hi Arthur<br><br></div><div>I'm not a code style fanatic, but I see a bunch of problems with this patch. If you're going through the hassle of changing stuff in accordance to CodingStyle, you at least need to make sure you're actually following it.<br>
<br></div><div>Maybe this should go through the kernel janitors or kernel newbies mailing lists first.<br><br></div><div>Cheers<br>Patrik<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
drivers/gpu/drm/gma500/framebuffer.c | 36 ++--<br>
drivers/gpu/drm/gma500/psb_intel_display.c | 35 ++--<br>
drivers/gpu/drm/gma500/psb_intel_reg.h | 259 +++++++++++++----------------<br>
drivers/gpu/drm/gma500/psb_irq.c | 64 +++----<br>
4 files changed, 181 insertions(+), 213 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c<br>
index e7fcc14..0dd015a 100644<br>
--- a/drivers/gpu/drm/gma500/framebuffer.c<br>
+++ b/drivers/gpu/drm/gma500/framebuffer.c<br>
@@ -103,8 +103,10 @@ static int psbfb_pan(struct fb_var_screeninfo *var, struct fb_info *info)<br>
* the actual fb is mapped. In our case that isn't quite true.<br>
*/<br>
if (psbfb->gtt->npage) {<br>
- /* GTT roll shifts in 4K pages, we need to shift the right<br>
- number of pages */<br>
+ /*<br>
+ * GTT roll shifts in 4K pages, we need to shift the right<br>
+ number of pages<br>
+ */<br>
int pages = info->fix.line_length >> 12;<br>
psb_gtt_roll(dev, psbfb->gtt, var->yoffset * pages);<br>
}<br>
@@ -229,7 +231,7 @@ static struct fb_ops psbfb_unaccel_ops = {<br>
.fb_ioctl = psbfb_ioctl,<br>
};<br>
<br>
-/**<br>
+/*<br>
* psb_framebuffer_init - initialize a framebuffer<br>
* @dev: our DRM device<br>
* @fb: framebuffer to set up<br>
@@ -270,7 +272,7 @@ static int psb_framebuffer_init(struct drm_device *dev,<br>
return 0;<br>
}<br>
<br>
-/**<br>
+/*<br>
* psb_framebuffer_create - create a framebuffer backed by gt<br>
* @dev: our DRM device<br>
* @mode_cmd: the description of the requested mode<br>
@@ -302,7 +304,7 @@ static struct drm_framebuffer *psb_framebuffer_create<br>
return &fb->base;<br>
}<br>
<br>
-/**<br>
+/*<br>
* psbfb_alloc - allocate frame buffer memory<br>
* @dev: the DRM device<br>
* @aligned_size: space needed<br>
@@ -327,7 +329,7 @@ static struct gtt_range *psbfb_alloc(struct drm_device *dev, int aligned_size)<br>
return NULL;<br>
}<br>
<br>
-/**<br>
+/*<br>
* psbfb_create - create a framebuffer<br>
* @fbdev: the framebuffer device<br>
* @sizes: specification of the layout<br>
@@ -386,9 +388,9 @@ static int psbfb_create(struct psb_fbdev *fbdev,<br>
<br>
if (backing == NULL) {<br>
/*<br>
- * We couldn't get the space we wanted, fall back to the<br>
- * display engine requirement instead. The HW requires<br>
- * the pitch to be 64 byte aligned<br>
+ * We couldn't get the space we wanted, fall back to the<br>
+ * display engine requirement instead. The HW requires<br>
+ * the pitch to be 64 byte aligned<br>
*/<br>
<br>
gtt_roll = 0; /* Don't use GTT accelerated scrolling */<br>
@@ -489,7 +491,7 @@ out_err1:<br>
return ret;<br>
}<br>
<br>
-/**<br>
+/*<br>
* psb_user_framebuffer_create - create framebuffer<br>
* @dev: our DRM device<br>
* @filp: client file<br>
@@ -549,9 +551,11 @@ static int psbfb_probe(struct drm_fb_helper *helper,<br>
if (bytespp == 3) /* no 24bit packed */<br>
bytespp = 4;<br>
<br>
- /* If the mode will not fit in 32bit then switch to 16bit to get<br>
+ /*<br>
+ * If the mode will not fit in 32bit then switch to 16bit to get<br>
a console on full resolution. The X mode setting server will<br>
- allocate its own 32bit GEM framebuffer */<br>
+ allocate its own 32bit GEM framebuffer<br>
+ */<br>
if (ALIGN(sizes->fb_width * bytespp, 64) * sizes->fb_height ><br>
dev_priv->vram_stolen_size) {<br>
sizes->surface_bpp = 16;<br>
@@ -633,7 +637,7 @@ static void psbfb_output_poll_changed(struct drm_device *dev)<br>
drm_fb_helper_hotplug_event(&fbdev->psb_fb_helper);<br>
}<br>
<br>
-/**<br>
+/*<br>
* psb_user_framebuffer_create_handle - add hamdle to a framebuffer<br>
* @fb: framebuffer<br>
* @file_priv: our DRM file<br>
@@ -652,7 +656,7 @@ static int psb_user_framebuffer_create_handle(struct drm_framebuffer *fb,<br>
return drm_gem_handle_create(file_priv, &r->gem, handle);<br>
}<br>
<br>
-/**<br>
+/*<br>
* psb_user_framebuffer_destroy - destruct user created fb<br>
* @fb: framebuffer<br>
*<br>
@@ -666,7 +670,7 @@ static void psb_user_framebuffer_destroy(struct drm_framebuffer *fb)<br>
<br>
/* Let DRM do its clean up */<br>
drm_framebuffer_cleanup(fb);<br>
- /* We are no longer using the resource in GEM */<br>
+ /* We are no longer using the resource in GEM */<br>
drm_gem_object_unreference_unlocked(&r->gem);<br>
kfree(fb);<br>
}<br>
@@ -761,7 +765,7 @@ void psb_modeset_init(struct drm_device *dev)<br>
dev->mode_config.funcs = &psb_mode_funcs;<br>
<br>
/* set memory base */<br>
- /* Oaktrail and Poulsbo should use BAR 2*/<br>
+ /* Oaktrail and Poulsbo should use BAR 2 */<br>
pci_read_config_dword(dev->pdev, PSB_BSM, (u32 *)<br>
&(dev->mode_config.fb_base));<br>
<br>
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c<br>
index 21aed85..b11cbd6 100644<br>
--- a/drivers/gpu/drm/gma500/psb_intel_display.c<br>
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c<br>
@@ -1,5 +1,5 @@<br>
/*<br>
- * Copyright © 2006-2011 Intel Corporation<br>
+ * Copyright © 2006-2011 Intel Corporation<br>
*<br>
* This program is free software; you can redistribute it and/or modify it<br>
* under the terms and conditions of the GNU General Public License,<br>
@@ -53,7 +53,8 @@ static const struct gma_limit_t psb_intel_limits[] = {<br>
.m2 = {.min = 3, .max = 7},<br>
.p = {.min = 7, .max = 98},<br>
.p1 = {.min = 1, .max = 8},<br>
- /* The single-channel range is 25-112Mhz, and dual-channel<br>
+ /*<br>
+ * The single-channel range is 25-112Mhz, and dual-channel<br>
* is 80-224Mhz. Prefer single channel as much as possible.<br>
*/<br>
.p2 = {.dot_limit = 112000, .p2_slow = 14, .p2_fast = 7},<br>
@@ -81,7 +82,7 @@ static void psb_intel_clock(int refclk, struct gma_clock_t *clock)<br>
clock->dot = clock->vco / clock->p;<br>
}<br>
<br>
-/**<br>
+/*<br>
* Return the pipe currently connected to the panel fitter,<br>
* or -1 if the panel fitter is not present or not in use<br>
*/<br>
@@ -226,7 +227,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,<br>
udelay(150);<br>
}<br>
<br>
- /* The LVDS pin pair needs to be on before the DPLLs are enabled.<br>
+ /*<br>
+ * The LVDS pin pair needs to be on before the DPLLs are enabled.<br>
* This is an exception to the general rule that mode_set doesn't turn<br>
* things on.<br>
*/<br>
@@ -238,7 +240,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,<br>
lvds |= LVDS_PIPEB_SELECT;<br>
<br>
lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP;<br>
- /* Set the B0-B3 data pairs corresponding to<br>
+ /*<br>
+ * Set the B0-B3 data pairs corresponding to<br>
* whether we're going to<br>
* set the DPLLs for dual-channel mode or not.<br>
*/<br>
@@ -246,7 +249,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,<br>
if (clock.p2 == 7)<br>
lvds |= LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP;<br>
<br>
- /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP)<br>
+ /*<br>
+ * It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP)<br>
* appropriately here, but we need to look more<br>
* thoroughly into how panels behave in the two modes.<br>
*/<br>
@@ -261,7 +265,7 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,<br>
/* Wait for the clocks to stabilize. */<br>
udelay(150);<br>
<br>
- /* write it again -- the BIOS does, after all */<br>
+ /* Write it again -- the BIOS does, after all */<br>
REG_WRITE(map->dpll, dpll);<br>
<br>
REG_READ(map->dpll);<br>
@@ -280,7 +284,8 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,<br>
((adjusted_mode->crtc_vblank_end - 1) << 16));<br>
REG_WRITE(map->vsync, (adjusted_mode->crtc_vsync_start - 1) |<br>
((adjusted_mode->crtc_vsync_end - 1) << 16));<br>
- /* pipesrc and dspsize control the size that is scaled from,<br>
+ /*<br>
+ * pipesrc and dspsize control the size that is scaled from,<br>
* which should always be the user's requested size.<br>
*/<br>
REG_WRITE(map->size,<br>
@@ -371,7 +376,8 @@ static int psb_intel_crtc_clock_get(struct drm_device *dev,<br>
psb_intel_clock(48000, &clock);<br>
}<br>
<br>
- /* XXX: It would be nice to validate the clocks, but we can't reuse<br>
+ /*<br>
+ * XXX: It would be nice to validate the clocks, but we can't reuse<br>
* i830PllIsValid() because it relies on the xf86_config connector<br>
* configuration being accurate, which it isn't necessarily.<br>
*/<br>
@@ -379,7 +385,7 @@ static int psb_intel_crtc_clock_get(struct drm_device *dev,<br>
return clock.dot;<br>
}<br>
<br>
-/** Returns the currently programmed mode of the given pipe. */<br>
+/* Returns the currently programmed mode of the given pipe. */<br>
struct drm_display_mode *psb_intel_crtc_mode_get(struct drm_device *dev,<br>
struct drm_crtc *crtc)<br>
{<br>
@@ -466,7 +472,8 @@ static void psb_intel_cursor_init(struct drm_device *dev,<br>
struct gtt_range *cursor_gt;<br>
<br>
if (dev_priv->ops->cursor_needs_phys) {<br>
- /* Allocate 4 pages of stolen mem for a hardware cursor. That<br>
+ /*<br>
+ * Allocate 4 pages of stolen mem for a hardware cursor. That<br>
* is enough for the 64 x 64 ARGB cursors we support.<br>
*/<br>
cursor_gt = psb_gtt_alloc_range(dev, 4 * PAGE_SIZE, "cursor", 1,<br>
@@ -495,8 +502,10 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,<br>
int i;<br>
uint16_t *r_base, *g_base, *b_base;<br>
<br>
- /* We allocate a extra array of drm_connector pointers<br>
- * for fbdev after the crtc */<br>
+ /*<br>
+ * We allocate an extra array of drm_connector pointers<br>
+ * for fbdev after the crtc<br>
+ */<br>
gma_crtc = kzalloc(sizeof(struct gma_crtc) +<br>
(INTELFB_CONN_LIMIT * sizeof(struct drm_connector *)),<br>
GFP_KERNEL);<br>
diff --git a/drivers/gpu/drm/gma500/psb_intel_reg.h b/drivers/gpu/drm/gma500/psb_intel_reg.h<br>
index 0be30e4..ec32a06 100644<br>
--- a/drivers/gpu/drm/gma500/psb_intel_reg.h<br>
+++ b/drivers/gpu/drm/gma500/psb_intel_reg.h<br>
@@ -17,9 +17,7 @@<br>
#ifndef __PSB_INTEL_REG_H__<br>
#define __PSB_INTEL_REG_H__<br>
<br>
-/*<br>
- * GPIO regs<br>
- */<br>
+/* GPIO regs */<br>
#define GPIOA 0x5010<br>
#define GPIOB 0x5014<br>
#define GPIOC 0x5018<br>
@@ -254,7 +252,7 @@<br>
#define DPLL_LOCK (1 << 15) /* CDV */<br>
<br>
/*<br>
- * The i830 generation, in DAC/serial mode, defines p1 as two plus this<br>
+ * The i830 generation, in DAC/serial mode, defines p1 as two plus this<br>
* bitfield, or just 2 if PLL_P1_DIVIDE_BY_TWO is set.<br>
*/<br>
# define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000<br>
@@ -292,9 +290,7 @@<br>
#define SDVO_MULTIPLIER_SHIFT_HIRES 4<br>
#define SDVO_MULTIPLIER_SHIFT_VGA 0<br>
<br>
-/*<br>
- * PLL_MD<br>
- */<br>
+/* PLL_MD */<br>
/* Pipe A SDVO/UDI clock multiplier/divider register for G965. */<br>
#define DPLL_A_MD 0x0601c<br>
/* Pipe B SDVO/UDI clock multiplier/divider register for G965. */<br>
@@ -385,7 +381,7 @@<br>
#define TV_HOTPLUG_INT_EN (1 << 18)<br>
#define CRT_HOTPLUG_INT_EN (1 << 9)<br>
#define CRT_HOTPLUG_FORCE_DETECT (1 << 3)<br>
-/* CDV.. */<br>
+/* CDV */<br>
#define CRT_HOTPLUG_ACTIVATION_PERIOD_64 (1 << 8)<br>
#define CRT_HOTPLUG_DAC_ON_TIME_2M (0 << 7)<br>
#define CRT_HOTPLUG_DAC_ON_TIME_4M (1 << 7)<br>
@@ -419,7 +415,7 @@<br>
#define SDVO_COLOR_RANGE_16_235 (1 << 8)<br>
#define SDVO_AUDIO_ENABLE (1 << 6)<br>
<br>
-/**<br>
+/*<br>
* 915G/GM SDVO pixel multiplier.<br>
*<br>
* Programmed value is multiplier - 1, up to 5x.<br>
@@ -702,9 +698,7 @@ struct dpst_guardband {<br>
#define VGA_2X_MODE (1 << 30)<br>
#define VGA_PIPE_B_SELECT (1 << 29)<br>
<br>
-/*<br>
- * Overlay registers<br>
- */<br>
+/* Overlay registers */<br>
#define OV_C_OFFSET 0x08000<br>
#define OV_OVADD 0x30000<br>
#define OV_DOVASTA 0x30008<br>
@@ -739,9 +733,7 @@ struct dpst_guardband {<br>
#define SWF5 0x71424<br>
#define SWF6 0x71428<br>
<br>
-/*<br>
- * 855 scratch registers.<br>
- */<br>
+/* 855 scratch registers */<br>
#define SWF00 0x70410<br>
#define SWF01 0x70414<br>
#define SWF02 0x70418<br>
@@ -762,10 +754,7 @@ struct dpst_guardband {<br>
#define SWF31 0x72418<br>
#define SWF32 0x7241c<br>
<br>
-<br>
-/*<br>
- * Palette registers<br>
- */<br>
+/* Palette registers */<br>
#define PALETTE_A 0x0a000<br>
#define PALETTE_B 0x0a800<br>
#define PALETTE_C 0x0ac00<br>
@@ -789,17 +778,13 @@ struct dpst_guardband {<br>
#define CURCBASE 0x700e4<br>
#define CURCPOS 0x700e8<br>
<br>
-/*<br>
- * Interrupt Registers<br>
- */<br>
+/* Interrupt Registers */<br>
#define IER 0x020a0<br>
#define IIR 0x020a4<br>
#define IMR 0x020a8<br>
#define ISR 0x020ac<br>
<br>
-/*<br>
- * MOORESTOWN delta registers<br>
- */<br>
+/* MOORESTOWN delta registers */<br>
#define MRST_DPLL_A 0x0f014<br>
#define MDFLD_DPLL_B 0x0f018<br>
#define MDFLD_INPUT_REF_SEL (1 << 14)<br>
@@ -814,9 +799,7 @@ struct dpst_guardband {<br>
#define MDFLD_DPLL_DIV1 0x0f04c<br>
#define MRST_PERF_MODE 0x020f4<br>
<br>
-/*<br>
- * MEDFIELD HDMI registers<br>
- */<br>
+/* MEDFIELD HDMI registers */<br>
#define HDMIPHYMISCCTL 0x61134<br>
#define HDMI_PHY_POWER_DOWN 0x7f<br>
#define HDMIB_CONTROL 0x61140<br>
@@ -862,13 +845,9 @@ struct dpst_guardband {<br>
#define MRST_DSPBBASE 0x7119c<br>
#define MDFLD_DSPCBASE 0x7219c<br>
<br>
-/*<br>
- * Moorestown registers.<br>
- */<br>
+/* Moorestown registers */<br>
<br>
-/*<br>
- * MIPI IP registers<br>
- */<br>
+/* MIPI IP registers */<br>
#define MIPIC_REG_OFFSET 0x800<br>
<br>
#define DEVICE_READY_REG 0xb000<br>
@@ -998,9 +977,7 @@ struct dpst_guardband {<br>
#define DBI_BW_CTRL_REG 0xb084<br>
#define CLK_LANE_SWT_REG 0xb088<br>
<br>
-/*<br>
- * MIPI Adapter registers<br>
- */<br>
+/* MIPI Adapter registers */<br>
#define MIPI_CONTROL_REG 0xb104<br>
#define MIPI_2X_CLOCK_BITS ((1 << 0) | (1 << 1))<br>
#define MIPI_DATA_ADDRESS_REG 0xb108<br>
@@ -1020,161 +997,149 @@ struct dpst_guardband {<br>
/* DBI COMMANDS */<br>
#define soft_reset 0x01<br>
/*<br>
- * The display module performs a software reset.<br>
- * Registers are written with their SW Reset default values.<br>
+ * The display module performs a software reset.<br>
+ * Registers are written with their SW Reset default values.<br>
*/<br>
#define get_power_mode 0x0a<br>
-/*<br>
- * The display module returns the current power mode<br>
- */<br>
+/* The display module returns the current power mode */<br>
#define get_address_mode 0x0b<br>
-/*<br>
- * The display module returns the current status.<br>
- */<br>
+/* The display module returns the current status */<br>
#define get_pixel_format 0x0c<br>
/*<br>
- * This command gets the pixel format for the RGB image data<br>
- * used by the interface.<br>
+ * This command gets the pixel format for the RGB image data<br>
+ * used by the interface.<br>
*/<br>
#define get_display_mode 0x0d<br>
-/*<br>
- * The display module returns the Display Image Mode status.<br>
- */<br>
+/* The display module returns the Display Image Mode status */<br>
#define get_signal_mode 0x0e<br>
-/*<br>
- * The display module returns the Display Signal Mode.<br>
- */<br>
+/* The display module returns the Display Signal Mode */<br>
#define get_diagnostic_result 0x0f<br>
/*<br>
- * The display module returns the self-diagnostic results following<br>
- * a Sleep Out command.<br>
+ * The display module returns the self-diagnostic results following<br>
+ * a Sleep Out command.<br>
*/<br>
#define enter_sleep_mode 0x10<br>
/*<br>
- * This command causes the display module to enter the Sleep mode.<br>
- * In this mode, all unnecessary blocks inside the display module are<br>
- * disabled except interface communication. This is the lowest power<br>
- * mode the display module supports.<br>
+ * This command causes the display module to enter the Sleep mode.<br>
+ * In this mode, all unnecessary blocks inside the display module are<br>
+ * disabled except interface communication. This is the lowest power<br>
+ * mode the display module supports.<br>
*/<br>
#define exit_sleep_mode 0x11<br>
/*<br>
- * This command causes the display module to exit Sleep mode.<br>
- * All blocks inside the display module are enabled.<br>
+ * This command causes the display module to exit Sleep mode.<br>
+ * All blocks inside the display module are enabled.<br>
*/<br>
#define enter_partial_mode 0x12<br>
/*<br>
- * This command causes the display module to enter the Partial Display<br>
- * Mode. The Partial Display Mode window is described by the<br>
- * set_partial_area command.<br>
+ * This command causes the display module to enter the Partial Display<br>
+ * Mode. The Partial Display Mode window is described by the<br>
+ * set_partial_area command.<br>
*/<br>
#define enter_normal_mode 0x13<br>
/*<br>
- * This command causes the display module to enter the Normal mode.<br>
- * Normal Mode is defined as Partial Display mode and Scroll mode are off<br>
+ * This command causes the display module to enter the Normal mode.<br>
+ * Normal Mode is defined as Partial Display mode and Scroll mode are off<br>
*/<br>
#define exit_invert_mode 0x20<br>
/*<br>
- * This command causes the display module to stop inverting the image<br>
- * data on the display device. The frame memory contents remain unchanged.<br>
- * No status bits are changed.<br>
+ * This command causes the display module to stop inverting the image<br>
+ * data on the display device. The frame memory contents remain unchanged.<br>
+ * No status bits are changed.<br>
*/<br>
#define enter_invert_mode 0x21<br>
/*<br>
- * This command causes the display module to invert the image data only on<br>
- * the display device. The frame memory contents remain unchanged.<br>
- * No status bits are changed.<br>
+ * This command causes the display module to invert the image data only on<br>
+ * the display device. The frame memory contents remain unchanged.<br>
+ * No status bits are changed.<br>
*/<br>
#define set_gamma_curve 0x26<br>
/*<br>
- * This command selects the desired gamma curve for the display device.<br>
- * Four fixed gamma curves are defined in section DCS spec.<br>
+ * This command selects the desired gamma curve for the display device.<br>
+ * Four fixed gamma curves are defined in section DCS spec.<br>
*/<br>
#define set_display_off 0x28<br>
-/* ************************************************************************* *\<br>
-This command causes the display module to stop displaying the image data<br>
-on the display device. The frame memory contents remain unchanged.<br>
-No status bits are changed.<br>
-\* ************************************************************************* */<br>
+/*<br>
+ * This command causes the display module to stop displaying the image data<br>
+ * on the display device. The frame memory contents remain unchanged.<br>
+ * No status bits are changed.<br>
+ */<br>
#define set_display_on 0x29<br>
-/* ************************************************************************* *\<br>
-This command causes the display module to start displaying the image data<br>
-on the display device. The frame memory contents remain unchanged.<br>
-No status bits are changed.<br>
-\* ************************************************************************* */<br>
+/*<br>
+ * This command causes the display module to start displaying the image data<br>
+ * on the display device. The frame memory contents remain unchanged.<br>
+ * No status bits are changed.<br>
+ */<br>
#define set_column_address 0x2a<br>
/*<br>
- * This command defines the column extent of the frame memory accessed by<br>
- * the hostprocessor with the read_memory_continue and<br>
- * write_memory_continue commands.<br>
- * No status bits are changed.<br>
+ * This command defines the column extent of the frame memory accessed by<br>
+ * the hostprocessor with the read_memory_continue and<br>
+ * write_memory_continue commands.<br>
+ * No status bits are changed.<br>
*/<br>
#define set_page_addr 0x2b<br>
/*<br>
- * This command defines the page extent of the frame memory accessed by<br>
- * the host processor with the write_memory_continue and<br>
- * read_memory_continue command.<br>
- * No status bits are changed.<br>
+ * This command defines the page extent of the frame memory accessed by<br>
+ * the host processor with the write_memory_continue and<br>
+ * read_memory_continue command.<br>
+ * No status bits are changed.<br>
*/<br>
#define write_mem_start 0x2c<br>
/*<br>
- * This command transfers image data from the host processor to the<br>
- * display modules frame memory starting at the pixel location specified<br>
- * by preceding set_column_address and set_page_address commands.<br>
+ * This command transfers image data from the host processor to the<br>
+ * display modules frame memory starting at the pixel location specified<br>
+ * by preceding set_column_address and set_page_address commands.<br>
*/<br>
#define set_partial_area 0x30<br>
/*<br>
- * This command defines the Partial Display mode s display area.<br>
- * There are two parameters associated with this command, the first<br>
- * defines the Start Row (SR) and the second the End Row (ER). SR and ER<br>
- * refer to the Frame Memory Line Pointer.<br>
+ * This command defines the Partial Display mode s display area.<br>
+ * There are two parameters associated with this command, the first<br>
+ * defines the Start Row (SR) and the second the End Row (ER). SR and ER<br>
+ * refer to the Frame Memory Line Pointer.<br>
*/<br>
#define set_scroll_area 0x33<br>
-/*<br>
- * This command defines the display modules Vertical Scrolling Area.<br>
- */<br>
+/* This command defines the display modules Vertical Scrolling Area. */<br>
#define set_tear_off 0x34<br>
/*<br>
- * This command turns off the display modules Tearing Effect output<br>
- * signal on the TE signal line.<br>
+ * This command turns off the display modules Tearing Effect output<br>
+ * signal on the TE signal line.<br>
*/<br>
#define set_tear_on 0x35<br>
/*<br>
- * This command turns on the display modules Tearing Effect output signal<br>
- * on the TE signal line.<br>
+ * This command turns on the display modules Tearing Effect output signal<br>
+ * on the TE signal line.<br>
*/<br>
#define set_address_mode 0x36<br>
/*<br>
- * This command sets the data order for transfers from the host processor<br>
- * to display modules frame memory,bits B[7:5] and B3, and from the<br>
- * display modules frame memory to the display device, bits B[2:0] and B4.<br>
+ * This command sets the data order for transfers from the host processor<br>
+ * to display modules frame memory,bits B[7:5] and B3, and from the<br>
+ * display modules frame memory to the display device, bits B[2:0] and B4.<br>
*/<br>
#define set_scroll_start 0x37<br>
/*<br>
- * This command sets the start of the vertical scrolling area in the frame<br>
- * memory. The vertical scrolling area is fully defined when this command<br>
- * is used with the set_scroll_area command The set_scroll_start command<br>
- * has one parameter, the Vertical Scroll Pointer. The VSP defines the<br>
- * line in the frame memory that is written to the display device as the<br>
- * first line of the vertical scroll area.<br>
+ * This command sets the start of the vertical scrolling area in the frame<br>
+ * memory. The vertical scrolling area is fully defined when this command<br>
+ * is used with the set_scroll_area command The set_scroll_start command<br>
+ * has one parameter, the Vertical Scroll Pointer. The VSP defines the<br>
+ * line in the frame memory that is written to the display device as the<br>
+ * first line of the vertical scroll area.<br>
*/<br>
#define exit_idle_mode 0x38<br>
-/*<br>
- * This command causes the display module to exit Idle mode.<br>
- */<br>
+/* This command causes the display module to exit Idle mode. */<br>
#define enter_idle_mode 0x39<br>
/*<br>
- * This command causes the display module to enter Idle Mode.<br>
- * In Idle Mode, color expression is reduced. Colors are shown on the<br>
- * display device using the MSB of each of the R, G and B color<br>
- * components in the frame memory<br>
+ * This command causes the display module to enter Idle Mode.<br>
+ * In Idle Mode, color expression is reduced. Colors are shown on the<br>
+ * display device using the MSB of each of the R, G and B color<br>
+ * components in the frame memory<br>
*/<br>
#define set_pixel_format 0x3a<br>
/*<br>
- * This command sets the pixel format for the RGB image data used by the<br>
- * interface.<br>
- * Bits D[6:4] DPI Pixel Format Definition<br>
- * Bits D[2:0] DBI Pixel Format Definition<br>
- * Bits D7 and D3 are not used.<br>
+ * This command sets the pixel format for the RGB image data used by the<br>
+ * interface.<br>
+ * Bits D[6:4] DPI Pixel Format Definition<br>
+ * Bits D[2:0] DBI Pixel Format Definition<br>
+ * Bits D7 and D3 are not used.<br>
*/<br>
#define DCS_PIXEL_FORMAT_3bpp 0x1<br>
#define DCS_PIXEL_FORMAT_8bpp 0x2<br>
@@ -1186,23 +1151,23 @@ No status bits are changed.<br>
#define write_mem_cont 0x3c<br>
<br>
/*<br>
- * This command transfers image data from the host processor to the<br>
- * display module's frame memory continuing from the pixel location<br>
- * following the previous write_memory_continue or write_memory_start<br>
- * command.<br>
+ * This command transfers image data from the host processor to the<br>
+ * display module's frame memory continuing from the pixel location<br>
+ * following the previous write_memory_continue or write_memory_start<br>
+ * command.<br>
*/<br>
#define set_tear_scanline 0x44<br>
/*<br>
- * This command turns on the display modules Tearing Effect output signal<br>
- * on the TE signal line when the display module reaches line N.<br>
+ * This command turns on the display modules Tearing Effect output signal<br>
+ * on the TE signal line when the display module reaches line N.<br>
*/<br>
#define get_scanline 0x45<br>
/*<br>
- * The display module returns the current scanline, N, used to update the<br>
- * display device. The total number of scanlines on a display device is<br>
- * defined as VSYNC + VBP + VACT + VFP.The first scanline is defined as<br>
- * the first line of V Sync and is denoted as Line 0.<br>
- * When in Sleep Mode, the value returned by get_scanline is undefined.<br>
+ * The display module returns the current scanline, N, used to update the<br>
+ * display device. The total number of scanlines on a display device is<br>
+ * defined as VSYNC + VBP + VACT + VFP.The first scanline is defined as<br>
+ * the first line of V Sync and is denoted as Line 0.<br>
+ * When in Sleep Mode, the value returned by get_scanline is undefined.<br>
*/<br>
<br>
/* MCS or Generic COMMANDS */<br>
@@ -1404,7 +1369,8 @@ No status bits are changed.<br>
#define DP_VOLTAGE_MASK (7 << 25)<br>
#define DP_VOLTAGE_SHIFT 25<br>
<br>
-/* Signal pre-emphasis levels, like voltages, the other end tells us what<br>
+/*<br>
+ * Signal pre-emphasis levels, like voltages, the other end tells us what<br>
* they want<br>
*/<br>
#define DP_PRE_EMPHASIS_0 (0 << 22)<br>
@@ -1423,29 +1389,30 @@ No status bits are changed.<br>
/* Mystic DPCD version 1.1 special mode */<br>
#define DP_ENHANCED_FRAMING (1 << 18)<br>
<br>
-/** locked once port is enabled */<br>
+/* locked once port is enabled */<br>
#define DP_PORT_REVERSAL (1 << 15)<br>
<br>
-/** sends the clock on lane 15 of the PEG for debug */<br>
+/* sends the clock on lane 15 of the PEG for debug */<br>
#define DP_CLOCK_OUTPUT_ENABLE (1 << 13)<br>
<br>
#define DP_SCRAMBLING_DISABLE (1 << 12)<br>
#define DP_SCRAMBLING_DISABLE_IRONLAKE (1 << 7)<br>
<br>
-/** limit RGB values to avoid confusing TVs */<br>
+/* limit RGB values to avoid confusing TVs */<br>
#define DP_COLOR_RANGE_16_235 (1 << 8)<br>
<br>
-/** Turn on the audio link */<br>
+/* Turn on the audio link */<br>
#define DP_AUDIO_OUTPUT_ENABLE (1 << 6)<br>
<br>
-/** vs and hs sync polarity */<br>
+/* vs and hs sync polarity */<br>
#define DP_SYNC_VS_HIGH (1 << 4)<br>
#define DP_SYNC_HS_HIGH (1 << 3)<br>
<br>
-/** A fantasy */<br>
+/* A fantasy */<br>
#define DP_DETECTED (1 << 2)<br>
<br>
-/** The aux channel provides a way to talk to the<br>
+/*<br>
+ * The aux channel provides a way to talk to the<br>
* signal sink for DDC etc. Max packet size supported<br>
* is 20 bytes in each direction, hence the 5 fixed<br>
* data registers<br>
diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c<br>
index 624eb36..ba3fd4f 100644<br>
--- a/drivers/gpu/drm/gma500/psb_irq.c<br>
+++ b/drivers/gpu/drm/gma500/psb_irq.c<br>
@@ -19,8 +19,6 @@<br>
* develop this driver.<br>
*<br>
**************************************************************************/<br>
-/*<br>
- */<br>
<br>
#include <drm/drmP.h><br>
#include "psb_drv.h"<br>
@@ -30,10 +28,7 @@<br>
#include "psb_irq.h"<br>
#include "mdfld_output.h"<br>
<br>
-/*<br>
- * inline functions<br>
- */<br>
-<br>
+/* inline functions */<br>
static inline u32<br>
psb_pipestat(int pipe)<br>
{<br>
@@ -139,10 +134,7 @@ static void mid_disable_pipe_event(struct drm_psb_private *dev_priv, int pipe)<br>
}<br>
}<br>
<br>
-/**<br>
- * Display controller interrupt handler for pipe event.<br>
- *<br>
- */<br>
+/* Display controller interrupt handler for pipe event */<br>
static void mid_pipe_event_handler(struct drm_device *dev, int pipe)<br>
{<br>
struct drm_psb_private *dev_priv =<br>
@@ -163,8 +155,10 @@ static void mid_pipe_event_handler(struct drm_device *dev, int pipe)<br>
<br>
spin_unlock(&dev_priv->irqmask_lock);<br>
<br>
- /* Clear the 2nd level interrupt status bits<br>
- * Sometimes the bits are very sticky so we repeat until they unstick */<br>
+ /*<br>
+ * Clear the 2nd level interrupt status bits<br>
+ * Sometimes the bits are very sticky so we repeat until they unstick<br>
+ */<br>
for (i = 0; i < 0xffff; i++) {<br>
PSB_WVDC32(PSB_RVDC32(pipe_stat_reg), pipe_stat_reg);<br>
pipe_clear = PSB_RVDC32(pipe_stat_reg) & pipe_status;<br>
@@ -185,9 +179,7 @@ static void mid_pipe_event_handler(struct drm_device *dev, int pipe)<br>
drm_handle_vblank(dev, pipe);<br>
}<br>
<br>
-/*<br>
- * Display controller interrupt handler.<br>
- */<br>
+/* Display controller interrupt handler */<br>
static void psb_vdc_interrupt(struct drm_device *dev, uint32_t vdc_stat)<br>
{<br>
if (vdc_stat & _PSB_IRQ_ASLE)<br>
@@ -200,9 +192,7 @@ static void psb_vdc_interrupt(struct drm_device *dev, uint32_t vdc_stat)<br>
mid_pipe_event_handler(dev, 1);<br>
}<br>
<br>
-/*<br>
- * SGX interrupt handler<br>
- */<br>
+/* SGX interrupt handler */<br>
static void psb_sgx_interrupt(struct drm_device *dev, u32 stat_1, u32 stat_2)<br>
{<br>
struct drm_psb_private *dev_priv = dev->dev_private;<br>
@@ -267,7 +257,8 @@ irqreturn_t psb_irq_handler(int irq, void *arg)<br>
if (vdc_stat & (_PSB_PIPE_EVENT_FLAG|_PSB_IRQ_ASLE))<br>
dsp_int = 1;<br>
<br>
- /* FIXME: Handle Medfield<br>
+ /*<br>
+ * FIXME: Handle Medfield<br>
if (vdc_stat & _MDFLD_DISP_ALL_IRQ_FLAG)<br>
dsp_int = 1;<br>
*/<br>
@@ -292,8 +283,10 @@ irqreturn_t psb_irq_handler(int irq, void *arg)<br>
handled = 1;<br>
}<br>
<br>
- /* Note: this bit has other meanings on some devices, so we will<br>
- need to address that later if it ever matters */<br>
+ /*<br>
+ * Note: this bit has other meanings on some devices, so we will<br>
+ need to address that later if it ever matters<br>
+ */<br>
if (hotplug_int && dev_priv->ops->hotplug) {<br>
handled = dev_priv->ops->hotplug(dev);<br>
REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));<br>
@@ -336,7 +329,7 @@ void psb_irq_preinstall(struct drm_device *dev)<br>
dev_priv->vdc_irq_mask |= _MDFLD_PIPEC_EVENT_FLAG;<br>
*/<br>
<br>
- /* Revisit this area - want per device masks ? */<br>
+ /* TODO: Revisit this area - want per device masks ? */<br>
if (dev_priv->ops->hotplug)<br>
dev_priv->vdc_irq_mask |= _PSB_IRQ_DISP_HOTSYNC;<br>
dev_priv->vdc_irq_mask |= _PSB_IRQ_ASLE | _PSB_IRQ_SGX_FLAG;<br>
@@ -461,7 +454,7 @@ int psb_irq_enable_dpst(struct drm_device *dev)<br>
<br>
spin_lock_irqsave(&dev_priv->irqmask_lock, irqflags);<br>
<br>
- /* enable DPST */<br>
+ /* Enable DPST */<br>
mid_enable_pipe_event(dev_priv, 0);<br>
psb_irq_turn_on_dpst(dev);<br>
<br>
@@ -507,9 +500,7 @@ int psb_irq_disable_dpst(struct drm_device *dev)<br>
return 0;<br>
}<br>
<br>
-/*<br>
- * It is used to enable VBLANK interrupt<br>
- */<br>
+/* It is used to enable VBLANK interrupt */<br>
int psb_enable_vblank(struct drm_device *dev, int pipe)<br>
{<br>
struct drm_psb_private *dev_priv = dev->dev_private;<br>
@@ -517,8 +508,10 @@ int psb_enable_vblank(struct drm_device *dev, int pipe)<br>
uint32_t reg_val = 0;<br>
uint32_t pipeconf_reg = mid_pipeconf(pipe);<br>
<br>
- /* Medfield is different - we should perhaps extract out vblank<br>
- and blacklight etc ops */<br>
+ /*<br>
+ * Medfield is different - we should perhaps extract out vblank<br>
+ * and blacklight etc ops<br>
+ */<br>
if (IS_MFLD(dev))<br>
return mdfld_enable_te(dev, pipe);<br>
<br>
@@ -546,9 +539,7 @@ int psb_enable_vblank(struct drm_device *dev, int pipe)<br>
return 0;<br>
}<br>
<br>
-/*<br>
- * It is used to disable VBLANK interrupt<br>
- */<br>
+/* It is used to disable VBLANK interrupt */<br>
void psb_disable_vblank(struct drm_device *dev, int pipe)<br>
{<br>
struct drm_psb_private *dev_priv = dev->dev_private;<br>
@@ -570,9 +561,7 @@ void psb_disable_vblank(struct drm_device *dev, int pipe)<br>
spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags);<br>
}<br>
<br>
-/*<br>
- * It is used to enable TE interrupt<br>
- */<br>
+/* It is used to enable TE interrupt */<br>
int mdfld_enable_te(struct drm_device *dev, int pipe)<br>
{<br>
struct drm_psb_private *dev_priv =<br>
@@ -599,9 +588,7 @@ int mdfld_enable_te(struct drm_device *dev, int pipe)<br>
return 0;<br>
}<br>
<br>
-/*<br>
- * It is used to disable TE interrupt<br>
- */<br>
+/* It is used to disable TE interrupt */<br>
void mdfld_disable_te(struct drm_device *dev, int pipe)<br>
{<br>
struct drm_psb_private *dev_priv =<br>
@@ -619,7 +606,8 @@ void mdfld_disable_te(struct drm_device *dev, int pipe)<br>
spin_unlock_irqrestore(&dev_priv->irqmask_lock, irqflags);<br>
}<br>
<br>
-/* Called from drm generic code, passed a 'crtc', which<br>
+/*<br>
+ * Called from drm generic code, passed a 'crtc', which<br>
* we use as a pipe index<br>
*/<br>
u32 psb_get_vblank_counter(struct drm_device *dev, int pipe)<br>
<span class=""><font color="#888888">--<br>
1.9.0<br>
<br>
</font></span></blockquote></div><br></div></div>