Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 878336c3 authored by Stefan Wolz's avatar Stefan Wolz Committed by Greg Kroah-Hartman
Browse files

sm750fb/sm750_hw.c: fixed comments



Fixed multiline comments to meet style standards,
fixed typos and split comment lines over 80 characters.

Signed-off-by: default avatarStefan Wolz <wolzstefan@web.de>
Signed-off-by: default avatarChristian Halder <christian.halder@fau.de>
Signed-off-by: default avatarSebastian Handwerker <sebastian.handwerker@posteo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f24c865
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -35,10 +35,10 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
	pr_info("mmio phyAddr = %lx\n", sm750_dev->vidreg_start);

	/* reserve the vidreg space of smi adaptor
	 * if you do this, u need to add release region code
	 * if you do this, you need to add release region code
	 * in lynxfb_remove, or memory will not be mapped again
	 * successfully
	 * */
	 */
	ret = pci_request_region(pdev, 1, "sm750fb");
	if (ret) {
		pr_err("Can not request PCI regions.\n");
@@ -63,10 +63,10 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)

	sm750_dev->vidmem_start = pci_resource_start(pdev, 0);
	/* don't use pdev_resource[x].end - resource[x].start to
	 * calculate the resource size,its only the maximum available
	 * size but not the actual size,use
	 * calculate the resource size, it's only the maximum available
	 * size but not the actual size, using
	 * @ddk750_getVMSize function can be safe.
	 * */
	 */
	sm750_dev->vidmem_size = ddk750_getVMSize();
	pr_info("video memory phyAddr = %lx, size = %u bytes\n",
		sm750_dev->vidmem_start, sm750_dev->vidmem_size);
@@ -141,18 +141,20 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
		}
		POKE32(PANEL_DISPLAY_CTRL, val);
	} else {
		/* for 750LE ,no DVI chip initialization makes Monitor no signal */
		/* Set up GPIO for software I2C to program DVI chip in the
		   Xilinx SP605 board, in order to have video signal.
		/* for 750LE, no DVI chip initialization
		 * makes Monitor no signal
		 *
		 * Set up GPIO for software I2C to program DVI chip in the
		 * Xilinx SP605 board, in order to have video signal.
		 */
		sm750_sw_i2c_init(0, 1);

		/* Customer may NOT use CH7301 DVI chip, which has to be
		initialized differently.
		 * initialized differently.
		 */
		if (sm750_sw_i2c_read_reg(0xec, 0x4a) == 0x95) {
		/* The following register values for CH7301 are from
		   Chrontel app note and our experiment.
		 * Chrontel app note and our experiment.
		 */
			pr_info("yes,CH7301 DVI chip found\n");
			sm750_sw_i2c_write_reg(0xec, 0x1d, 0x16);
@@ -234,9 +236,7 @@ int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc, struct fb_var_screeninfo *
	return 0;
}

/*
	set the controller's mode for @crtc charged with @var and @fix parameters
*/
/* set the controller's mode for @crtc charged with @var and @fix parameters */
int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
			  struct fb_var_screeninfo *var,
			  struct fb_fix_screeninfo *fix)
@@ -305,7 +305,9 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
		       crtc->oScreen & PANEL_FB_ADDRESS_ADDRESS_MASK);

		reg = var->xres * (var->bits_per_pixel >> 3);
		/* crtc->channel is not equal to par->index on numeric,be aware of that */
		/* crtc->channel is not equal to par->index on numeric,
		 * be aware of that
		 */
		reg = ALIGN(reg, crtc->line_pad);
		reg = (reg << PANEL_FB_WIDTH_WIDTH_SHIFT) &
		       PANEL_FB_WIDTH_WIDTH_MASK;
@@ -337,7 +339,9 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc *crtc,
		/* not implemented now */
		POKE32(CRT_FB_ADDRESS, crtc->oScreen);
		reg = var->xres * (var->bits_per_pixel >> 3);
		/* crtc->channel is not equal to par->index on numeric,be aware of that */
		/* crtc->channel is not equal to par->index on numeric,
		 * be aware of that
		 */
		reg = ALIGN(reg, crtc->line_pad) << CRT_FB_WIDTH_WIDTH_SHIFT;
		reg &= CRT_FB_WIDTH_WIDTH_MASK;
		reg |= (fix->line_length & CRT_FB_WIDTH_OFFSET_MASK);