Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 00/18] Export SPI and OF module aliases in missing drivers
From: Javier Martinez Canillas @ 2015-08-20  7:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Andrzej Hajda, linux-fbdev,
	Michael Hennerich, linux-iio, linux-wireless, Lee Jones,
	Jean-Christophe Plagniol-Villard, linux-mtd, Lauro Ramos Venancio,
	Søren Andersen, devel, Randy Dunlap, Masanari Iida,
	Jiri Kosina, Devendra Naga, Tomi Valkeinen, Kyungmin Park,
	Krzysztof Kozlowski, Greg Kroah-Hartman, Aloisio Almeida Jr,
	Jonathan Cameron, Stephen Warren, Urs Fässler, Adrian Hunter,
	Mauro Carvalho Chehab, Aya Mahfouz, Brian Norris,
	George McCollister, Samuel Ortiz, Manfred Schlaegl, linux-omap,
	Hartmut Knaack, Ulf Hansson, Antonio Borneo, Andrea Galbusera,
	Michael Welling, Fabian Frederick, Mark Brown, linux-mmc,
	linux-spi, Lars-Peter Clausen, David Woodhouse, netdev,
	linux-media, Peter Meerwald

Hello,

Short version:

This patch series is the SPI equivalent of the I2C one posted before [0].

This series add the missing MODULE_DEVICE_TABLE() for OF and SPI tables
to export that information so modules have the correct aliases built-in
and autoloading works correctly.

Longer version:

The SPI core always reports the MODALIAS uevent as "spi:<modalias>"
regardless of the mechanism that was used to register the device (i.e:
OF or board code) and the table that is used later to match the driver
with the device (i.e: SPI id table or OF match table).

But this means that OF-only drivers needs to have both OF and SPI id
tables that have to be kept in sync and also the device node's compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same SPI device name for example.

Also, there are many SPI drivers whose module auto-loading is not working
because of this fact that the SPI core always reports the MODALIAS as
spi:<modalias> and many developers didn't expect this since is not how
other subsystems behave.

I've identified SPI drivers with 3 types of different issues:

a) Those that have an spi_table but are not exported. The match works
   if the driver is built-in but since the ID table is not exported,
   module auto-load won't work.

b) Those that have a of_table but are not exported. This is currently
   not an issue since even when the of_table is used to match the dev
   with the driver, an OF modalias is not reported by the SPI core.
   But if the SPI core is changed to report the MODALIAS of the form
   of:N*T*C as it's made by other subsystems, then module auto-load
   will break for these drivers.

c) Those that don't have an of_table but should since are OF drivers
   with DT bindings doc for them. Since the SPI core does not report
   a OF modalias and since spi_match_device() fallbacks to match the
   device part of the compatible string with the SPI device ID table,
   many OF drivers don't have an of_table to match. After all having
   a SPI device ID table is mandatory so it works without a of_table.

So, in order to not make mandatory to have a SPI device ID table, all
these three kind of issues have to be addressed. This series does that.

I split the changes so the patches in this series are independent and
can be picked individually by subsystem maintainers.

Patches #1 and #2 solves a), patches #3 to #8 solves b) and patches

Patch #18 changes the logic of spi_uevent() to report an OF modalias if
the device was registered using OF. But this patch is included in the
series only as an RFC for illustration purposes since changing that
without first applying all the other patches in this series, will break
module autoloading for the drivers of devices registered using OF but
that lacks an of_match_table. I'll repost patch #18 once all the patches
in this series have landed.

[0]: https://lkml.org/lkml/2015/7/30/519

Best regards,
Javier


