Commit e2e88603 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

gma500: CodingStyle pass



Start the style cleanup

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2cf10d23
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ struct mrst_vbt {
	u8 size;
	u8 checksum;
	void *mrst_gct;
} __attribute__ ((packed));
} __packed;

struct mrst_timing_info {
	u16 pixel_clock;
@@ -58,7 +58,7 @@ struct mrst_timing_info {
	u8 stereo:1;
	u8 unknown6:1;
	u8 interlaced:1;
} __attribute__((packed));
} __packed;

struct gct_r10_timing_info {
	u16 pixel_clock;
@@ -82,7 +82,7 @@ struct gct_r10_timing_info {
	u16 vsync_pulse_width_hi:2;
	u16 vsync_positive:1;
	u16 rsvd_2:3;
} __attribute__((packed));
} __packed;

struct mrst_panel_descriptor_v1 {
	u32 Panel_Port_Control; /* 1 dword, Register 0x61180 if LVDS */
@@ -111,7 +111,7 @@ struct mrst_panel_descriptor_v1 {
			/* Bit 6, Reserved, 2 bits, 00b */
			/* Bit 8, Minimum Supported Frame Rate, 6 bits, 0 - 63Hz */
			/* Bit 14, Reserved, 2 bits, 00b */
} __attribute__ ((packed));
} __packed;

struct mrst_panel_descriptor_v2 {
	u32 Panel_Port_Control; /* 1 dword, Register 0x61180 if LVDS */
@@ -141,7 +141,7 @@ struct mrst_panel_descriptor_v2 {
			/* Bit 6, Reserved, 2 bits, 00b */
			/* Bit 8, Minimum Supported Frame Rate, 6 bits, 0 - 63Hz */
			/* Bit 14, Reserved, 2 bits, 00b */
} __attribute__ ((packed));
} __packed;

union mrst_panel_rx {
	struct {
@@ -159,7 +159,7 @@ union mrst_panel_rx {
		u16 Rsvd:5;/*5 bits,00000b */
	} panelrx;
	u16 panel_receiver;
} __attribute__ ((packed));
} __packed;

struct mrst_gct_v1 {
	union { /*8 bits,Defined as follows: */
@@ -176,7 +176,7 @@ struct mrst_gct_v1 {
	};
	struct mrst_panel_descriptor_v1 panel[4];/*panel descrs,38 bytes each*/
	union mrst_panel_rx panelrx[4]; /* panel receivers*/
} __attribute__ ((packed));
} __packed;

struct mrst_gct_v2 {
	union { /*8 bits,Defined as follows: */
@@ -193,7 +193,7 @@ struct mrst_gct_v2 {
	};
	struct mrst_panel_descriptor_v2 panel[4];/*panel descrs,38 bytes each*/
	union mrst_panel_rx panelrx[4]; /* panel receivers*/
} __attribute__ ((packed));
} __packed;

struct mrst_gct_data {
	u8 bpi; /* boot panel index, number of panel used during boot */
@@ -205,13 +205,13 @@ struct mrst_gct_data {
	u32 PP_Cycle_Delay;
	u16 Panel_Backlight_Inverter_Descriptor;
	u16 Panel_MIPI_Display_Descriptor;
} __attribute__ ((packed));
} __packed;

#define MODE_SETTING_IN_CRTC		0x1
#define MODE_SETTING_IN_ENCODER		0x2
#define MODE_SETTING_ON_GOING		0x3
#define MODE_SETTING_IN_DSR		0x4
#define MODE_SETTING_ENCODER_DONE	0x8

#define GCT_R10_HEADER_SIZE		16
#define GCT_R10_DISPLAY_DESC_SIZE	28
+12 −11
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ void psb_spank(struct drm_psb_private *dev_priv)
		_PSB_CS_RESET_TA_RESET | _PSB_CS_RESET_USE_RESET |
		_PSB_CS_RESET_ISP_RESET | _PSB_CS_RESET_TSP_RESET |
		_PSB_CS_RESET_TWOD_RESET, PSB_CR_SOFT_RESET);
	(void) PSB_RSGX32(PSB_CR_SOFT_RESET);
	PSB_RSGX32(PSB_CR_SOFT_RESET);

	msleep(1);

@@ -99,9 +99,10 @@ int psbfb_2d_submit(struct drm_psb_private *dev_priv, uint32_t *cmdbuf,
			return ret;

		submit_size <<= 2;
		for (i = 0; i < submit_size; i += 4) {

		for (i = 0; i < submit_size; i += 4)
			PSB_WSGX32(*cmdbuf++, PSB_SGX_2D_SLAVE_PORT + i);
		}

		(void)PSB_RSGX32(PSB_SGX_2D_SLAVE_PORT + i - 4);
	}
	return 0;
+11 −14
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ module_param_named(no_fb, drm_psb_no_fb, int, 0600);
module_param_named(trap_pagefaults, drm_psb_trap_pagefaults, int, 0600);


static struct pci_device_id pciidlist[] = {
static DEFINE_PCI_DEVICE_TABLE(pciidlist) = {
	{ 0x8086, 0x8108, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PSB_8108 },
	{ 0x8086, 0x8109, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PSB_8109 },
	{ 0x8086, 0x4100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_MRST_4100},
@@ -185,8 +185,7 @@ void mrst_get_fuse_settings(struct drm_device *dev)
	 if (dev_priv->iLVDS_enable) {
		dev_priv->is_lvds_on = true;
		dev_priv->is_mipi_on = false;
	}
	else {
	} else {
		dev_priv->is_mipi_on = true;
		dev_priv->is_lvds_on = false;
	}
@@ -455,7 +454,6 @@ static int psb_do_init(struct drm_device *dev)

	/* mmu_gatt ?? */
	PSB_WSGX32(pg->gatt_start, PSB_CR_BIF_TWOD_REQ_BASE);

	return 0;
out_err:
	psb_do_takedown(dev);
@@ -1335,7 +1333,6 @@ static long psb_unlocked_ioctl(struct file *filp, unsigned int cmd,
		dev_priv->rpm_enabled = 1;
	}
	return drm_ioctl(filp, cmd, arg);
	
	/* FIXME: do we need to wrap the other side of this */
}

+34 −29
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@

#include <drm/drmP.h>
#include "drm_global.h"
#include "gem_glue.h"
#include "psb_drm.h"
#include "psb_reg.h"
#include "psb_intel_drv.h"
@@ -132,8 +133,12 @@ enum {
#define _LNC_IRQ_TOPAZ_FLAG	  (1<<20)

/* This flag includes all the display IRQ bits excepts the vblank irqs. */
#define _MDFLD_DISP_ALL_IRQ_FLAG (_MDFLD_PIPEC_EVENT_FLAG | _MDFLD_PIPEB_EVENT_FLAG | \
        _PSB_PIPEA_EVENT_FLAG | _PSB_VSYNC_PIPEA_FLAG | _MDFLD_MIPIA_FLAG | _MDFLD_MIPIC_FLAG)
#define _MDFLD_DISP_ALL_IRQ_FLAG (_MDFLD_PIPEC_EVENT_FLAG | \
				  _MDFLD_PIPEB_EVENT_FLAG | \
				  _PSB_PIPEA_EVENT_FLAG | \
				  _PSB_VSYNC_PIPEA_FLAG | \
				  _MDFLD_MIPIA_FLAG | \
				  _MDFLD_MIPIC_FLAG)
#define PSB_INT_IDENTITY_R	  0x20A4
#define PSB_INT_MASK_R		  0x20A8
#define PSB_INT_ENABLE_R	  0x20A0
@@ -662,7 +667,6 @@ extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
extern int drm_psb_no_fb;
extern int drm_idle_check_interval;


/*
 *	Utilities
 */
@@ -747,9 +751,10 @@ static inline void REGISTER_WRITE8(struct drm_device *dev,
#define PSB_RSGX32(_offs)						\
({									\
	if (inl(dev_priv->apm_base + PSB_APM_STS) & 0x3) {		\
	printk(KERN_ERR "access sgx when it's off!! (READ) %s, %d\n", \
		printk(KERN_ERR						\
			"access sgx when it's off!! (READ) %s, %d\n",	\
	       __FILE__, __LINE__);					\
	mdelay(1000);						\
		melay(1000);						\
	}								\
	ioread32(dev_priv->sgx_reg + (_offs));				\
})
+76 −69
Original line number Diff line number Diff line
@@ -244,9 +244,11 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma)

	fb_screen_base = (char *)info->screen_base;

        /* If this is a GEM object then info->screen_base is the virtual
           kernel remapping of the object. FIXME: Review if this is
           suitable for our mmap work */
	/*
	 * If this is a GEM object then info->screen_base is the virtual
	 * kernel remapping of the object. FIXME: Review if this is
	 * suitable for our mmap work
	 */
	vma->vm_ops = &psbfb_vm_ops;
	vma->vm_private_data = (void *)psbfb;
	vma->vm_flags |= VM_RESERVED | VM_IO |
@@ -254,7 +256,8 @@ static int psbfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
	return 0;
}

static int psbfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
static int psbfb_ioctl(struct fb_info *info, unsigned int cmd,
						unsigned long arg)
{
	struct psb_fbdev *fbdev = info->par;
	struct psb_framebuffer *psbfb = &fbdev->pfb;
@@ -384,7 +387,8 @@ static struct gtt_range *psbfb_alloc(struct drm_device *dev, int aligned_size)
	/* Begin by trying to use stolen memory backing */
	backing = psb_gtt_alloc_range(dev, aligned_size, "fb", 1);
	if (backing) {
	        if (drm_gem_private_object_init(dev, &backing->gem, aligned_size) == 0)
		if (drm_gem_private_object_init(dev,
					&backing->gem, aligned_size) == 0)
			return backing;
		psb_gtt_free_range(dev, backing);
	}
@@ -551,8 +555,10 @@ static struct drm_framebuffer *psb_user_framebuffer_create
	struct gtt_range *r;
	struct drm_gem_object *obj;

        /* Find the GEM object and thus the gtt range object that is
           to back this space */
	/*
	 *	Find the GEM object and thus the gtt range object that is
	 *	to back this space
	 */
	obj = drm_gem_object_lookup(dev, filp, cmd->handle);
	if (obj == NULL)
		return ERR_PTR(-ENOENT);
@@ -718,11 +724,12 @@ static void psb_user_framebuffer_destroy(struct drm_framebuffer *fb)

	if (reset)
		/*
		 * Now force a sane response before we permit the DRM crc layer to
		 * do stupid things like blank the display. Instead we reset this
		 * framebuffer as if the user had forced a reset. We must do this
		 * before the cleanup so that the DRM layer doesn't get a chance
		 * to stick its oar in where it isn't wanted.
		 * Now force a sane response before we permit the DRM CRTC
		 * layer to do stupid things like blank the display. Instead
		 * we reset this framebuffer as if the user had forced a reset.
		 * We must do this before the cleanup so that the DRM layer
		 * doesn't get a chance to stick its oar in where it isn't
		 * wanted.
		 */
		drm_fb_helper_restore_fbdev_mode(&fbdev->psb_fb_helper);

Loading