Javier Martinez Canillas (18):
  iio: Export SPI module alias information in missing drivers
  staging: iio: hmc5843: Export missing SPI module alias information
  mtd: dataflash: Export OF module alias information
  OMAPDSS: panel-sony-acx565akm: Export OF module alias information
  mmc: mmc_spi: Export OF module alias information
  staging: mt29f_spinand: Export OF module alias information
  net: ks8851: Export OF module alias information
  [media] s5c73m3: Export OF module alias information
  mfd: cros_ec: spi: Add OF match table
  iio: dac: ad7303: Add OF match table
  iio: adc: max1027: Set struct spi_driver .of_match_table
  mfd: stmpe: Add OF match table
  iio: adc: mcp320x: Set struct spi_driver .of_match_table
  iio: as3935: Add OF match table
  iio: adc128s052: Add OF match table
  iio: frequency: adf4350: Add OF match table
  NFC: trf7970a: Add OF match table
  spi: (RFC, don't apply) report OF style modalias when probing using DT

 drivers/iio/adc/max1027.c                                   |  1 +
 drivers/iio/adc/mcp320x.c                                   |  1 +
 drivers/iio/adc/ti-adc128s052.c                             |  8 ++++++++
 drivers/iio/amplifiers/ad8366.c                             |  1 +
 drivers/iio/dac/ad7303.c                                    |  7 +++++++
 drivers/iio/frequency/adf4350.c                             |  9 +++++++++
 drivers/iio/proximity/as3935.c                              |  7 +++++++
 drivers/media/i2c/s5c73m3/s5c73m3-spi.c                     |  1 +
 drivers/mfd/cros_ec_spi.c                                   |  7 +++++++
 drivers/mfd/stmpe-spi.c                                     | 13 +++++++++++++
 drivers/mmc/host/mmc_spi.c                                  |  1 +
 drivers/mtd/devices/mtd_dataflash.c                         |  1 +
 drivers/net/ethernet/micrel/ks8851.c                        |  1 +
 drivers/nfc/trf7970a.c                                      |  7 +++++++
 drivers/spi/spi.c                                           |  8 ++++++++
 drivers/staging/iio/magnetometer/hmc5843_spi.c              |  1 +
 drivers/staging/mt29f_spinand/mt29f_spinand.c               |  1 +
 .../video/fbdev/omap2/displays-new/panel-sony-acx565akm.c   |  1 +
 18 files changed, 76 insertions(+)

-- 
2.4.3


^ permalink raw reply

* [RFC] fbdev/nvidia:change reverse_order() macro
From: yalin wang @ 2015-08-20  6:52 UTC (permalink / raw)
  To: adaplas, plagnioj, tomi.valkeinen, linux-fbdev, linux-kernel; +Cc: yalin wang

This change reverse_order() to swab32(bitrev32()), so that
it can have better performance on some platforms.

Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
---
 drivers/video/fbdev/nvidia/nv_accel.c |  4 ++--
 drivers/video/fbdev/nvidia/nv_local.h | 13 ++++---------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/video/fbdev/nvidia/nv_accel.c b/drivers/video/fbdev/nvidia/nv_accel.c
index ad6472a..c21cb34 100644
--- a/drivers/video/fbdev/nvidia/nv_accel.c
+++ b/drivers/video/fbdev/nvidia/nv_accel.c
@@ -382,7 +382,7 @@ static void nvidiafb_mono_color_expand(struct fb_info *info,
 
 		for (j = RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS; j--;) {
 			tmp = data[k++];
-			reverse_order(&tmp);
+			tmp = reverse_order(tmp);
 			NVDmaNext(par, tmp);
 		}
 
@@ -394,7 +394,7 @@ static void nvidiafb_mono_color_expand(struct fb_info *info,
 
 		for (j = dsize; j--;) {
 			tmp = data[k++];
-			reverse_order(&tmp);
+			tmp = reverse_order(tmp);
 			NVDmaNext(par, tmp);
 		}
 	}
diff --git a/drivers/video/fbdev/nvidia/nv_local.h b/drivers/video/fbdev/nvidia/nv_local.h
index 68e508d..a0eb1f3 100644
--- a/drivers/video/fbdev/nvidia/nv_local.h
+++ b/drivers/video/fbdev/nvidia/nv_local.h
@@ -97,18 +97,13 @@
 
 #ifdef __LITTLE_ENDIAN
 
+#include <linux/swab.h>
 #include <linux/bitrev.h>
 
-#define reverse_order(l)        \
-do {                            \
-	u8 *a = (u8 *)(l);      \
-	a[0] = bitrev8(a[0]);   \
-	a[1] = bitrev8(a[1]);   \
-	a[2] = bitrev8(a[2]);   \
-	a[3] = bitrev8(a[3]);   \
-} while(0)
+#define reverse_order(v)	swab32(bitrev32(v))
+
 #else
-#define reverse_order(l) do { } while(0)
+#define reverse_order(v)	(v)
 #endif                          /* __LITTLE_ENDIAN */
 
 #endif				/* __NV_LOCAL_H__ */
-- 
1.9.1


^ permalink raw reply related

* Re: omapdss: Division by zero in kernel
From: Pali Rohár @ 2015-08-19  8:11 UTC (permalink / raw)
  To: Peter Teoh
  Cc: Tomi Valkeinen, Jean-Christophe Plagniol-Villard, Jyri Sarha,
	omap, linux-fbdev, LKML, Pavel Machek, Sebastian Reichel,
	Aaro Koskinen, Tony Lindgren, Nishanth Menon
In-Reply-To: <CAHnt0GX6442mtZ=J6CS_60TyTeUu==oROcf4Y=upHGSr71X3EA@mail.gmail.com>

On Tuesday 18 August 2015 07:11:27 Peter Teoh wrote:
> On Fri, Jul 24, 2015 at 9:03 AM, Pali Rohár <pali.rohar@gmail.com> wrote:
> >
> > Hello,
> >
> > when on N900 (real HW or qemu) I run this command
> >
> > / # echo 0 > /sys/devices/platform/omapdss/overlay0/enabled && echo 0 > /sys/class/graphics/fb0/size
> >
> > then kernel crash with this error message
> >
> > / # [   29.904113] Division by zero in kernel.
> > ** 3375 printk messages dropped ** [   29.963836] [<c01e0008>] (__aeabi_uidivmod) from [<c022071c>]
> > (cfb_imageblit+0xac/0x464)
> > ** 8426 printk messages dropped ** [   30.111083] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8380 printk messages dropped ** [   30.258209] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7813 printk messages dropped ** [   30.400054] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7666 printk messages dropped ** [   30.538391] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7687 printk messages dropped ** [   30.676544] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7960 printk messages dropped ** [   30.819915] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8317 printk messages dropped ** [   30.966979] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8590 printk messages dropped ** [   31.122528] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8885 printk messages dropped ** [   31.287658] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
> > ** 9408 printk messages dropped ** [   31.461425] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 9787 printk messages dropped ** [   31.644287] [<c02187e8>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10081 printk messages dropped ** [   31.833984] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10501 printk messages dropped ** [   32.031066] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10816 printk messages dropped ** [   32.233001] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10900 printk messages dropped ** [   32.440490] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   32.645233] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   32.848999] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   33.053833] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10838 printk messages dropped ** [   33.258361] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
> >
> > I suspect that problem is in omapdss.
> >
> > I do not know if size 0 make sense, but Maemo userspace is calling above
> > commands and on Nokia's 2.6.28 kernel there is no crash or error message.
> >
> > IMHO Division by zero in kernel should not be there even if userspace
> > call "incorrect" command.
> >
> > --
> > Pali Rohár
> > pali.rohar@gmail.com
> 
> 
> 
> Not sure if my analysis is correct.   According to the recent pull
> (4.2.0-rc4+), the code is still vulnerable to this division by zero:
> 
> Inside drivers/video/fbdev/core/cfbimgblt.c:
> 
> void cfb_imageblit(struct fb_info *p, const struct fb_image *image)
> {
>         u32 fgcolor, bgcolor, start_index, bitstart, pitch_index = 0;
>         u32 bpl = sizeof(u32), bpp = p->var.bits_per_pixel;
>         u32 width = image->width;
>         u32 dx = image->dx, dy = image->dy;
>         u8 __iomem *dst1;
> 
>         if (p->state != FBINFO_STATE_RUNNING)
>                 return;
> 
>         bitstart = (dy * p->fix.line_length * 8) + (dx * bpp);
>         start_index = bitstart & (32 - 1);
>         pitch_index = (p->fix.line_length & (bpl - 1)) * 8;
> 
>         bitstart /= 8;
>         bitstart &= ~(bpl - 1);
>         dst1 = p->screen_base + bitstart;
> 
>         if (p->fbops->fb_sync)
>                 p->fbops->fb_sync(p);
> 
>         if (image->depth = 1) {
>                 if (p->fix.visual = FB_VISUAL_TRUECOLOR ||
>                     p->fix.visual = FB_VISUAL_DIRECTCOLOR) {
>                         fgcolor = ((u32*)(p->pseudo_palette))[image->fg_color];
>                         bgcolor = ((u32*)(p->pseudo_palette))[image->bg_color];
>                 } else {
>                         fgcolor = image->fg_color;
>                         bgcolor = image->bg_color;
>                 }
> 
>                 if (32 % bpp = 0 && !start_index && !pitch_index &&
>                     ((width & (32/bpp-1)) = 0) &&
>                     bpp >= 8 && bpp <= 32)
>                         fast_imageblit(image, p, dst1, fgcolor, bgcolor);
>                 else
>                         slow_imageblit(image, p, dst1, fgcolor, bgcolor,
>                                         start_index, pitch_index);
>         } else
>                 color_imageblit(image, p, dst1, start_index, pitch_i
> 
> 
> Notice that bpp is not checked for zero, and thus bpp=0 is totally
> feasible?   resulting in 32/bpp crashing the kernel?
> 

Hm... this could really be a problem! But how to patch it? Which branch
should be called (fast_ or slow_ function) if bpp is zero?

And is there some way to force kernel to dump backtrace into dmesg when
division by zero occur?

-- 
Pali Rohár
pali.rohar@gmail.com

^ permalink raw reply

* [PATCH] staging: sm750fb: fix improper typedef usage
From: Brian Stottler @ 2015-08-19  2:27 UTC (permalink / raw)
  To: linux-fbdev

Fix typedef usage which does not comply with kernel style guidelines.

Signed-off-by: Brian Stottler <brianstottler@gmail.com>
---
 drivers/staging/sm750fb/ddk750_chip.c    | 31 ++++++++++++++--------------
 drivers/staging/sm750fb/ddk750_chip.h    | 35 ++++++++++++++------------------
 drivers/staging/sm750fb/ddk750_display.c |  2 +-
 drivers/staging/sm750fb/ddk750_display.h | 12 +++++------
 drivers/staging/sm750fb/ddk750_dvi.c     | 12 +++++------
 drivers/staging/sm750fb/ddk750_dvi.h     |  4 ++--
 drivers/staging/sm750fb/ddk750_mode.c    | 10 +++++----
 drivers/staging/sm750fb/ddk750_mode.h    | 18 ++++++++--------
 drivers/staging/sm750fb/ddk750_power.c   |  2 +-
 drivers/staging/sm750fb/ddk750_power.h   |  7 +++----
 drivers/staging/sm750fb/ddk750_sii164.c  |  2 +-
 drivers/staging/sm750fb/ddk750_sii164.h  |  4 ++--
 drivers/staging/sm750fb/sm750_hw.c       |  8 ++++----
 13 files changed, 69 insertions(+), 78 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index f4975d2..1297525 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -2,20 +2,19 @@
 #include "ddk750_reg.h"
 #include "ddk750_chip.h"
 #include "ddk750_power.h"
-typedef struct _pllcalparam {
+struct pllcalparam {
 	unsigned char power;/* d : 0~ 6*/
 	unsigned char pod;
 	unsigned char od;
 	unsigned char value;/* value of  2 power d (2^d) */
-}
-pllcalparam;
+};
 
 
-logical_chip_type_t getChipType(void)
+enum logical_chip_type_t getChipType(void)
 {
 	unsigned short physicalID;
 	char physicalRev;
-	logical_chip_type_t chip;
+	enum logical_chip_type_t chip;
 
 	physicalID = devId750; /* either 0x718 or 0x750 */
 	physicalRev = revId750;
@@ -44,12 +43,12 @@ inline unsigned int twoToPowerOfx(unsigned long x)
 	return result;
 }
 
-inline unsigned int calcPLL(pll_value_t *pPLL)
+inline unsigned int calcPLL(struct pll_value_t *pPLL)
 {
 	return (pPLL->inputFreq * pPLL->M / pPLL->N / twoToPowerOfx(pPLL->OD) / twoToPowerOfx(pPLL->POD));
 }
 
-unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL)
+unsigned int getPllValue(enum clock_type_t clockType, struct pll_value_t *pPLL)
 {
 	unsigned int ulPllReg = 0;
 
@@ -85,7 +84,7 @@ unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL)
 
 unsigned int getChipClock(void)
 {
-	pll_value_t pll;
+	struct pll_value_t pll;
 #if 1
 	if (getChipType() = SM750LE)
 		return MHz(130);
@@ -102,7 +101,7 @@ unsigned int getChipClock(void)
  */
 void setChipClock(unsigned int frequency)
 {
-	pll_value_t pll;
+	struct pll_value_t pll;
 	unsigned int ulActualMxClk;
 #if 1
 	/* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */
@@ -252,7 +251,7 @@ unsigned int ddk750_getVMSize(void)
 
 }
 
-int ddk750_initHw(initchip_param_t *pInitParam)
+int ddk750_initHw(struct initchip_param_t *pInitParam)
 {
 
 	unsigned int ulReg;
@@ -405,10 +404,10 @@ unsigned int absDiff(unsigned int a, unsigned int b)
 	M = {1,...,255}
 	N = {2,...,15}
 */
-unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
+unsigned int calcPllValue(unsigned int request_orig, struct pll_value_t *pll)
 {
 	/* used for primary and secondary channel pixel clock pll */
-	static pllcalparam xparm_PIXEL[] = {
+	static struct pllcalparam xparm_PIXEL[] = {
 		/* 2^0 = 1*/			{0, 0, 0, 1},
 		/* 2^ 1 =2*/			{1, 0, 1, 2},
 		/* 2^ 2  = 4*/		{2, 0, 2, 4},
@@ -419,7 +418,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 							};
 
 	/* used for MXCLK (chip clock) */
-	static pllcalparam xparm_MXCLK[] = {
+	static struct pllcalparam xparm_MXCLK[] = {
 		/* 2^0 = 1*/			{0, 0, 0, 1},
 		/* 2^ 1 =2*/			{1, 0, 1, 2},
 		/* 2^ 2  = 4*/		{2, 0, 2, 4},
@@ -433,7 +432,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 	unsigned int RN, quo, rem, fl_quo;
 	unsigned int input, request;
 	unsigned int tmpClock, ret;
-	pllcalparam *xparm;
+	struct pllcalparam *xparm;
 
 #if 1
 	if (getChipType() = SM750LE) {
@@ -492,7 +491,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
 
 unsigned int calcPllValue2(
 unsigned int ulRequestClk, /* Required pixel clock in Hz unit */
-pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
+struct pll_value_t *pPLL /* Structure to hold the value to be set in PLL */
 )
 {
 	unsigned int M, N, OD, POD = 0, diff, pllClk, odPower, podPower;
@@ -590,7 +589,7 @@ pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
 
 
 
-unsigned int formatPllReg(pll_value_t *pPLL)
+unsigned int formatPllReg(struct pll_value_t *pPLL)
 {
 	unsigned int ulPllReg = 0;
 
diff --git a/drivers/staging/sm750fb/ddk750_chip.h b/drivers/staging/sm750fb/ddk750_chip.h
index 4e030e8..495726f 100644
--- a/drivers/staging/sm750fb/ddk750_chip.h
+++ b/drivers/staging/sm750fb/ddk750_chip.h
@@ -8,29 +8,26 @@
 #include <linux/io.h>
 
 /* This is all the chips recognized by this library */
-typedef enum _logical_chip_type_t
+enum logical_chip_type_t
 {
 	SM_UNKNOWN,
 	SM718,
 	SM750,
 	SM750LE,
-}
-logical_chip_type_t;
+};
 
-
-typedef enum _clock_type_t
+enum clock_type_t
 {
 	MXCLK_PLL,
 	PRIMARY_PLL,
 	SECONDARY_PLL,
 	VGA0_PLL,
 	VGA1_PLL,
-}
-clock_type_t;
+};
 
-typedef struct _pll_value_t
+struct pll_value_t
 {
-	clock_type_t clockType;
+	enum clock_type_t clockType;
 	unsigned long inputFreq; /* Input clock frequency to the PLL */
 
 	/* Use this when clockType = PANEL_PLL */
@@ -38,11 +35,10 @@ typedef struct _pll_value_t
 	unsigned long N;
 	unsigned long OD;
 	unsigned long POD;
-}
-pll_value_t;
+};
 
 /* input struct to initChipParam() function */
-typedef struct _initchip_param_t
+struct initchip_param_t
 {
 	unsigned short powerMode;    /* Use power mode 0 or 1 */
 	unsigned short chipClock;    /**
@@ -71,18 +67,17 @@ typedef struct _initchip_param_t
 				      */
 
 	/* More initialization parameter can be added if needed */
-}
-initchip_param_t;
+};
 
 
-logical_chip_type_t getChipType(void);
-unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
-unsigned int calcPllValue2(unsigned int, pll_value_t *);
-unsigned int formatPllReg(pll_value_t *pPLL);
+enum logical_chip_type_t getChipType(void);
+unsigned int calcPllValue(unsigned int request, struct pll_value_t *pll);
+unsigned int calcPllValue2(unsigned int, struct pll_value_t *);
+unsigned int formatPllReg(struct pll_value_t *pPLL);
 void ddk750_set_mmio(void __iomem *, unsigned short, char);
 unsigned int ddk750_getVMSize(void);
-int ddk750_initHw(initchip_param_t *);
-unsigned int getPllValue(clock_type_t clockType, pll_value_t *pPLL);
+int ddk750_initHw(struct initchip_param_t *);
+unsigned int getPllValue(enum clock_type_t clockType, struct pll_value_t *pPLL);
 unsigned int getChipClock(void);
 void setChipClock(unsigned int);
 void setMemoryClock(unsigned int frequency);
diff --git a/drivers/staging/sm750fb/ddk750_display.c b/drivers/staging/sm750fb/ddk750_display.c
index a3e6720..29dd62d 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -230,7 +230,7 @@ static void swPanelPowerSequence(int disp, int delay)
 
 }
 
-void ddk750_setLogicalDispOut(disp_output_t output)
+void ddk750_setLogicalDispOut(enum disp_output_t output)
 {
 	unsigned int reg;
 	if(output & PNL_2_USAGE){
diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index ae0f84c..13b4d76 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -86,7 +86,7 @@
 	CRT means crt path DSUB
 */
 #if 0
-typedef enum _disp_output_t
+enum disp_output_t
 {
 	NO_DISPLAY = DPMS_OFF,
 
@@ -126,10 +126,9 @@ typedef enum _disp_output_t
 						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
-}
-disp_output_t;
+};
 #else
-typedef enum _disp_output_t{
+enum disp_output_t{
 	do_LCD1_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON,
 	do_LCD1_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON,
 #if 0
@@ -150,11 +149,10 @@ typedef enum _disp_output_t{
 	do_CRT_PRI = CRT_2_PRI|PRI_TP_ON|DPMS_ON|DAC_ON,
 	do_CRT_SEC = CRT_2_SEC|SEC_TP_ON|DPMS_ON|DAC_ON,
 #endif
-}
-disp_output_t;
+};
 #endif
 
-void ddk750_setLogicalDispOut(disp_output_t);
+void ddk750_setLogicalDispOut(enum disp_output_t);
 int ddk750_initDVIDisp(void);
 
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
index b2bf7e6..1a5da03 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -9,7 +9,7 @@
 /* This global variable contains all the supported driver and its corresponding
    function API. Please set the function pointer to NULL whenever the function
    is not supported. */
-static dvi_ctrl_device_t g_dcftSupportedDviController[] +static struct dvi_ctrl_device_t g_dcftSupportedDviController[]  {
 #ifdef DVI_CTRL_SII164
     {
@@ -43,7 +43,7 @@ int dviInit(
     unsigned char pllFilterValue
 			)
 {
-	dvi_ctrl_device_t *pCurrentDviCtrl;
+	struct dvi_ctrl_device_t *pCurrentDviCtrl;
 	pCurrentDviCtrl = g_dcftSupportedDviController;
 	if(pCurrentDviCtrl->pfnInit != NULL)
 	{
@@ -64,10 +64,10 @@ int dviInit(
  */
 unsigned short dviGetVendorID(void)
 {
-    dvi_ctrl_device_t *pCurrentDviCtrl;
+    struct dvi_ctrl_device_t *pCurrentDviCtrl;
 
     pCurrentDviCtrl = g_dcftSupportedDviController;
-    if (pCurrentDviCtrl != (dvi_ctrl_device_t *)0)
+    if (pCurrentDviCtrl != (struct dvi_ctrl_device_t *)0)
         return pCurrentDviCtrl->pfnGetVendorId();
 
     return 0x0000;
@@ -83,10 +83,10 @@ unsigned short dviGetVendorID(void)
  */
 unsigned short dviGetDeviceID(void)
 {
-    dvi_ctrl_device_t *pCurrentDviCtrl;
+    struct dvi_ctrl_device_t *pCurrentDviCtrl;
 
 	pCurrentDviCtrl = g_dcftSupportedDviController;
-    if (pCurrentDviCtrl != (dvi_ctrl_device_t *)0)
+    if (pCurrentDviCtrl != (struct dvi_ctrl_device_t *)0)
         return pCurrentDviCtrl->pfnGetDeviceId();
 
     return 0x0000;
diff --git a/drivers/staging/sm750fb/ddk750_dvi.h b/drivers/staging/sm750fb/ddk750_dvi.h
index 83bbd6d..63d3195 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.h
+++ b/drivers/staging/sm750fb/ddk750_dvi.h
@@ -26,7 +26,7 @@ typedef unsigned char (*PFN_DVICTRL_CHECKINTERRUPT)(void);
 typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);
 
 /* Structure to hold all the function pointer to the DVI Controller. */
-typedef struct _dvi_ctrl_device_t
+struct dvi_ctrl_device_t
 {
 	PFN_DVICTRL_INIT		pfnInit;
 	PFN_DVICTRL_RESETCHIP		pfnResetChip;
@@ -38,7 +38,7 @@ typedef struct _dvi_ctrl_device_t
 	PFN_DVICTRL_ISCONNECTED		pfnIsConnected;
 	PFN_DVICTRL_CHECKINTERRUPT	pfnCheckInterrupt;
 	PFN_DVICTRL_CLEARINTERRUPT	pfnClearInterrupt;
-} dvi_ctrl_device_t;
+};
 
 #define DVI_CTRL_SII164
 
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index 74313ff..43eb28f 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -13,7 +13,8 @@
     HW only supports 7 predefined pixel clocks, and clock select is
     in bit 29:27 of	Display Control register.
 */
-static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam, unsigned long dispControl)
+static unsigned long displayControlAdjust_SM750LE(
+		struct mode_parameter_t *pModeParam, unsigned long dispControl)
 {
 	unsigned long x, y;
 
@@ -75,7 +76,8 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
 
 
 /* only timing related registers will be  programed */
-static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
+static int programModeRegisters(struct mode_parameter_t *pModeParam,
+		struct pll_value_t *pll)
 {
 	int ret = 0;
 	int cnt = 0;
@@ -185,9 +187,9 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
 	return ret;
 }
 
-int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock)
+int ddk750_setModeTiming(struct mode_parameter_t *parm, enum clock_type_t clock)
 {
-	pll_value_t pll;
+	struct pll_value_t pll;
 	unsigned int uiActualPixelClk;
 	pll.inputFreq = DEFAULT_INPUT_CLOCK;
 	pll.clockType = clock;
diff --git a/drivers/staging/sm750fb/ddk750_mode.h b/drivers/staging/sm750fb/ddk750_mode.h
index 4e8fab3..97118cf 100644
--- a/drivers/staging/sm750fb/ddk750_mode.h
+++ b/drivers/staging/sm750fb/ddk750_mode.h
@@ -3,29 +3,28 @@
 
 #include "ddk750_chip.h"
 
-typedef enum _spolarity_t
+enum spolarity_t
 {
     POS = 0, /* positive */
     NEG, /* negative */
-}
-spolarity_t;
+};
 
 
-typedef struct _mode_parameter_t
+struct mode_parameter_t
 {
     /* Horizontal timing. */
     unsigned long horizontal_total;
     unsigned long horizontal_display_end;
     unsigned long horizontal_sync_start;
     unsigned long horizontal_sync_width;
-    spolarity_t horizontal_sync_polarity;
+    enum spolarity_t horizontal_sync_polarity;
 
     /* Vertical timing. */
     unsigned long vertical_total;
     unsigned long vertical_display_end;
     unsigned long vertical_sync_start;
     unsigned long vertical_sync_height;
-    spolarity_t vertical_sync_polarity;
+    enum spolarity_t vertical_sync_polarity;
 
     /* Refresh timing. */
     unsigned long pixel_clock;
@@ -33,11 +32,10 @@ typedef struct _mode_parameter_t
     unsigned long vertical_frequency;
 
     /* Clock Phase. This clock phase only applies to Panel. */
-    spolarity_t clock_phase_polarity;
-}
-mode_parameter_t;
+    enum spolarity_t clock_phase_polarity;
+};
 
-int ddk750_setModeTiming(mode_parameter_t *, clock_type_t);
+int ddk750_setModeTiming(struct mode_parameter_t *, enum clock_type_t);
 
 
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c
index 1e5f398..9861f3e 100644
--- a/drivers/staging/sm750fb/ddk750_power.c
+++ b/drivers/staging/sm750fb/ddk750_power.c
@@ -2,7 +2,7 @@
 #include "ddk750_reg.h"
 #include "ddk750_power.h"
 
-void ddk750_setDPMS(DPMS_t state)
+void ddk750_setDPMS(enum DPMS_t state)
 {
 	unsigned int value;
 	if(getChipType() = SM750LE){
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 4e00955..51668f3 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -1,14 +1,13 @@
 #ifndef DDK750_POWER_H__
 #define DDK750_POWER_H__
 
-typedef enum _DPMS_t
+enum DPMS_t
 {
     crtDPMS_ON = 0x0,
     crtDPMS_STANDBY = 0x1,
     crtDPMS_SUSPEND = 0x2,
     crtDPMS_OFF = 0x3,
-}
-DPMS_t;
+};
 
 #define setDAC(off) \
 		{	\
@@ -18,7 +17,7 @@ DPMS_t;
 									off));	\
 		}
 
-void ddk750_setDPMS(DPMS_t);
+void ddk750_setDPMS(enum DPMS_t);
 
 unsigned int getPowerMode(void);
 
diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
index b6395b8..2518b54 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.c
+++ b/drivers/staging/sm750fb/ddk750_sii164.c
@@ -308,7 +308,7 @@ void sii164SetPower(
  *      This function selects the mode of the hot plug detection.
  */
 static void sii164SelectHotPlugDetectionMode(
-    sii164_hot_plug_mode_t hotPlugMode
+    enum sii164_hot_plug_mode_t hotPlugMode
 )
 {
     unsigned char detectReg;
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index 2b4c7d3..6db0c1e 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -4,13 +4,13 @@
 #define USE_DVICHIP
 
 /* Hot Plug detection mode structure */
-typedef enum _sii164_hot_plug_mode_t
+enum sii164_hot_plug_mode_t
 {
     SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
     SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
     SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
     SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
-} sii164_hot_plug_mode_t;
+};
 
 
 /* Silicon Image SiI164 chip prototype */
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 84381bc..71bf943 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -117,7 +117,7 @@ int hw_sm750_inithw(struct lynx_share *share, struct pci_dev *pdev)
 	if(parm->master_clk = 0)
 		parm->master_clk = parm->chip_clk/3;
 
-	ddk750_initHw((initchip_param_t *)&spec_share->state.initParm);
+	ddk750_initHw((struct initchip_param_t *)&spec_share->state.initParm);
 	/* for sm718,open pci burst */
 	if(share->devid = 0x718){
 		POKE32(SYSTEM_CTRL,
@@ -220,7 +220,7 @@ int hw_sm750_output_setMode(struct lynxfb_output* output,
 									struct fb_var_screeninfo* var, struct fb_fix_screeninfo* fix)
 {
 	int ret;
-	disp_output_t dispSet;
+	enum disp_output_t dispSet;
 	int channel;
 	
 	ret = 0;
@@ -298,8 +298,8 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc* crtc,
 {
 	int ret, fmt;
 	u32 reg;
-	mode_parameter_t modparm;
-	clock_type_t clock;
+	struct mode_parameter_t modparm;
+	enum clock_type_t clock;
 	struct lynx_share *share;
 	struct lynxfb_par *par;
 

^ permalink raw reply related

* Re: omapdss: Division by zero in kernel
From: Peter Teoh @ 2015-08-18 14:11 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Tomi Valkeinen, Jean-Christophe Plagniol-Villard, Jyri Sarha,
	omap, linux-fbdev, LKML, Pavel Machek, Sebastian Reichel,
	Aaro Koskinen, Tony Lindgren, Nishanth Menon
In-Reply-To: <201507241803.42891@pali>

On Fri, Jul 24, 2015 at 9:03 AM, Pali Rohár <pali.rohar@gmail.com> wrote:
>
> Hello,
>
> when on N900 (real HW or qemu) I run this command
>
> / # echo 0 > /sys/devices/platform/omapdss/overlay0/enabled && echo 0 > /sys/class/graphics/fb0/size
>
> then kernel crash with this error message
>
> / # [   29.904113] Division by zero in kernel.
> ** 3375 printk messages dropped ** [   29.963836] [<c01e0008>] (__aeabi_uidivmod) from [<c022071c>]
> (cfb_imageblit+0xac/0x464)
> ** 8426 printk messages dropped ** [   30.111083] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 8380 printk messages dropped ** [   30.258209] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 7813 printk messages dropped ** [   30.400054] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 7666 printk messages dropped ** [   30.538391] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 7687 printk messages dropped ** [   30.676544] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 7960 printk messages dropped ** [   30.819915] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 8317 printk messages dropped ** [   30.966979] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 8590 printk messages dropped ** [   31.122528] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 8885 printk messages dropped ** [   31.287658] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
> ** 9408 printk messages dropped ** [   31.461425] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 9787 printk messages dropped ** [   31.644287] [<c02187e8>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10081 printk messages dropped ** [   31.833984] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10501 printk messages dropped ** [   32.031066] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10816 printk messages dropped ** [   32.233001] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10900 printk messages dropped ** [   32.440490] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10837 printk messages dropped ** [   32.645233] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10837 printk messages dropped ** [   32.848999] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10837 printk messages dropped ** [   33.053833] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>]
> (fbcon_scroll+0x6a0/0xcbc)
> ** 10838 printk messages dropped ** [   33.258361] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
>
> I suspect that problem is in omapdss.
>
> I do not know if size 0 make sense, but Maemo userspace is calling above
> commands and on Nokia's 2.6.28 kernel there is no crash or error message.
>
> IMHO Division by zero in kernel should not be there even if userspace
> call "incorrect" command.
>
> --
> Pali Rohár
> pali.rohar@gmail.com



Not sure if my analysis is correct.   According to the recent pull
(4.2.0-rc4+), the code is still vulnerable to this division by zero:

Inside drivers/video/fbdev/core/cfbimgblt.c:

void cfb_imageblit(struct fb_info *p, const struct fb_image *image)
{
        u32 fgcolor, bgcolor, start_index, bitstart, pitch_index = 0;
        u32 bpl = sizeof(u32), bpp = p->var.bits_per_pixel;
        u32 width = image->width;
        u32 dx = image->dx, dy = image->dy;
        u8 __iomem *dst1;

        if (p->state != FBINFO_STATE_RUNNING)
                return;

        bitstart = (dy * p->fix.line_length * 8) + (dx * bpp);
        start_index = bitstart & (32 - 1);
        pitch_index = (p->fix.line_length & (bpl - 1)) * 8;

        bitstart /= 8;
        bitstart &= ~(bpl - 1);
        dst1 = p->screen_base + bitstart;

        if (p->fbops->fb_sync)
                p->fbops->fb_sync(p);

        if (image->depth = 1) {
                if (p->fix.visual = FB_VISUAL_TRUECOLOR ||
                    p->fix.visual = FB_VISUAL_DIRECTCOLOR) {
                        fgcolor = ((u32*)(p->pseudo_palette))[image->fg_color];
                        bgcolor = ((u32*)(p->pseudo_palette))[image->bg_color];
                } else {
                        fgcolor = image->fg_color;
                        bgcolor = image->bg_color;
                }

                if (32 % bpp = 0 && !start_index && !pitch_index &&
                    ((width & (32/bpp-1)) = 0) &&
                    bpp >= 8 && bpp <= 32)
                        fast_imageblit(image, p, dst1, fgcolor, bgcolor);
                else
                        slow_imageblit(image, p, dst1, fgcolor, bgcolor,
                                        start_index, pitch_index);
        } else
                color_imageblit(image, p, dst1, start_index, pitch_i


Notice that bpp is not checked for zero, and thus bpp=0 is totally
feasible?   resulting in 32/bpp crashing the kernel?

-- 
Regards,
Peter Teoh

^ permalink raw reply

* Re: omapdss: Division by zero in kernel
From: Pali Rohár @ 2015-08-18 14:00 UTC (permalink / raw)
  To: Tomi Valkeinen, Jean-Christophe Plagniol-Villard, Jyri Sarha
  Cc: linux-omap, linux-fbdev, linux-kernel, Pavel Machek,
	Sebastian Reichel, Aaro Koskinen, Tony Lindgren, Nishanth Menon
In-Reply-To: <20150728115602.GL13765@pali>

On Tuesday 28 July 2015 13:56:02 Pali Rohár wrote:
> On Friday 24 July 2015 18:03:42 Pali Rohár wrote:
> > Hello,
> > 
> > when on N900 (real HW or qemu) I run this command
> > 
> > / # echo 0 > /sys/devices/platform/omapdss/overlay0/enabled && echo 0 > /sys/class/graphics/fb0/size
> > 
> > then kernel crash with this error message
> > 
> > / # [   29.904113] Division by zero in kernel.
> > ** 3375 printk messages dropped ** [   29.963836] [<c01e0008>] (__aeabi_uidivmod) from [<c022071c>] 
> > (cfb_imageblit+0xac/0x464)
> > ** 8426 printk messages dropped ** [   30.111083] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8380 printk messages dropped ** [   30.258209] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7813 printk messages dropped ** [   30.400054] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7666 printk messages dropped ** [   30.538391] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7687 printk messages dropped ** [   30.676544] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 7960 printk messages dropped ** [   30.819915] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8317 printk messages dropped ** [   30.966979] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8590 printk messages dropped ** [   31.122528] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 8885 printk messages dropped ** [   31.287658] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
> > ** 9408 printk messages dropped ** [   31.461425] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 9787 printk messages dropped ** [   31.644287] [<c02187e8>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10081 printk messages dropped ** [   31.833984] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10501 printk messages dropped ** [   32.031066] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10816 printk messages dropped ** [   32.233001] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10900 printk messages dropped ** [   32.440490] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   32.645233] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   32.848999] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10837 printk messages dropped ** [   33.053833] [<c02187a4>] (fbcon_redraw.isra.12) from [<c0218ed0>] 
> > (fbcon_scroll+0x6a0/0xcbc)
> > ** 10838 printk messages dropped ** [   33.258361] [<c0218ed0>] (fbcon_scroll) from [<c025af90>] (scrup+0x60/0x128)
> > 
> > I suspect that problem is in omapdss.
> > 
> > I do not know if size 0 make sense, but Maemo userspace is calling above
> > commands and on Nokia's 2.6.28 kernel there is no crash or error message.
> > 
> > IMHO Division by zero in kernel should not be there even if userspace
> > call "incorrect" command.
> > 
> 
> PING! Any idea what to do with Division by zero in kernel?
> 

PING again! Can somebody look at this Division by zero in kernel?

-- 
Pali Rohár
pali.rohar@gmail.com

^ permalink raw reply

* [PATCH] video: fbdev: Use devm_clk_get
From: Vaishali Thakkar @ 2015-08-18  3:40 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard
  Cc: Tomi Valkeinen, linux-fbdev, linux-kernel

This patch introduces the use of managed resource function
devm_clk_get instead of clk_get and removes corresponding calls
to clk_put in the probe and remove functions.

To be compatible with the change various gotos are replaced with
direct returns, and unneeded label failed_put_clk is dropped.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
 drivers/video/fbdev/pxa168fb.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c
index e209b03..efb57c0 100644
--- a/drivers/video/fbdev/pxa168fb.c
+++ b/drivers/video/fbdev/pxa168fb.c
@@ -615,7 +615,7 @@ static int pxa168fb_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	clk = clk_get(&pdev->dev, "LCDCLK");
+	clk = devm_clk_get(&pdev->dev, "LCDCLK");
 	if (IS_ERR(clk)) {
 		dev_err(&pdev->dev, "unable to get LCDCLK");
 		return PTR_ERR(clk);
@@ -624,21 +624,18 @@ static int pxa168fb_probe(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (res = NULL) {
 		dev_err(&pdev->dev, "no IO memory defined\n");
-		ret = -ENOENT;
-		goto failed_put_clk;
+		return -ENOENT;
 	}
 
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
 		dev_err(&pdev->dev, "no IRQ defined\n");
-		ret = -ENOENT;
-		goto failed_put_clk;
+		return -ENOENT;
 	}
 
 	info = framebuffer_alloc(sizeof(struct pxa168fb_info), &pdev->dev);
 	if (info = NULL) {
-		ret = -ENOMEM;
-		goto failed_put_clk;
+		return -ENOMEM;
 	}
 
 	/* Initialize private data */
@@ -776,8 +773,6 @@ failed_free_fbmem:
 			info->screen_base, fbi->fb_start_dma);
 failed_free_info:
 	kfree(info);
-failed_put_clk:
-	clk_put(clk);
 
 	dev_err(&pdev->dev, "frame buffer device init failed with %d\n", ret);
 	return ret;
@@ -813,7 +808,6 @@ static int pxa168fb_remove(struct platform_device *pdev)
 				info->screen_base, info->fix.smem_start);
 
 	clk_disable(fbi->clk);
-	clk_put(fbi->clk);
 
 	framebuffer_release(info);
 
-- 
1.9.1


^ permalink raw reply related

* Re: [PATCH] ARC: add negative dependency for VGA_CONSOLE
From: Geert Uytterhoeven @ 2015-08-17 16:21 UTC (permalink / raw)
  To: Yuriy Kolerov
  Cc: linux-kernel@vger.kernel.org, Linux-Arch,
	Linux Fbdev development list, Arnd Bergmann, Andrew Morton,
	Jean-Christophe PLAGNIOL-VILLARD, Tomi Valkeinen, Vineet Gupta,
	Alexey Brodkin, Anton.Kolesov, Francois Bedard
In-Reply-To: <1439826777-11489-1-git-send-email-yuriy.kolerov@synopsys.com>

On Mon, Aug 17, 2015 at 5:52 PM, Yuriy Kolerov
<yuriy.kolerov@synopsys.com> wrote:
> Architectures which support VGA console must define screen_info
> structurture from "uapi/linux/screen_info.h". Otherwise undefined
> symbol error occurs. Usually it's defined in "setup.c" for each
> architecture.
>
> If an architecture does not support VGA console (ARC's case)
> there are 2 ways: define a dummy instance of screen_info or add
> a negative dependency for VGA_CONSOLE in to prevent selecting
> this option.
>
> I've implemented the second way. However the best solution is to
> add HAVE_VGA_CONSOLE option for targets which support VGA
> console. Then turn off VGA_CONSOLE by default and add dependency
> to HAVE_VGA_CONSOLE. But right now it's better to just add a
> negative dependency for ARC and then consider how to collaborate
> about this issue with maintainers of other architectures.

+1

> Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCH] ARC: add negative dependency for VGA_CONSOLE
From: Yuriy Kolerov @ 2015-08-17 15:52 UTC (permalink / raw)
  To: linux-kernel, linux-arch, linux-fbdev
  Cc: arnd, akpm, plagnioj, tomi.valkeinen, Vineet.Gupta1,
	Alexey.Brodkin, Anton.Kolesov, Francois.Bedard, Yuriy Kolerov

Architectures which support VGA console must define screen_info
structurture from "uapi/linux/screen_info.h". Otherwise undefined
symbol error occurs. Usually it's defined in "setup.c" for each
architecture.

If an architecture does not support VGA console (ARC's case)
there are 2 ways: define a dummy instance of screen_info or add
a negative dependency for VGA_CONSOLE in to prevent selecting
this option.

I've implemented the second way. However the best solution is to
add HAVE_VGA_CONSOLE option for targets which support VGA
console. Then turn off VGA_CONSOLE by default and add dependency
to HAVE_VGA_CONSOLE. But right now it's better to just add a
negative dependency for ARC and then consider how to collaborate
about this issue with maintainers of other architectures.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
---
 drivers/video/console/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index fe1cd01..5d27ba0 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -9,7 +9,7 @@ config VGA_CONSOLE
 	depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && \
 		!SUPERH && !BLACKFIN && !AVR32 && !MN10300 && !CRIS && \
 		(!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) && \
-		!ARM64
+		!ARM64 && !ARC
 	default y
 	help
 	  Saying Y here will allow you to use Linux in text mode through a
-- 
2.2.0


^ permalink raw reply related

* Re: [PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU module
From: Timur Tabi @ 2015-08-17 12:31 UTC (permalink / raw)
  To: Wang Dongsheng, Scott Wood
  Cc: Jin Jason, linuxppc-dev@lists.ozlabs.org,
	linux-fbdev@vger.kernel.org
In-Reply-To: <SN1PR0301MB1616FC248A1601A8D1C530859D790@SN1PR0301MB1616.namprd03.prod.outlook.com>

Wang Dongsheng wrote:
> Thanks Timur.
>
> @Scott,
> Could you apply this patch?

You need to ask the fbdev maintainer to apply it, because it has to go 
through his tree.


^ permalink raw reply

* Re: [PATCH] backlight: sky81452: Remove unneeded use of IS_ERR_VALUE() macro
From: Lee Jones @ 2015-08-17  8:21 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1439798357.21881.1.camel@ingics.com>

On Mon, 17 Aug 2015, Axel Lin wrote:

> IS_ERR_VALUE() makes sense only *if* there could be valid values in
> negative error range.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/video/backlight/sky81452-backlight.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

Applied, thanks.

> diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
> index 052fa1b..d414c7a 100644
> --- a/drivers/video/backlight/sky81452-backlight.c
> +++ b/drivers/video/backlight/sky81452-backlight.c
> @@ -65,7 +65,7 @@ static int sky81452_bl_update_status(struct backlight_device *bd)
>  
>  	if (brightness > 0) {
>  		ret = regmap_write(regmap, SKY81452_REG0, brightness - 1);
> -		if (IS_ERR_VALUE(ret))
> +		if (ret < 0)
>  			return ret;
>  
>  		return regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
> @@ -87,12 +87,12 @@ static ssize_t sky81452_bl_store_enable(struct device *dev,
>  	int ret;
>  
>  	ret = kstrtoul(buf, 16, &value);
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		return ret;
>  
>  	ret = regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
>  					value << CTZ(SKY81452_EN));
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		return ret;
>  
>  	return count;
> @@ -108,7 +108,7 @@ static ssize_t sky81452_bl_show_open_short(struct device *dev,
>  
>  	reg = !strcmp(attr->attr.name, "open") ? SKY81452_REG5 : SKY81452_REG4;
>  	ret = regmap_read(regmap, reg, &value);
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		return ret;
>  
>  	if (value & SKY81452_SHRT) {
> @@ -136,7 +136,7 @@ static ssize_t sky81452_bl_show_fault(struct device *dev,
>  	int ret;
>  
>  	ret = regmap_read(regmap, SKY81452_REG4, &value);
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		return ret;
>  
>  	*buf = 0;
> @@ -196,7 +196,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
>  	pdata->gpio_enable = of_get_gpio(np, 0);
>  
>  	ret = of_property_count_u32_elems(np, "led-sources");
> -	if (IS_ERR_VALUE(ret)) {
> +	if (ret < 0) {
>  		pdata->enable = SKY81452_EN >> CTZ(SKY81452_EN);
>  	} else {
>  		num_entry = ret;
> @@ -205,7 +205,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
>  
>  		ret = of_property_read_u32_array(np, "led-sources", sources,
>  					num_entry);
> -		if (IS_ERR_VALUE(ret)) {
> +		if (ret < 0) {
>  			dev_err(dev, "led-sources node is invalid.\n");
>  			return ERR_PTR(-EINVAL);
>  		}
> @@ -218,12 +218,12 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
>  	ret = of_property_read_u32(np,
>  			"skyworks,short-detection-threshold-volt",
>  			&pdata->short_detection_threshold);
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		pdata->short_detection_threshold = 7;
>  
>  	ret = of_property_read_u32(np, "skyworks,current-limit-mA",
>  			&pdata->boost_current_limit);
> -	if (IS_ERR_VALUE(ret))
> +	if (ret < 0)
>  		pdata->boost_current_limit = 2750;
>  
>  	of_node_put(np);
> @@ -278,14 +278,14 @@ static int sky81452_bl_probe(struct platform_device *pdev)
>  	if (gpio_is_valid(pdata->gpio_enable)) {
>  		ret = devm_gpio_request_one(dev, pdata->gpio_enable,
>  					GPIOF_OUT_INIT_HIGH, "sky81452-en");
> -		if (IS_ERR_VALUE(ret)) {
> +		if (ret < 0) {
>  			dev_err(dev, "failed to request GPIO. err=%d\n", ret);
>  			return ret;
>  		}
>  	}
>  
>  	ret = sky81452_bl_init_device(regmap, pdata);
> -	if (IS_ERR_VALUE(ret)) {
> +	if (ret < 0) {
>  		dev_err(dev, "failed to initialize. err=%d\n", ret);
>  		return ret;
>  	}
> @@ -302,8 +302,8 @@ static int sky81452_bl_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, bd);
>  
> -	ret  = sysfs_create_group(&bd->dev.kobj, &sky81452_bl_attr_group);
> -	if (IS_ERR_VALUE(ret)) {
> +	ret = sysfs_create_group(&bd->dev.kobj, &sky81452_bl_attr_group);
> +	if (ret < 0) {
>  		dev_err(dev, "failed to create attribute. err=%d\n", ret);
>  		return ret;
>  	}

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply

* [PATCH] ocfb: remove incorrect __iomem annotation
From: Christoph Hellwig @ 2015-08-17  8:10 UTC (permalink / raw)
  To: linux-fbdev

Make sparse happy:

drivers/video/fbdev/ocfb.c:375:64: sparse: incorrect type in argument 3 (different address spaces)

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/video/fbdev/ocfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/ocfb.c b/drivers/video/fbdev/ocfb.c
index de98196..97f11d2 100644
--- a/drivers/video/fbdev/ocfb.c
+++ b/drivers/video/fbdev/ocfb.c
@@ -62,7 +62,7 @@ struct ocfb_dev {
 	int little_endian;
 	/* Physical and virtual addresses of framebuffer */
 	dma_addr_t fb_phys;
-	void __iomem *fb_virt;
+	void *fb_virt;
 	u32 pseudo_palette[PALETTE_SIZE];
 };
 
-- 
1.9.1


^ permalink raw reply related

* [PATCH] backlight: sky81452: Remove unneeded use of IS_ERR_VALUE() macro
From: Axel Lin @ 2015-08-17  7:59 UTC (permalink / raw)
  To: linux-fbdev

IS_ERR_VALUE() makes sense only *if* there could be valid values in
negative error range.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/video/backlight/sky81452-backlight.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c
index 052fa1b..d414c7a 100644
--- a/drivers/video/backlight/sky81452-backlight.c
+++ b/drivers/video/backlight/sky81452-backlight.c
@@ -65,7 +65,7 @@ static int sky81452_bl_update_status(struct backlight_device *bd)
 
 	if (brightness > 0) {
 		ret = regmap_write(regmap, SKY81452_REG0, brightness - 1);
-		if (IS_ERR_VALUE(ret))
+		if (ret < 0)
 			return ret;
 
 		return regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
@@ -87,12 +87,12 @@ static ssize_t sky81452_bl_store_enable(struct device *dev,
 	int ret;
 
 	ret = kstrtoul(buf, 16, &value);
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		return ret;
 
 	ret = regmap_update_bits(regmap, SKY81452_REG1, SKY81452_EN,
 					value << CTZ(SKY81452_EN));
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		return ret;
 
 	return count;
@@ -108,7 +108,7 @@ static ssize_t sky81452_bl_show_open_short(struct device *dev,
 
 	reg = !strcmp(attr->attr.name, "open") ? SKY81452_REG5 : SKY81452_REG4;
 	ret = regmap_read(regmap, reg, &value);
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		return ret;
 
 	if (value & SKY81452_SHRT) {
@@ -136,7 +136,7 @@ static ssize_t sky81452_bl_show_fault(struct device *dev,
 	int ret;
 
 	ret = regmap_read(regmap, SKY81452_REG4, &value);
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		return ret;
 
 	*buf = 0;
@@ -196,7 +196,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
 	pdata->gpio_enable = of_get_gpio(np, 0);
 
 	ret = of_property_count_u32_elems(np, "led-sources");
-	if (IS_ERR_VALUE(ret)) {
+	if (ret < 0) {
 		pdata->enable = SKY81452_EN >> CTZ(SKY81452_EN);
 	} else {
 		num_entry = ret;
@@ -205,7 +205,7 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
 
 		ret = of_property_read_u32_array(np, "led-sources", sources,
 					num_entry);
-		if (IS_ERR_VALUE(ret)) {
+		if (ret < 0) {
 			dev_err(dev, "led-sources node is invalid.\n");
 			return ERR_PTR(-EINVAL);
 		}
@@ -218,12 +218,12 @@ static struct sky81452_bl_platform_data *sky81452_bl_parse_dt(
 	ret = of_property_read_u32(np,
 			"skyworks,short-detection-threshold-volt",
 			&pdata->short_detection_threshold);
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		pdata->short_detection_threshold = 7;
 
 	ret = of_property_read_u32(np, "skyworks,current-limit-mA",
 			&pdata->boost_current_limit);
-	if (IS_ERR_VALUE(ret))
+	if (ret < 0)
 		pdata->boost_current_limit = 2750;
 
 	of_node_put(np);
@@ -278,14 +278,14 @@ static int sky81452_bl_probe(struct platform_device *pdev)
 	if (gpio_is_valid(pdata->gpio_enable)) {
 		ret = devm_gpio_request_one(dev, pdata->gpio_enable,
 					GPIOF_OUT_INIT_HIGH, "sky81452-en");
-		if (IS_ERR_VALUE(ret)) {
+		if (ret < 0) {
 			dev_err(dev, "failed to request GPIO. err=%d\n", ret);
 			return ret;
 		}
 	}
 
 	ret = sky81452_bl_init_device(regmap, pdata);
-	if (IS_ERR_VALUE(ret)) {
+	if (ret < 0) {
 		dev_err(dev, "failed to initialize. err=%d\n", ret);
 		return ret;
 	}
@@ -302,8 +302,8 @@ static int sky81452_bl_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, bd);
 
-	ret  = sysfs_create_group(&bd->dev.kobj, &sky81452_bl_attr_group);
-	if (IS_ERR_VALUE(ret)) {
+	ret = sysfs_create_group(&bd->dev.kobj, &sky81452_bl_attr_group);
+	if (ret < 0) {
 		dev_err(dev, "failed to create attribute. err=%d\n", ret);
 		return ret;
 	}
-- 
2.1.0




^ permalink raw reply related

* Re: [PATCH v2 00/10] pwm: add support for atomic update
From: Boris Brezillon @ 2015-08-17  7:18 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20150725083657.6111ff59@bbrezillon>

On Sat, 25 Jul 2015 08:36:57 +0200
Boris Brezillon <boris.brezillon@free-electrons.com> wrote:

> Hi Thierry,
> 
> Should I resend a new version rebased on Mark's pwm topic branch or
> would you like to review this one first ?

Ping.

> 
> Best Regards,
> 
> Boris
> 
> On Mon, 20 Jul 2015 17:31:57 +0200
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
> 
> > Hello Thierry,
> > 
> > This series adds support for atomic PWM update, or IOW, the capability
> > to update all the parameters of a PWM device (enabled/disabled, period,
> > duty and polarity) in one go.
> > 
> > Best Regards,
> > 
> > Boris
> > 
> > Changes since v1:
> > - dropped applied patches
> > - squashed Heiko's fixes into the rockchip driver changes
> > - made a few cosmetic changes
> > - added kerneldoc comments
> > - added Heiko's patch to display more information in debugfs
> > - dropped pwm-regulator patches (should be submitted separately)
> > 
> > Boris Brezillon (9):
> >   pwm: introduce default period and polarity concepts
> >   pwm: define a new pwm_state struct
> >   pwm: move the enabled/disabled info to pwm_state struct
> >   backlight: pwm_bl: remove useless call to pwm_set_period
> >   pwm: declare a default PWM state
> >   pwm: add the PWM initial state retrieval infra
> >   pwm: add the core infrastructure to allow atomic update
> >   pwm: rockchip: add initial state retrieval
> >   pwm: rockchip: add support for atomic update
> > 
> > Heiko Stübner (1):
> >   pwm: add information about polarity, duty cycle and period to debugfs
> > 
> >  drivers/leds/leds-pwm.c              |   2 +-
> >  drivers/pwm/core.c                   | 169 +++++++++++++++++++++++++++++++----
> >  drivers/pwm/pwm-pxa.c                |   2 +-
> >  drivers/pwm/pwm-rockchip.c           | 119 +++++++++++++++++++-----
> >  drivers/pwm/pwm-sun4i.c              |   3 +-
> >  drivers/regulator/pwm-regulator.c    |   2 +-
> >  drivers/video/backlight/lm3630a_bl.c |   4 +-
> >  drivers/video/backlight/pwm_bl.c     |  10 ++-
> >  drivers/video/fbdev/ssd1307fb.c      |   2 +-
> >  include/linux/pwm.h                  |  86 +++++++++++++++---
> >  10 files changed, 336 insertions(+), 63 deletions(-)
> > 
> 
> 
> 



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply

* RE: [PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU module
From: Wang Dongsheng @ 2015-08-17  6:05 UTC (permalink / raw)
  To: Timur Tabi, Scott Wood
  Cc: Jin Jason, linuxppc-dev@lists.ozlabs.org,
	linux-fbdev@vger.kernel.org
In-Reply-To: <55CEB5CB.4060803@tabi.org>

Thanks Timur.

@Scott,
Could you apply this patch?

Regards,
-Dongsheng

> -----Original Message-----
> From: Timur Tabi [mailto:timur@tabi.org]
> Sent: Saturday, August 15, 2015 11:45 AM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Jin Zhengxiong-R64188; linuxppc-dev@lists.ozlabs.org;
> linux-fbdev@vger.kernel.org
> Subject: Re: [PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU
> module
> 
> Dongsheng Wang wrote:
> > For deep sleep, the diu module will power off, when wake up from the
> > deep sleep, the registers need to be reinitialized.
> >
> > Signed-off-by: Jason Jin<Jason.Jin@freescale.com>
> > Signed-off-by: Wang Dongsheng<dongsheng.wang@freescale.com>
> 
> Acked-by: Timur Tabi <timur@tabi.org>


^ permalink raw reply

* Re: [PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU module
From: Timur Tabi @ 2015-08-15  3:45 UTC (permalink / raw)
  To: Dongsheng Wang; +Cc: scottwood, Jason.Jin, linuxppc-dev, linux-fbdev
In-Reply-To: <1439531649-46827-1-git-send-email-dongsheng.wang@freescale.com>

Dongsheng Wang wrote:
> For deep sleep, the diu module will power off, when wake up
> from the deep sleep, the registers need to be reinitialized.
>
> Signed-off-by: Jason Jin<Jason.Jin@freescale.com>
> Signed-off-by: Wang Dongsheng<dongsheng.wang@freescale.com>

Acked-by: Timur Tabi <timur@tabi.org>


^ permalink raw reply

* [PATCH] Staging: sm750fb: Fix "foo* bar" should be "foo *bar" errors
From: Shah, Yash (Y.) @ 2015-08-14  6:06 UTC (permalink / raw)
  To: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	gregkh@linuxfoundation.org
  Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Babu, Viswanathan (V.)

From: Yash Shah <yshah1@visteon.com>

Fix "foo* bar" should be "foo *bar" errors as detected by
checkpatch.pl

Signed-off-by: Yash Shah <yshah1@visteon.com>
---
 drivers/staging/sm750fb/sm750.h        | 14 +++++++-------
 drivers/staging/sm750fb/sm750_cursor.c |  4 ++--
 drivers/staging/sm750fb/sm750_cursor.h |  4 ++--
 drivers/staging/sm750fb/sm750_hw.h     |  6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9b101a9..5bc4455 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -16,9 +16,9 @@ extern int smi_indent;
 
 struct lynx_accel {
 	/* base virtual address of DPR registers */
-	volatile unsigned char __iomem * dprBase;
+	volatile unsigned char __iomem *dprBase;
 	/* base virtual address of de data port */
-	volatile unsigned char __iomem * dpPortBase;
+	volatile unsigned char __iomem *dpPortBase;
 
 	/* function fointers */
 	void (*de_init)(struct lynx_accel *);
@@ -64,8 +64,8 @@ struct lynx_share {
 	/* locks*/
 	spinlock_t slock;
 	/* function pointers */
-	void (*suspend)(struct lynx_share*);
-	void (*resume)(struct lynx_share*);
+	void (*suspend)(struct lynx_share *);
+	void (*resume)(struct lynx_share *);
 };
 
 struct lynx_cursor {
@@ -80,7 +80,7 @@ struct lynx_cursor {
 	char __iomem *vstart;
 	int offset;
 	/* mmio addr of hw cursor */
-	volatile char __iomem * mmio;
+	volatile char __iomem *mmio;
 	/* the lynx_share of this adaptor */
 	struct lynx_share *share;
 	/* proc_routines */
@@ -114,7 +114,7 @@ struct lynxfb_crtc {
 
 	int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
 	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
-	void (*clear)(struct lynxfb_crtc*);
+	void (*clear)(struct lynxfb_crtc *);
 	/* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
 			       const struct fb_var_screeninfo *,
@@ -146,7 +146,7 @@ struct lynxfb_output {
 
 	int (*proc_checkMode)(struct lynxfb_output*, struct fb_var_screeninfo*);
 	int (*proc_setBLANK)(struct lynxfb_output*, int);
-	void  (*clear)(struct lynxfb_output*);
+	void  (*clear)(struct lynxfb_output *);
 };
 
 struct lynxfb_par {
diff --git a/drivers/staging/sm750fb/sm750_cursor.c b/drivers/staging/sm750fb/sm750_cursor.c
index 2400c6c..a94a4bb 100644
--- a/drivers/staging/sm750fb/sm750_cursor.c
+++ b/drivers/staging/sm750fb/sm750_cursor.c
@@ -95,7 +95,7 @@ void hw_cursor_setColor(struct lynx_cursor *cursor,
 }
 
 void hw_cursor_setData(struct lynx_cursor *cursor,
-			u16 rop, const u8* pcol, const u8* pmsk)
+			u16 rop, const u8 *pcol, const u8 *pmsk)
 {
 	int i, j, count, pitch, offset;
 	u8 color, mask, opr;
@@ -184,7 +184,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
 
 
 void hw_cursor_setData2(struct lynx_cursor *cursor,
-			u16 rop, const u8* pcol, const u8* pmsk)
+			u16 rop, const u8 *pcol, const u8 *pmsk)
 {
 	int i, j, count, pitch, offset;
 	u8 color, mask;
diff --git a/drivers/staging/sm750fb/sm750_cursor.h b/drivers/staging/sm750fb/sm750_cursor.h
index e1716a6..6c4fc9b 100644
--- a/drivers/staging/sm750fb/sm750_cursor.h
+++ b/drivers/staging/sm750fb/sm750_cursor.h
@@ -11,7 +11,7 @@ void hw_cursor_setPos(struct lynx_cursor *cursor,
 void hw_cursor_setColor(struct lynx_cursor *cursor,
 						u32 fg, u32 bg);
 void hw_cursor_setData(struct lynx_cursor *cursor,
-			u16 rop, const u8* data, const u8* mask);
+			u16 rop, const u8 *data, const u8 *mask);
 void hw_cursor_setData2(struct lynx_cursor *cursor,
-			u16 rop, const u8* data, const u8* mask);
+			u16 rop, const u8 *data, const u8 *mask);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index ef0a16f..3781a1a 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -78,7 +78,7 @@ struct sm750_share {
 	*/
 };
 
-int hw_sm750_map(struct lynx_share* share, struct pci_dev* pdev);
+int hw_sm750_map(struct lynx_share *share, struct pci_dev *pdev);
 int hw_sm750_inithw(struct lynx_share*, struct pci_dev *);
 void hw_sm750_initAccel(struct lynx_share *);
 int hw_sm750_deWait(void);
@@ -92,8 +92,8 @@ int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-void hw_sm750_crtc_clear(struct lynxfb_crtc*);
-void hw_sm750_output_clear(struct lynxfb_output*);
+void hw_sm750_crtc_clear(struct lynxfb_crtc *);
+void hw_sm750_output_clear(struct lynxfb_output *);
 int hw_sm750_pan_display(struct lynxfb_crtc *crtc,
 			 const struct fb_var_screeninfo *var,
 			 const struct fb_info *info);
-- 
1.9.1

^ permalink raw reply related

* [PATCH v2] video: fbdev: fsl: Fix the sleep function for FSL DIU module
From: Dongsheng Wang @ 2015-08-14  5:54 UTC (permalink / raw)
  To: timur; +Cc: scottwood, Jason.Jin, linuxppc-dev, linux-fbdev, Wang Dongsheng

From: Jason Jin <Jason.Jin@freescale.com>

For deep sleep, the diu module will power off, when wake up
from the deep sleep, the registers need to be reinitialized.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
*v2*
Changes:
- int i -> unsigned int i.

Rmove:
- struct mfb_info *mfbi;

diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 7fa2e6f..b335c1a 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1628,9 +1628,16 @@ static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
 static int fsl_diu_resume(struct platform_device *ofdev)
 {
 	struct fsl_diu_data *data;
+	unsigned int i;
 
 	data = dev_get_drvdata(&ofdev->dev);
-	enable_lcdc(data->fsl_diu_info);
+
+	fsl_diu_enable_interrupts(data);
+	update_lcdc(data->fsl_diu_info);
+	for (i = 0; i < NUM_AOIS; i++) {
+		if (data->mfb[i].count)
+			fsl_diu_enable_panel(&data->fsl_diu_info[i]);
+	}
 
 	return 0;
 }
-- 
2.1.0.27.g96db324


^ permalink raw reply related

* RE: [PATCH] video/fsl: Fix the sleep function for FSL DIU module
From: Wang Dongsheng @ 2015-08-14  5:53 UTC (permalink / raw)
  To: Timur Tabi
  Cc: Scott Wood, Jin Jason, Li Leo, linuxppc-dev@lists.ozlabs.org,
	linux-fbdev@vger.kernel.org
In-Reply-To: <5331A6BA.9030507@tabi.org>

Hi Tabi,

> -----Original Message-----
> From: Timur Tabi [mailto:timur@tabi.org]
> Sent: Tuesday, March 25, 2014 11:55 PM
> To: Wang Dongsheng-B40534
> Cc: Wood Scott-B07421; Jin Zhengxiong-R64188; Li Yang-Leo-R58472; linuxppc-
> dev@lists.ozlabs.org; linux-fbdev@vger.kernel.org
> Subject: Re: [PATCH] video/fsl: Fix the sleep function for FSL DIU module
> 
> On 03/25/2014 02:56 AM, Dongsheng Wang wrote:
> > From: Jason Jin <Jason.Jin@freescale.com>
> >
> > For deep sleep, the diu module will power off, when wake up from the
> > deep sleep, the registers need to be reinitialized.
> >
> > Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
> > Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> >
> > diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> > index e8758b9..7ec780c 100644
> > --- a/drivers/video/fsl-diu-fb.c
> > +++ b/drivers/video/fsl-diu-fb.c
> > @@ -1628,9 +1628,18 @@ static int fsl_diu_suspend(struct platform_device
> *ofdev, pm_message_t state)
> >   static int fsl_diu_resume(struct platform_device *ofdev)
> >   {
> >   	struct fsl_diu_data *data;
> > +	struct mfb_info *mfbi;
> 
> You don't need this, if ...
> 
> > +	int i;
> >
> >   	data = dev_get_drvdata(&ofdev->dev);
> > -	enable_lcdc(data->fsl_diu_info);
> > +	fsl_diu_enable_interrupts(data);
> > +	update_lcdc(data->fsl_diu_info);
> > +
> > +	for (i = 0; i < NUM_AOIS; i++) {
> > +		mfbi = &data->mfb[i];
> > +		if (mfbi->count)
> 
> ... you do this:
> 
> 		if (data->mfb[i].count)
> 
> Also, 'i' should be an 'unsigned int'.
> 
> > +			fsl_diu_enable_panel(&data->fsl_diu_info[i]);
> > +	}
> >
> >   	return 0;
> >   }
> >
> 
> Other than that, this seems okay.
> 

Thanks, send v2 to update this patch.

Regards,
-Dongsheng

^ permalink raw reply

* Re: [PATCH] fbdev: select versatile helpers for the integrator
From: Tomi Valkeinen @ 2015-08-13  9:00 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1438090272-26266-1-git-send-email-linus.walleij@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]



On 13/08/15 11:59, Linus Walleij wrote:
> On Mon, Aug 10, 2015 at 11:19 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> On 10/08/15 12:03, Linus Walleij wrote:
>>> On Tue, Jul 28, 2015 at 3:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>>
>>>> Commit 11c32d7b6274cb0f554943d65bd4a126c4a86dcd
>>>> "video: move Versatile CLCD helpers" missed the fact
>>>> that the Integrator/CP is also using the helper, and
>>>> as a result the platform got only stubs and no graphics.
>>>> Add this as a default selection to Kconfig so we have
>>>> graphics again.
>>>>
>>>> Fixes: 11c32d7b6274 (video: move Versatile CLCD helpers)
>>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>>
>>> Ping on this.
>>>
>>> Shall I take this into ARM SoC instead?
>>
>> Sorry, I still haven't gotten into dealing with fbdev related mails
>> after my vacation...
>>
>> This is needed for 4.2, right? I can pick this up.
> 
> In theory, it's not like it's regressing the world. I'm fine with
> 4.3 at this point of you just keep the Fixes:... tag.

It's in Linus' tree already.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH] fbdev: select versatile helpers for the integrator
From: Linus Walleij @ 2015-08-13  8:59 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1438090272-26266-1-git-send-email-linus.walleij@linaro.org>

On Mon, Aug 10, 2015 at 11:19 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 10/08/15 12:03, Linus Walleij wrote:
>> On Tue, Jul 28, 2015 at 3:31 PM, Linus Walleij <linus.walleij@linaro.org> wrote:
>>
>>> Commit 11c32d7b6274cb0f554943d65bd4a126c4a86dcd
>>> "video: move Versatile CLCD helpers" missed the fact
>>> that the Integrator/CP is also using the helper, and
>>> as a result the platform got only stubs and no graphics.
>>> Add this as a default selection to Kconfig so we have
>>> graphics again.
>>>
>>> Fixes: 11c32d7b6274 (video: move Versatile CLCD helpers)
>>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>>
>> Ping on this.
>>
>> Shall I take this into ARM SoC instead?
>
> Sorry, I still haven't gotten into dealing with fbdev related mails
> after my vacation...
>
> This is needed for 4.2, right? I can pick this up.

In theory, it's not like it's regressing the world. I'm fine with
4.3 at this point of you just keep the Fixes:... tag.

Yours,
Linus Walleij

^ permalink raw reply

* [RFC 7/8] drm: Add support for pps and compression mode command packet
From: vikas.korjani @ 2015-08-12  9:27 UTC (permalink / raw)
  To: intel-gfx
  Cc: linux-fbdev, David Airlie, linux-kernel, dri-devel,
	Tomi Valkeinen, Jean-Christophe Plagniol-Villard
In-Reply-To: <1439373233-8188-1-git-send-email-vikas.korjani@intel.com>

From: vkorjani <vikas.korjani@intel.com>

After enabling DSC we need to send compression mode command packet
and pps data packet, for which 2 new data types are added
07h  Compression Mode Data Type Write , short write, 2 parameters
0Ah  PPS Long Write (word count determines number of bytes)
This patch adds support to send these packets.

Cc: David Airlie <airlied@linux.ie>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org

Signed-off-by: vkorjani <vikas.korjani@intel.com>
---
 drivers/gpu/drm/drm_mipi_dsi.c |   29 +++++++++++++++++++++++++++++
 include/drm/drm_mipi_dsi.h     |    4 +++-
 include/video/mipi_display.h   |    3 +++
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index 2d5ca8ee..cd536d1 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -521,6 +521,35 @@ ssize_t mipi_dsi_dcs_write_buffer(struct mipi_dsi_device *dsi,
 EXPORT_SYMBOL(mipi_dsi_dcs_write_buffer);
 
 /**
+ *   mipi_dsi_dsc_pps_write_buffer() - transmit a DSC command with payload
+ *   @dsi: DSI peripheral device
+ *   @data: buffer containing data to be transmitted
+ *   @len: size of transmission buffer
+ *
+ *   function will automatically choose the right data type depending on
+ *   the command payload length.
+ *
+ *   Return: The number of bytes successfully transmitted or a negative error
+ *   code on failure.*/
+ssize_t mipi_dsi_dsc_pps_write_buffer(struct mipi_dsi_device *dsi,
+		const void *data, size_t len)
+{
+	 struct mipi_dsi_msg msg = {
+		.channel = dsi->channel,
+		.tx_buf = data,
+		.tx_len = len
+	 };
+
+	if (len = 0)
+		msg.type = MIPI_DSI_DCS_COMPRESSION_MODE;
+	else
+		msg.type = MIPI_DSI_PPS_LONG_WRITE;
+
+	return  mipi_dsi_device_transfer(dsi, &msg);
+}
+EXPORT_SYMBOL(mipi_dsi_dsc_pps_write_buffer);
+
+/**
  * mipi_dsi_dcs_write() - send DCS write command
  * @dsi: DSI peripheral device
  * @cmd: DCS command
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index f1d8d0d..2aa5120 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -197,7 +197,9 @@ ssize_t mipi_dsi_dcs_write_buffer(struct mipi_dsi_device *dsi,
 ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, u8 cmd,
 			   const void *data, size_t len);
 ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
-			  size_t len);
+				size_t len);
+ssize_t mipi_dsi_dsc_pps_write_buffer(struct mipi_dsi_device *dsi,
+				const void *data, size_t len);
 int mipi_dsi_dcs_nop(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_soft_reset(struct mipi_dsi_device *dsi);
 int mipi_dsi_dcs_get_power_mode(struct mipi_dsi_device *dsi, u8 *mode);
diff --git a/include/video/mipi_display.h b/include/video/mipi_display.h
index ddcc8ca..880e6e6 100644
--- a/include/video/mipi_display.h
+++ b/include/video/mipi_display.h
@@ -38,6 +38,9 @@ enum {
 
 	MIPI_DSI_DCS_READ				= 0x06,
 
+	MIPI_DSI_DCS_COMPRESSION_MODE                   = 0x07,
+	MIPI_DSI_PPS_LONG_WRITE                         = 0x0A,
+
 	MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE		= 0x37,
 
 	MIPI_DSI_END_OF_TRANSMISSION			= 0x08,
-- 
1.7.9.5


^ permalink raw reply related

* Re: [Xen-devel] [PATCH v3 0/9] Use correctly the Xen memory terminologies
From: David Vrabel @ 2015-08-11 17:37 UTC (permalink / raw)
  To: Julien Grall, xen-devel
  Cc: linux-fbdev, x86, netdev, H. Peter Anvin, Jiri Slaby,
	Thomas Gleixner, Russell King, linux-scsi, Tomi Valkeinen,
	stefano.stabellini, Ingo Molnar, linux-input,
	Jean-Christophe Plagniol-Villard, ian.campbell,
	James E.J. Bottomley, Boris Ostrovsky, linux-arm-kernel,
	Juergen Gross, Wei Liu, Greg Kroah-Hartman, Dmitry Torokhov,
	linux-kernel, David Vrabel, linux-api, linuxppc-d
In-Reply-To: <1438965282-19103-1-git-send-email-julien.grall@citrix.com>

On 07/08/15 17:34, Julien Grall wrote:
> Hi all,
> 
> This patch series aims to use the memory terminologies described in
> include/xen/mm.h [1] for Linux xen code.

Applied to for-linus-4.3, thanks.

David

^ permalink raw reply

* [GIT PULL] fbdev fixes for 4.2-rc7
From: Tomi Valkeinen @ 2015-08-11 13:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-fbdev, linux-kernel@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]

Hi Linus,

The following changes since commit f7644cbfcdf03528f0f450f3940c4985b2291f49:

  Linux 4.2-rc6 (2015-08-09 15:54:30 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git tags/fbdev-fixes-4.2

for you to fetch changes up to 2a17d7e80f1df44d6b94c3696d5eda44fe6638a8:

  fbcon: unconditionally initialize cursor blink interval (2015-08-10 17:20:32 +0300)

----------------------------------------------------------------
fbdev fixes for 4.2

* Fix display regression on Versatile boards
* Fix OF node refcount bugs on omapdss
* fix WARN about clock prepare on pxa3xx_gcu
* Fix mem leak in videomode helpers
* Fix fbconsole related boot problem on sun7i-a20-olinuxino-micro

----------------------------------------------------------------
Christian Engelmayer (1):
      video: Fix possible leak in of_get_videomode()

Jyri Sarha (2):
      OMAPDSS: Fix node refcount leak in omapdss_of_get_next_port()
      OMAPDSS: Fix omap_dss_find_output_by_port_node() port refcount decrement

Linus Walleij (1):
      fbdev: select versatile helpers for the integrator

Robert Jarzmik (1):
      video: fbdev: pxa3xx_gcu: prepare the clocks

Scot Doyle (1):
      fbcon: unconditionally initialize cursor blink interval

 drivers/video/console/fbcon.c          | 3 ++-
 drivers/video/fbdev/Kconfig            | 2 +-
 drivers/video/fbdev/omap2/dss/dss-of.c | 4 +++-
 drivers/video/fbdev/pxa3xx-gcu.c       | 4 ++--
 drivers/video/of_videomode.c           | 4 +---
 5 files changed, 9 insertions(+), 8 deletions(-)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH v2 09/11] fbdev: Allow compile test of GPIO consumers if !GPIOLIB
From: Geert Uytterhoeven @ 2015-08-11  7:28 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jean-Christophe Plagniol-Villard, Linux Fbdev development list,
	Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org
In-Reply-To: <55C9A2C3.1060001@ti.com>

Hi Tomi,

On Tue, Aug 11, 2015 at 9:22 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 02/08/15 12:09, Geert Uytterhoeven wrote:
>> The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
>> not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
>> functionality only, can still be compiled if GPIOLIB is not enabled.
>>
>> Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
>> appropriate.
>>
>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Acked-by: Linus Walleij <linus.walleij@linaro.org>

> Applied to 4.3 fbdev.

Thanks!

> I do wonder why this is needed, though... I understand COMPILE_TEST if
> the dependency in question is difficult/impossible to enable with your
> kernel config (say, enabling OMAP SoC support with x86 config), but
> isn't GPIOLIB something that can be trivially enabled in any kernel config?

While there are a few mfd and pinctrl drivers that select GPIOLIB, the
presence of GPIOLIB is mostly a platform feature. Not all architectures support
GPIOLIB yet.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox