* Re: [PATCH v10 0/6] Add Skyworks SKY81452 device drivers
From: Lee Jones @ 2015-01-18 17:40 UTC (permalink / raw)
To: gyungoh-Re5JQEeQqe8AvxtiuMwx3w
Cc: sameo-VuQAYsv1563Yd54FQh9/CA, grant.likely-QSEj5FYQhm4dnm+yROfE0A,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, jg1.han-Sze3O3UU22JBDgjK7y7TUQ,
cooloney-Re5JQEeQqe8AvxtiuMwx3w, pawel.moll-5wv7dgnIgG8,
mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg,
galak-sgV2jX0FEOL9JmXXK+q4OQ, trivial-DgEjT+Ai2ygdnm+yROfE0A,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
jic23-DgEjT+Ai2ygdnm+yROfE0A,
thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
ktsai-GubuWUlQtMwciDkP5Hr2oA, hs-ynQEQJNshbs,
stwiss.opensource-WBD+wuPFNBhBDgjK7y7TUQ,
matti.vaittinen-OYasijW0DpE, broonie-DgEjT+Ai2ygdnm+yROfE0A,
jason-NLaQJdtUoK4Be96aLqz0jA, heiko-4mtYJXux2i+zQB+pC5nmwQ,
shawn.guo-KZfg59tc24xl57MIdRCFDg, florian.vaussard-p8DiymsW2f8,
andrew-g2DYL2Zd6BY, antonynpavlov-Re5JQEeQqe8AvxtiuMwx3w,
hytszk-Re5JQEeQqe8AvxtiuMwx3w, plagnioj-sclMFOaUSTBWk0Htik3J/w,
tomi.valkeinen-l0cyMroinI0, jack.yoo-tjhQNA90jdKqndwCJWfcng,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1420597167-3188-1-git-send-email-jack.yoo-tjhQNA90jdKqndwCJWfcng@public.gmane.org>
> From: Gyungoh Yoo <jack.yoo@skyworksinc.com>
>
> This patch set includes regulator and backlight driver for SKY81452.
> Also it includes documents for device tree and module.
> sky81452-regulator was already applied. So this series doesn't
> include it.
Tell us what you need? What's missing?
> v10:
> Removed trivial get_brightness implementations for sky81452-backlight
>
> v9:
> Removed the change to remove MODULE_VERSION() for sky81452-regulator
>
> v8:
> Renamed property names for backlight with vendor prefix
> Modified gpio-enable property to generic property for GPIO
> Made up the example for backlight DT
> Changed the DT parsing of regulator using regulator_node and of_match
>
> v7:
> Modified licensing text to GPLv2
> Splitted Kconfig renaming from DT patch
>
> v6:
> Added new line character at the end of line of dev_err()
>
> v5:
> Changed DT for regulator : 'lout' node should be defined under 'regulator'
> Removed compatible string from sky81452-regulator driver
> Modified sky81452-regulator to return EINVAL when of_node is NULL
> Move sky81452-backlight.h to include/linux/platform_data
>
> v4:
> Removed MODULE_VERSION()
> Modified license to GPLv2
> Removed calling to backlight_device_unregister() in sky81452-backlight
>
> v3:
> Cleaned-up DBG messages
> Cleaned-up DT
> Fixed the backlight name from 'sky81452-bl' to 'sky81452-backlight'
> Assigned mfd_cell.of_compatible for binding device node
> Modified error messages
> Modified sky81452-regulator to return ENODATA when of_node is NULL
>
> v2:
> Split the patches for each sub-system
> Added 'reg' attribute for I2C address in device tree documents
> Added 'compatible' attribute in child drivers
> Renamed CONFIG_SKY81452 to CONFIG_MFD_SKY81452
> Changed the dependency from I2C=y to I2C, for CONFIG_MFD_SKY81452
> Added message for exception or errors.
> Added vendor prefix for Skyworks Solutions, Inc.
> Add SKY81452 to the Trivial Devices list
>
> Gyungoh Yoo (6):
> mfd: Add support for Skyworks SKY81452 driver
> backlight: Add support Skyworks SKY81452 backlight driver
> devicetree: mfd: Add new SKY81452 mfd binding
> devicetree: backlight: Add new SKY81452 backlight binding
> devicetree: Add vendor prefix for Skyworks Solutions, Inc.
> devicetree: i2c: Add SKY81452 to the Trivial Devices list
>
> .../devicetree/bindings/i2c/trivial-devices.txt | 1 +
> Documentation/devicetree/bindings/mfd/sky81452.txt | 36 +++
> .../devicetree/bindings/vendor-prefixes.txt | 1 +
> .../video/backlight/sky81452-backlight.txt | 29 ++
> drivers/mfd/Kconfig | 12 +
> drivers/mfd/Makefile | 1 +
> drivers/mfd/sky81452.c | 108 +++++++
> drivers/video/backlight/Kconfig | 10 +
> drivers/video/backlight/Makefile | 1 +
> drivers/video/backlight/sky81452-backlight.c | 334 +++++++++++++++++++++
> include/linux/mfd/sky81452.h | 31 ++
> include/linux/platform_data/sky81452-backlight.h | 46 +++
> 12 files changed, 610 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/sky81452.txt
> create mode 100644 Documentation/devicetree/bindings/video/backlight/sky81452-backlight.txt
> create mode 100644 drivers/mfd/sky81452.c
> create mode 100644 drivers/video/backlight/sky81452-backlight.c
> create mode 100644 include/linux/mfd/sky81452.h
> create mode 100644 include/linux/platform_data/sky81452-backlight.h
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* Re: [PATCH 3/3] backlight: 88pm860x_bl: Use of_get_child_by_name() instead of refcount hack
From: Lee Jones @ 2015-01-18 12:46 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Benjamin Herrenschmidt, Bryan Wu, Richard Purdie, Jingoo Han,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1421243519-6257-4-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
On Wed, 14 Jan 2015, Geert Uytterhoeven wrote:
> of_find_node_by_name() calls of_node_put() on its "from" parameter.
> To counter this, pm860x_backlight_dt_init() calls of_node_get() first.
>
> Use of_get_child_by_name() instead to get rid of the refcount hack.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: linux-fbdev@vger.kernel.org
> ---
> Compile-tested only
> ---
> drivers/video/backlight/88pm860x_bl.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Looks good, applied, thanks.
> diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
> index 9a23698b6fe8398c..2da5862876d1fe78 100644
> --- a/drivers/video/backlight/88pm860x_bl.c
> +++ b/drivers/video/backlight/88pm860x_bl.c
> @@ -168,10 +168,7 @@ static int pm860x_backlight_dt_init(struct platform_device *pdev,
> struct device_node *nproot, *np;
> int iset = 0;
>
> - nproot = of_node_get(pdev->dev.parent->of_node);
> - if (!nproot)
> - return -ENODEV;
> - nproot = of_find_node_by_name(nproot, "backlights");
> + nproot = of_get_child_by_name(pdev->dev.parent->of_node, "backlights");
> if (!nproot) {
> dev_err(&pdev->dev, "failed to find backlights node\n");
> return -ENODEV;
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* [PATCH] video: mx3fb: fix up wait_for_completion_timeout return handling
From: Nicholas Mc Guire @ 2015-01-18 1:37 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jingoo Han, Denis Carikli, Daniel Vetter, Sascha Hauer,
linux-fbdev, linux-kernel, Nicholas Mc Guire
Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
return type of wait_for_completion_timeout is unsigned long as ret is
used only for checking wait_for_completion_timeout here the type was
changed to unsigned long, wait_for_completion_timeout return >= 0 only
so the checks for negative return canbe dropped.
This patch was only compiletested using imx_v4_v5_defconfig
Patch is against 3.19.0-rc4 -next-20150116
drivers/video/fbdev/mx3fb.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 7947634..523134f 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1144,7 +1144,7 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
struct scatterlist *sg = mx3_fbi->sg;
struct dma_chan *dma_chan = &mx3_fbi->idmac_channel->dma_chan;
struct dma_async_tx_descriptor *txd;
- int ret;
+ unsigned long ret;
dev_dbg(fbi->device, "%s [%c]\n", __func__,
list_empty(&mx3_fbi->idmac_channel->queue) ? '-' : '+');
@@ -1184,12 +1184,11 @@ static int mx3fb_pan_display(struct fb_var_screeninfo *var,
enable_irq(mx3_fbi->idmac_channel->eof_irq);
ret = wait_for_completion_timeout(&mx3_fbi->flip_cmpl, HZ / 10);
- if (ret <= 0) {
+ if (ret = 0) {
mutex_unlock(&mx3_fbi->mutex);
- dev_info(fbi->device, "Panning failed due to %s\n", ret < 0 ?
- "user interrupt" : "timeout");
+ dev_info(fbi->device, "Panning failed due to timeout\n");
disable_irq(mx3_fbi->idmac_channel->eof_irq);
- return ret ? : -ETIMEDOUT;
+ return -ETIMEDOUT;
}
mx3_fbi->cur_ipu_buf = !mx3_fbi->cur_ipu_buf;
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH 1/3] Revert "staging: sm7xxfb: remove driver"
From: Greg Kroah-Hartman @ 2015-01-18 0:09 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: devel, linux-fbdev, Sudip Mukherjee, Teddy Wang, linux-kernel
In-Reply-To: <1420028805-30488-1-git-send-email-sudipm.mukherjee@gmail.com>
On Wed, Dec 31, 2014 at 05:56:43PM +0530, Sudip Mukherjee wrote:
> This reverts commit "dc93c85235efa5201e9a3c116bc3fbd1afc1a182"
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> ---
>
> Hi Greg K-H
> With reference to our discussion at https://lkml.org/lkml/2014/11/22/54 ,
> now I have the hardware and I will be working on the code along with
> Teddy Wang.
I'm not going to accept this revert until I see some cleanup / fix
patches as well, so please make a larger series with the revert and then
some work done to the driver, so I at least have a hint it's not
abandonded.
thanks,
greg k-h
^ permalink raw reply
* [PATCH] video: fbdev: Fix sparse warning messages
From: David Ung @ 2015-01-17 0:40 UTC (permalink / raw)
To: linux-fbdev
Use NULL instead of 0 for the last entry of dmt_modes struct.
Supresses "sparse: Using plain integer as NULL pointer" warning.
Signed-off-by: David Ung <davidu@nvidia.com>
---
drivers/video/fbdev/core/modedb.c | 74 +++++++++++++++++++--------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c
index 858a97e..7d07cf8 100644
--- a/drivers/video/fbdev/core/modedb.c
+++ b/drivers/video/fbdev/core/modedb.c
@@ -511,69 +511,69 @@ const struct dmt_videomode dmt_modes[DMT_SIZE] = {
{ 0x0a, 0x454c, 0x000000, &vesa_modes[9] },
{ 0x0b, 0x454f, 0x000000, &vesa_modes[10] },
{ 0x0c, 0x4559, 0x000000, &vesa_modes[11] },
- { 0x0d, 0x0000, 0x000000, 0 },
- { 0x0e, 0x0000, 0x000000, 0 },
+ { 0x0d, 0x0000, 0x000000, NULL },
+ { 0x0e, 0x0000, 0x000000, NULL },
{ 0x0f, 0x0000, 0x000000, &vesa_modes[12] },
{ 0x10, 0x6140, 0x000000, &vesa_modes[13] },
{ 0x11, 0x614a, 0x000000, &vesa_modes[14] },
{ 0x12, 0x614f, 0x000000, &vesa_modes[15] },
{ 0x13, 0x6159, 0x000000, &vesa_modes[16] },
- { 0x14, 0x0000, 0x000000, 0 },
+ { 0x14, 0x0000, 0x000000, NULL },
{ 0x15, 0x714f, 0x000000, &vesa_modes[17] },
- { 0x16, 0x0000, 0x7f1c21, 0 },
- { 0x17, 0x0000, 0x7f1c28, 0 },
- { 0x18, 0x0000, 0x7f1c44, 0 },
- { 0x19, 0x0000, 0x7f1c62, 0 },
- { 0x1a, 0x0000, 0x000000, 0 },
- { 0x1b, 0x0000, 0x8f1821, 0 },
- { 0x1c, 0x8100, 0x8f1828, 0 },
- { 0x1d, 0x810f, 0x8f1844, 0 },
- { 0x1e, 0x8119, 0x8f1862, 0 },
- { 0x1f, 0x0000, 0x000000, 0 },
+ { 0x16, 0x0000, 0x7f1c21, NULL },
+ { 0x17, 0x0000, 0x7f1c28, NULL },
+ { 0x18, 0x0000, 0x7f1c44, NULL },
+ { 0x19, 0x0000, 0x7f1c62, NULL },
+ { 0x1a, 0x0000, 0x000000, NULL },
+ { 0x1b, 0x0000, 0x8f1821, NULL },
+ { 0x1c, 0x8100, 0x8f1828, NULL },
+ { 0x1d, 0x810f, 0x8f1844, NULL },
+ { 0x1e, 0x8119, 0x8f1862, NULL },
+ { 0x1f, 0x0000, 0x000000, NULL },
{ 0x20, 0x8140, 0x000000, &vesa_modes[18] },
{ 0x21, 0x8159, 0x000000, &vesa_modes[19] },
- { 0x22, 0x0000, 0x000000, 0 },
+ { 0x22, 0x0000, 0x000000, NULL },
{ 0x23, 0x8180, 0x000000, &vesa_modes[20] },
{ 0x24, 0x818f, 0x000000, &vesa_modes[21] },
{ 0x25, 0x8199, 0x000000, &vesa_modes[22] },
- { 0x26, 0x0000, 0x000000, 0 },
- { 0x27, 0x0000, 0x000000, 0 },
- { 0x28, 0x0000, 0x000000, 0 },
- { 0x29, 0x0000, 0x0c2021, 0 },
- { 0x2a, 0x9040, 0x0c2028, 0 },
- { 0x2b, 0x904f, 0x0c2044, 0 },
- { 0x2c, 0x9059, 0x0c2062, 0 },
- { 0x2d, 0x0000, 0x000000, 0 },
- { 0x2e, 0x9500, 0xc11821, 0 },
- { 0x2f, 0x9500, 0xc11828, 0 },
- { 0x30, 0x950f, 0xc11844, 0 },
- { 0x31, 0x9519, 0xc11868, 0 },
- { 0x32, 0x0000, 0x000000, 0 },
+ { 0x26, 0x0000, 0x000000, NULL },
+ { 0x27, 0x0000, 0x000000, NULL },
+ { 0x28, 0x0000, 0x000000, NULL },
+ { 0x29, 0x0000, 0x0c2021, NULL },
+ { 0x2a, 0x9040, 0x0c2028, NULL },
+ { 0x2b, 0x904f, 0x0c2044, NULL },
+ { 0x2c, 0x9059, 0x0c2062, NULL },
+ { 0x2d, 0x0000, 0x000000, NULL },
+ { 0x2e, 0x9500, 0xc11821, NULL },
+ { 0x2f, 0x9500, 0xc11828, NULL },
+ { 0x30, 0x950f, 0xc11844, NULL },
+ { 0x31, 0x9519, 0xc11868, NULL },
+ { 0x32, 0x0000, 0x000000, NULL },
{ 0x33, 0xa940, 0x000000, &vesa_modes[23] },
{ 0x34, 0xa945, 0x000000, &vesa_modes[24] },
{ 0x35, 0xa94a, 0x000000, &vesa_modes[25] },
{ 0x36, 0xa94f, 0x000000, &vesa_modes[26] },
{ 0x37, 0xa959, 0x000000, &vesa_modes[27] },
- { 0x38, 0x0000, 0x000000, 0 },
- { 0x39, 0x0000, 0x0c2821, 0 },
- { 0x3a, 0xb300, 0x0c2828, 0 },
- { 0x3b, 0xb30f, 0x0c2844, 0 },
- { 0x3c, 0xb319, 0x0c2868, 0 },
- { 0x3d, 0x0000, 0x000000, 0 },
+ { 0x38, 0x0000, 0x000000, NULL },
+ { 0x39, 0x0000, 0x0c2821, NULL },
+ { 0x3a, 0xb300, 0x0c2828, NULL },
+ { 0x3b, 0xb30f, 0x0c2844, NULL },
+ { 0x3c, 0xb319, 0x0c2868, NULL },
+ { 0x3d, 0x0000, 0x000000, NULL },
{ 0x3e, 0xc140, 0x000000, &vesa_modes[28] },
{ 0x3f, 0xc14f, 0x000000, &vesa_modes[29] },
- { 0x40, 0x0000, 0x000000, 0 },
+ { 0x40, 0x0000, 0x000000, NULL},
{ 0x41, 0xc940, 0x000000, &vesa_modes[30] },
{ 0x42, 0xc94f, 0x000000, &vesa_modes[31] },
- { 0x43, 0x0000, 0x000000, 0 },
+ { 0x43, 0x0000, 0x000000, NULL },
{ 0x44, 0x0000, 0x572821, &vesa_modes[34] },
{ 0x45, 0xd100, 0x572828, &vesa_modes[35] },
{ 0x46, 0xd10f, 0x572844, &vesa_modes[36] },
{ 0x47, 0xd119, 0x572862, &vesa_modes[37] },
- { 0x48, 0x0000, 0x000000, 0 },
+ { 0x48, 0x0000, 0x000000, NULL },
{ 0x49, 0xd140, 0x000000, &vesa_modes[32] },
{ 0x4a, 0xd14f, 0x000000, &vesa_modes[33] },
- { 0x4b, 0x0000, 0x000000, 0 },
+ { 0x4b, 0x0000, 0x000000, NULL },
{ 0x4c, 0x0000, 0x1f3821, &vesa_modes[38] },
{ 0x4d, 0x0000, 0x1f3828, &vesa_modes[39] },
{ 0x4e, 0x0000, 0x1f3844, &vesa_modes[40] },
--
1.8.1.5
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply related
* [PATCH v2] fbdev: ssd1307fb: return proper error code if write command fails
From: Lad, Prabhakar @ 2015-01-15 19:05 UTC (permalink / raw)
To: LFBDEV, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
Maxime Ripard
Cc: LKML, Prabhakar Lad
From: Prabhakar Lad <prabhakar.csengg@gmail.com>
this patch fixes ssd1307fb_ssd1306_init() function to return
proper error codes in case of failures.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
Changes for v2:
a: Added new line as per Maxime's suggestion.
drivers/video/fbdev/ssd1307fb.c | 67 ++++++++++++++++++++++++++++++++---------
1 file changed, 53 insertions(+), 14 deletions(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f4daa59..0ea6345 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -320,7 +320,10 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
/* Set initial contrast */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CONTRAST);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x7f);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x7f);
if (ret < 0)
return ret;
@@ -336,63 +339,99 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
/* Set multiplex ratio value */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_MULTIPLEX_RATIO);
- ret = ret & ssd1307fb_write_cmd(par->client, par->height - 1);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, par->height - 1);
if (ret < 0)
return ret;
/* set display offset value */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_DISPLAY_OFFSET);
+ if (ret < 0)
+ return ret;
+
ret = ssd1307fb_write_cmd(par->client, 0x20);
if (ret < 0)
return ret;
/* Set clock frequency */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_CLOCK_FREQ);
- ret = ret & ssd1307fb_write_cmd(par->client, 0xf0);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0xf0);
if (ret < 0)
return ret;
/* Set precharge period in number of ticks from the internal clock */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_PRECHARGE_PERIOD);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x22);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x22);
if (ret < 0)
return ret;
/* Set COM pins configuration */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_COM_PINS_CONFIG);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x22);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x22);
if (ret < 0)
return ret;
/* Set VCOMH */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_VCOMH);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x49);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x49);
if (ret < 0)
return ret;
/* Turn on the DC-DC Charge Pump */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CHARGE_PUMP);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x14);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x14);
if (ret < 0)
return ret;
/* Switch to horizontal addressing mode */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_ADDRESS_MODE);
- ret = ret & ssd1307fb_write_cmd(par->client,
- SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client,
+ SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL);
if (ret < 0)
return ret;
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_COL_RANGE);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x0);
- ret = ret & ssd1307fb_write_cmd(par->client, par->width - 1);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x0);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, par->width - 1);
if (ret < 0)
return ret;
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_PAGE_RANGE);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x0);
- ret = ret & ssd1307fb_write_cmd(par->client,
- par->page_offset + (par->height / 8) - 1);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client, 0x0);
+ if (ret < 0)
+ return ret;
+
+ ret = ssd1307fb_write_cmd(par->client,
+ par->page_offset + (par->height / 8) - 1);
if (ret < 0)
return ret;
--
1.9.1
^ permalink raw reply related
* Is fbdev deprecated?
From: Noralf Tronnes @ 2015-01-15 15:58 UTC (permalink / raw)
To: linux-fbdev
Hi,
I've read several comments on this list that indicates that fbdev should
be avoided for new drivers.
I'm writing drivers for MIPI DBI type 1 compatible controllers with
onchip RAM.
This onchip memory is scanned out to the panel. So the driver just
sync's the
framebuffer with the controller memory (partial updates also).
I rely on deferred io to do this. The ssd1307fb is a similar type of driver.
Is this still a use case for fbdev, or is DRM the only way now?
Here's a description of the driver stack:
https://github.com/notro/fbdbi/wiki
Regards,
Noralf Trønnes
^ permalink raw reply
* Re: [patch] fbdev: off by one test (harmless)
From: Tomi Valkeinen @ 2015-01-15 12:52 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]
On 15/01/15 14:43, Dan Carpenter wrote:
> Sounds good to me. :) Could I get a Reported-by cookie?
Oh, sorry. I thought I had added that, but... seems I didn't. Well now it's
there. So updated patch below.
I'll queue it for 3.20 if there are no comments.
Tomi
From 80fa3aed6f89728e9003bb0bdbd0b4bac2bc2186 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 15 Jan 2015 13:47:19 +0200
Subject: [PATCH] fbdev: fix cea_modes array size
CEA defines 64 modes, indexed from 1 to 64. modedb has cea_modes arrays,
which contains 64 entries. However, the code uses the CEA indices
directly, i.e. the first mode is at cea_modes[1]. This means the array
is one too short.
This does not cause references to uninitialized memory as the code in
fbmon only allows indexes up to 63, and the cea_modes does not contain
an entry for the mode 64 so it could not be used in any case.
However, the code contains a check 'if (idx > ARRAY_SIZE(cea_modes)',
and while that check is a no-op as at that point idx cannot be >= 63, it
upsets static checkers.
Fix this by increasing the cea_array size to be 65, and change the code
to allow mode 64.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/video/fbdev/core/fbmon.c | 4 ++--
drivers/video/fbdev/core/modedb.c | 2 +-
include/linux/fb.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 5b0e313849bd..1829fe34a1df 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1059,9 +1059,9 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
int idx = svd[i - specs->modedb_len - num];
- if (!idx || idx > 63) {
+ if (!idx || idx >= ARRAY_SIZE(cea_modes)) {
pr_warning("Reserved SVD code %d\n", idx);
- } else if (idx > ARRAY_SIZE(cea_modes) || !cea_modes[idx].xres) {
+ } else if (!cea_modes[idx].xres) {
pr_warning("Unimplemented SVD code %d\n", idx);
} else {
memcpy(&m[i], cea_modes + idx, sizeof(m[i]));
diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c
index 388f7971494b..b2aba4e3150a 100644
--- a/drivers/video/fbdev/core/modedb.c
+++ b/drivers/video/fbdev/core/modedb.c
@@ -289,7 +289,7 @@ static const struct fb_videomode modedb[] = {
};
#ifdef CONFIG_FB_MODE_HELPERS
-const struct fb_videomode cea_modes[64] = {
+const struct fb_videomode cea_modes[65] = {
/* #1: 640x480p@59.94/60Hz */
[1] = {
NULL, 60, 640, 480, 39722, 48, 16, 33, 10, 96, 2, 0,
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 09bb7a18d287..024260687698 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -779,7 +779,7 @@ struct fb_videomode {
extern const char *fb_mode_option;
extern const struct fb_videomode vesa_modes[];
-extern const struct fb_videomode cea_modes[64];
+extern const struct fb_videomode cea_modes[65];
struct fb_modelist {
struct list_head list;
--
2.2.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related
* Re: [patch] fbdev: off by one test (harmless)
From: Dan Carpenter @ 2015-01-15 12:43 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
Sounds good to me. :) Could I get a Reported-by cookie?
regards,
dan carpenter
^ permalink raw reply
* Re: [patch] fbdev: off by one test (harmless)
From: Tomi Valkeinen @ 2015-01-15 12:39 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
On 15/01/15 14:26, Dan Carpenter wrote:
> On Thu, Jan 15, 2015 at 01:56:58PM +0200, Tomi Valkeinen wrote:
>>
>> Here's a fix for the cea_array size. Does it silence the static checker?
>>
>
> No.
>
>> for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
>> int idx = svd[i - specs->modedb_len - num];
>> - if (!idx || idx > 63) {
>> + if (!idx || idx > 64) {
>> pr_warning("Reserved SVD code %d\n", idx);
>> } else if (idx > ARRAY_SIZE(cea_modes) || !cea_modes[idx].xres) {
>> pr_warning("Unimplemented SVD code %d\n", idx);
>
> This static check ignores the value of "idx".
>
> It is only looking at "idx > ARRAY_SIZE(cea_modes)" which is off by one
> and "idx" is used as an index in "!cea_modes[idx].xres".
Ah, right, I missed that in my patch. The check should obviously be
changed to:
if (idx >= ARRAY_SIZE(cea_modes)
But maybe it would be better to clean up the whole if statement to
remove the duplicate check. So in addition to increasing the cea_array size:
if (idx == 0 || idx >= ARRAY_SIZE(cea_modes)) {
pr_warning("Reserved SVD code %d\n", idx);
} else if (!cea_modes[idx].xres) {
pr_warning("Unimplemented SVD code %d\n", idx);
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [patch] fbdev: off by one test (harmless)
From: Dan Carpenter @ 2015-01-15 12:26 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
On Thu, Jan 15, 2015 at 01:56:58PM +0200, Tomi Valkeinen wrote:
>
> Here's a fix for the cea_array size. Does it silence the static checker?
>
No.
> for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
> int idx = svd[i - specs->modedb_len - num];
> - if (!idx || idx > 63) {
> + if (!idx || idx > 64) {
> pr_warning("Reserved SVD code %d\n", idx);
> } else if (idx > ARRAY_SIZE(cea_modes) || !cea_modes[idx].xres) {
> pr_warning("Unimplemented SVD code %d\n", idx);
This static check ignores the value of "idx".
It is only looking at "idx > ARRAY_SIZE(cea_modes)" which is off by one
and "idx" is used as an index in "!cea_modes[idx].xres".
The thinking behind this static checker warnings is that off-by-one bugs
are an easy way to boost your patch count even if it's impossible to hit
them in real life. :) The value of "idx" is deliberately ignored.
regards,
dan carpenter
^ permalink raw reply
* Re: [patch] fbdev: off by one test (harmless)
From: Tomi Valkeinen @ 2015-01-15 11:56 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
[-- Attachment #1: Type: text/plain, Size: 3817 bytes --]
On 13/01/15 13:19, Tomi Valkeinen wrote:
> On 29/12/14 23:51, David Ung wrote:
>>
>>>> test is really a no-op. But it's still off by one and upsets the
>>>> static checkers so we may as well correct it.
>>>
>>> 'idx' should be 0~63, because cea_modes array is defined as
>>> 'cea_modes[64]'.
>>
>> According to CEA/EIA-861E, there are 64 defined modes, but idx is valid for 1-64, 0 is reserved hence the check for
>>
>> If (!idx || idx > 63) {
>>
>> Think idx check really should be !idx || idx > 64 if following CEA/EIA-861E
>
> In that case there's something funny with the code. The code indexes
> 'cea_modes' using 'idx', and I _think_ cea_modes is already offset
> properly, i.e. there's no entry at 0. But its length is 64, which is not
> right, as there's the empty item in the beginning.
>
> So maybe the correct fix is to increase the length of cea_modes to 65,
> and change the idx check as you mention above?
Here's a fix for the cea_array size. Does it silence the static checker?
Tomi
From ec1edd4683ca3cc0b3b6e5feffae861e404d16d2 Mon Sep 17 00:00:00 2001
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date: Thu, 15 Jan 2015 13:47:19 +0200
Subject: [PATCH] fbdev: fix cea_modes array size
CEA defines 64 modes, indexed from 1 to 64. modedb has cea_modes arrays,
which contains 64 entries. However, the code uses the CEA indices
directly, i.e. the first mode is at cea_modes[1]. This means the array
is one too short.
This does not cause references to uninitialized memory as the code in
fbmon only allows indexes up to 63, and the cea_modes does not contain
an entry for the mode 64 so it could not be used in any case.
However, the code contains a check 'if (idx > ARRAY_SIZE(cea_modes)',
and while that check is a no-op as at that point idx cannot be >= 63, it
upsets static checkers.
Fix this by increasing the cea_array size to be 65, and change the code
to allow mode 64.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/video/fbdev/core/fbmon.c | 2 +-
drivers/video/fbdev/core/modedb.c | 2 +-
include/linux/fb.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/core/fbmon.c b/drivers/video/fbdev/core/fbmon.c
index 5b0e313849bd..0fea923c3cb6 100644
--- a/drivers/video/fbdev/core/fbmon.c
+++ b/drivers/video/fbdev/core/fbmon.c
@@ -1059,7 +1059,7 @@ void fb_edid_add_monspecs(unsigned char *edid, struct fb_monspecs *specs)
for (i = specs->modedb_len + num; i < specs->modedb_len + num + svd_n; i++) {
int idx = svd[i - specs->modedb_len - num];
- if (!idx || idx > 63) {
+ if (!idx || idx > 64) {
pr_warning("Reserved SVD code %d\n", idx);
} else if (idx > ARRAY_SIZE(cea_modes) || !cea_modes[idx].xres) {
pr_warning("Unimplemented SVD code %d\n", idx);
diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c
index 388f7971494b..b2aba4e3150a 100644
--- a/drivers/video/fbdev/core/modedb.c
+++ b/drivers/video/fbdev/core/modedb.c
@@ -289,7 +289,7 @@ static const struct fb_videomode modedb[] = {
};
#ifdef CONFIG_FB_MODE_HELPERS
-const struct fb_videomode cea_modes[64] = {
+const struct fb_videomode cea_modes[65] = {
/* #1: 640x480p@59.94/60Hz */
[1] = {
NULL, 60, 640, 480, 39722, 48, 16, 33, 10, 96, 2, 0,
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 09bb7a18d287..024260687698 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -779,7 +779,7 @@ struct fb_videomode {
extern const char *fb_mode_option;
extern const struct fb_videomode vesa_modes[];
-extern const struct fb_videomode cea_modes[64];
+extern const struct fb_videomode cea_modes[65];
struct fb_modelist {
struct list_head list;
--
2.2.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related
* Re: [patch] fbdev: off by one test (harmless)
From: Tomi Valkeinen @ 2015-01-15 11:42 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]
On 14/01/15 07:24, David Ung wrote:
>
>> -----Original Message-----
>> From: Tomi Valkeinen [mailto:tomi.valkeinen@ti.com]
>> Sent: Tuesday, January 13, 2015 3:19 AM
>> To: David Ung; 'Jingoo Han'; 'Dan Carpenter'
>> Cc: 'Jean-Christophe Plagniol-Villard'; 'Daniel Vetter'; 'Laurent Pinchart';
>> 'Rob Clark'; linux-fbdev@vger.kernel.org; kernel-janitors@vger.kernel.org
>> Subject: Re: [patch] fbdev: off by one test (harmless)
>>
>> * PGP Signed by an unknown key
>>
>> On 29/12/14 23:51, David Ung wrote:
>>>
>>>>> test is really a no-op. But it's still off by one and upsets the
>>>>> static checkers so we may as well correct it.
>>>>
>>>> 'idx' should be 0~63, because cea_modes array is defined as
>>>> 'cea_modes[64]'.
>>>
>>> According to CEA/EIA-861E, there are 64 defined modes, but idx is
>>> valid for 1-64, 0 is reserved hence the check for
>>>
>>> If (!idx || idx > 63) {
>>>
>>> Think idx check really should be !idx || idx > 64 if following
>>> CEA/EIA-861E
>>
>> In that case there's something funny with the code. The code indexes
>> 'cea_modes' using 'idx', and I _think_ cea_modes is already offset properly,
>> i.e. there's no entry at 0. But its length is 64, which is not right, as there's the
>> empty item in the beginning.
>>
>> So maybe the correct fix is to increase the length of cea_modes to 65, and
>> change the idx check as you mention above?
>>
>
> In that case might aswell go with CEA/EAI-861F for completeness and have the check against 107.
> but with a slight waste of memory.
Then we need to fill in the new modes. Or leave them blank, but then,
what would be the point.
And I'd rather not add new stuff to fbdev that is not absolutely needed.
Everybody should move to DRM =).
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH V2 1/3] video: fbdev: Add additional vesa modes
From: Tomi Valkeinen @ 2015-01-15 11:38 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <1421204667-16669-1-git-send-email-davidu@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
On 14/01/15 05:04, David Ung wrote:
> Add high resolution modes to vesa_modes struct.
>
> Signed-off-by: David Ung <davidu@nvidia.com>
> ---
> drivers/video/fbdev/core/modedb.c | 27 +++++++++++++++++++++++++++
> include/linux/fb.h | 2 +-
> 2 files changed, 28 insertions(+), 1 deletion(-)
Thanks, queued the series for 3.20.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH 1/2] fbdev: ssd1307fb: set default height if not found in DT node
From: Tomi Valkeinen @ 2015-01-15 11:27 UTC (permalink / raw)
To: Lad, Prabhakar, LFBDEV, Jean-Christophe Plagniol-Villard,
Maxime Ripard
Cc: LKML
In-Reply-To: <1420705079-3741-2-git-send-email-prabhakar.csengg@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On 08/01/15 10:17, Lad, Prabhakar wrote:
> this patch sets the default height if its not found in DT.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> drivers/video/fbdev/ssd1307fb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index f4daa59..70e3ce8 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -460,7 +460,7 @@ static int ssd1307fb_probe(struct i2c_client *client,
> par->width = 96;
>
> if (of_property_read_u32(node, "solomon,height", &par->height))
> - par->width = 16;
> + par->height = 16;
>
> if (of_property_read_u32(node, "solomon,page-offset", &par->page_offset))
> par->page_offset = 1;
>
Thanks, queued for 3.20.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH] fbdev: ssd1307fb: drop unused function ssd1307fb_write_data()
From: Tomi Valkeinen @ 2015-01-15 11:26 UTC (permalink / raw)
To: Lad, Prabhakar, LFBDEV, Jean-Christophe Plagniol-Villard,
Maxime Ripard
Cc: LKML
In-Reply-To: <1421090474-4243-1-git-send-email-prabhakar.csengg@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
On 12/01/15 21:21, Lad, Prabhakar wrote:
> this patch drops the unused function ssd1307fb_write_data().
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> drivers/video/fbdev/ssd1307fb.c | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index a7ecaa6..c891f11 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -122,23 +122,6 @@ static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
> return ret;
> }
>
> -static inline int ssd1307fb_write_data(struct i2c_client *client, u8 data)
> -{
> - struct ssd1307fb_array *array;
> - int ret;
> -
> - array = ssd1307fb_alloc_array(1, SSD1307FB_DATA);
> - if (!array)
> - return -ENOMEM;
> -
> - array->data[0] = data;
> -
> - ret = ssd1307fb_write_array(client, array, 1);
> - kfree(array);
> -
> - return ret;
> -}
> -
> static void ssd1307fb_update_display(struct ssd1307fb_par *par)
> {
> struct ssd1307fb_array *array;
>
Thanks, queued for 3.20.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [GIT PULL] fbdev fixes for 3.19
From: Tomi Valkeinen @ 2015-01-15 11:23 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Fbdev development list, LKML
In-Reply-To: <54899F0E.4090309@ti.com>
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
Hi Linus,
Please pull fbdev fixes for 3.19:
The following changes since commit eaa27f34e91a14cdceed26ed6c6793ec1d186115:
linux 3.19-rc4 (2015-01-11 12:44:53 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git tags/fbdev-fixes-3.19
for you to fetch changes up to ef6899cdc8608e2f018e590683f04bb04a069704:
fbdev/broadsheetfb: fix memory leak (2015-01-13 15:13:45 +0200)
----------------------------------------------------------------
fbdev fixes for 3.19
* broadsheetfb: fix memory leak
* simplefb: fix build failure on sparc
----------------------------------------------------------------
Colin Ian King (1):
fbdev/broadsheetfb: fix memory leak
Hans de Goede (1):
simplefb: Fix build failure on Sparc
drivers/video/fbdev/broadsheetfb.c | 8 +++++---
drivers/video/fbdev/simplefb.c | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* RE: SSD1306 OLED driver
From: Ssagarr Patil @ 2015-01-14 16:38 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BAY176-W246A4D5C3A23D1928FC5D3D38C0@phx.gbl>
Hi Greet,
>>
>>> pattern. Am I missing something.
>>
>> That's because that test requires 16 colors, although these aren't used.
>>
>> If you change ".numcolors \x16" to ".numcolors = 2" in tests/test010.c,
>> it should at least draw some text, but the colors may be of as it
>> failed to install
>> the 16-color console pallette.
>>
> Thanks for your response, I did try with setting .numcolors = 2 but it doesnt help
> neither I still don’t see 'Hello World' on the oled.
>
Sorry for back to back mails.
Is there any graphics library to draw text ? can directfb be used ?
Here is the verbose output of fbtest:
# ./fbtest -f /dev/fb0 -v -d
fb_init()
fb_open()
fb_get_var()
fb_get_fix()
fb_map()
fb_start = 0, fb_offset = 0, fb_len = 4000
fb_save()
fb_clear()
Using drawops cfb16 (16 bpp packed pixels)
clut_create_rgbcube(): RGB 8x8x8
Available visuals:
Monochrome
Grayscale 32
Truecolor 5:6:5:0
Using visops truecolor
Running all tests
Running test test001
test001: PASSED
Running test test002
test002: PASSED
Running test test003
test003: PASSED
Running test test004
test004: PASSED
Running test test005
clut_create_rgbcube(): RGB 8x8x8
test005: PASSED
Running test test006
test006: PASSED
Running test test007
Visual 6 not supported
Running test test008
test008: PASSED
Running test test009
Screen size too small for this test
Not applicable
Running test test010
test010: PASSED
Running test test011
No support for virtual screen and panning
Running test test012
Benchmarking... 10x10 squares: 70.19 Mpixels/s
Benchmarking... 20x20 squares: 163.23 Mpixels/s
Benchmarking... 50x50 squares: 451.62 Mpixels/s
test012: PASSED
fb_cleanup()
fb_restore()
fb_unmap()
fb_set_var()
fb_get_var()
fb_get_fix()
fb_close()
Thanks & Regards,
Sagar
^ permalink raw reply
* RE: SSD1306 OLED driver
From: Ssagarr Patil @ 2015-01-14 16:17 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BAY176-W246A4D5C3A23D1928FC5D3D38C0@phx.gbl>
Hi Greet,
>
> On Wed, Jan 14, 2015 at 2:51 PM, Ssagarr Patil <hugarsagar@outlook.com> wrote:
>> I am also able to run the fbtest application, but with test10 I do not see 'hello world'
>
> Good!
>
>> pattern. Am I missing something.
>
> That's because that test requires 16 colors, although these aren't used.
>
> If you change ".numcolors \x16" to ".numcolors = 2" in tests/test010.c,
> it should at least draw some text, but the colors may be of as it
> failed to install
> the 16-color console pallette.
>
Thanks for your response, I did try with setting .numcolors = 2 but it doesnt help
neither I still don’t see 'Hello World' on the oled.
Thanks & Regards,
Sagar
^ permalink raw reply
* Re: SSD1306 OLED driver
From: Geert Uytterhoeven @ 2015-01-14 15:27 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BAY176-W246A4D5C3A23D1928FC5D3D38C0@phx.gbl>
Hi Sagar,
On Wed, Jan 14, 2015 at 2:51 PM, Ssagarr Patil <hugarsagar@outlook.com> wrote:
> I am also able to run the fbtest application, but with test10 I do not see 'hello world'
Good!
> pattern. Am I missing something.
That's because that test requires 16 colors, although these aren't used.
If you change ".numcolors \x16" to ".numcolors = 2" in tests/test010.c,
it should at least draw some text, but the colors may be of as it
failed to install
the 16-color console pallette.
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 3/3] backlight: 88pm860x_bl: Use of_get_child_by_name() instead of refcount hack
From: Geert Uytterhoeven @ 2015-01-14 13:51 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Bryan Wu, Richard Purdie, Jingoo Han,
Lee Jones
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1421243519-6257-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
of_find_node_by_name() calls of_node_put() on its "from" parameter.
To counter this, pm860x_backlight_dt_init() calls of_node_get() first.
Use of_get_child_by_name() instead to get rid of the refcount hack.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-fbdev@vger.kernel.org
---
Compile-tested only
---
drivers/video/backlight/88pm860x_bl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c
index 9a23698b6fe8398c..2da5862876d1fe78 100644
--- a/drivers/video/backlight/88pm860x_bl.c
+++ b/drivers/video/backlight/88pm860x_bl.c
@@ -168,10 +168,7 @@ static int pm860x_backlight_dt_init(struct platform_device *pdev,
struct device_node *nproot, *np;
int iset = 0;
- nproot = of_node_get(pdev->dev.parent->of_node);
- if (!nproot)
- return -ENODEV;
- nproot = of_find_node_by_name(nproot, "backlights");
+ nproot = of_get_child_by_name(pdev->dev.parent->of_node, "backlights");
if (!nproot) {
dev_err(&pdev->dev, "failed to find backlights node\n");
return -ENODEV;
--
1.9.1
^ permalink raw reply related
* RE: SSD1306 OLED driver
From: Ssagarr Patil @ 2015-01-14 13:51 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <BAY176-W246A4D5C3A23D1928FC5D3D38C0@phx.gbl>
Hi Noralf/Geert,
>>>> But nothing came up how do I register ? any quick pointer would be helpful.
>>> Copy/symlink fbtft.h to include/fbtft.h and do it like this:
>>> https://github.com/notro/fbtft/wiki/Build-kernel-and-fbtft-drivers#configure-devices
>>>
>>> Or use the fbtft_device module:
>>> https://github.com/notro/fbtft/wiki/fbtft_device
>>> ssd1306 entry:
>>> https://github.com/notro/fbtft/blob/master/fbtft_device.c#L272
>>> The values can be set/changed using module arguments.
>>>
>> Thanks for the pointers that helped!
>>
>> will the regwidth and buswidth be populated ?
>> I am not sure what these two should be set to.
> I'm skipping CC'ing the mailinglist as this still is an out-of-tree driver.
>
I have got the driver working!
I am also able to run the fbtest application, but with test10 I do not see 'hello world'
pattern. Am I missing something.
Thanks & Regards,
Sagar
^ permalink raw reply
* Re: [PATCH] fbdev: ssd1307fb: return proper error code if write command fails
From: Maxime Ripard @ 2015-01-14 11:07 UTC (permalink / raw)
To: Lad, Prabhakar
Cc: LFBDEV, Jean-Christophe Plagniol-Villard, Tomi Valkeinen, LKML
In-Reply-To: <1421223889-9448-1-git-send-email-prabhakar.csengg@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
Hi,
Thanks for doing this,
On Wed, Jan 14, 2015 at 08:24:49AM +0000, Lad, Prabhakar wrote:
> this patch fixes ssd1307fb_ssd1306_init() function to return
> proper error codes in case of failures.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> drivers/video/fbdev/ssd1307fb.c | 54 ++++++++++++++++++++++++++++++-----------
> 1 file changed, 40 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index f4daa59..528ea16 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -320,7 +320,9 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
>
> /* Set initial contrast */
> ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CONTRAST);
> - ret = ret & ssd1307fb_write_cmd(par->client, 0x7f);
> + if (ret < 0)
> + return ret;
A newline here (and to all the subsequent changes) would be great.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* [PATCH] fbdev: ssd1307fb: return proper error code if write command fails
From: Lad, Prabhakar @ 2015-01-14 8:24 UTC (permalink / raw)
To: LFBDEV, Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
Maxime Ripard
Cc: LKML, Lad, Prabhakar
this patch fixes ssd1307fb_ssd1306_init() function to return
proper error codes in case of failures.
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
drivers/video/fbdev/ssd1307fb.c | 54 ++++++++++++++++++++++++++++++-----------
1 file changed, 40 insertions(+), 14 deletions(-)
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index f4daa59..528ea16 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -320,7 +320,9 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
/* Set initial contrast */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CONTRAST);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x7f);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x7f);
if (ret < 0)
return ret;
@@ -336,63 +338,87 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
/* Set multiplex ratio value */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_MULTIPLEX_RATIO);
- ret = ret & ssd1307fb_write_cmd(par->client, par->height - 1);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, par->height - 1);
if (ret < 0)
return ret;
/* set display offset value */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_DISPLAY_OFFSET);
+ if (ret < 0)
+ return ret;
ret = ssd1307fb_write_cmd(par->client, 0x20);
if (ret < 0)
return ret;
/* Set clock frequency */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_CLOCK_FREQ);
- ret = ret & ssd1307fb_write_cmd(par->client, 0xf0);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0xf0);
if (ret < 0)
return ret;
/* Set precharge period in number of ticks from the internal clock */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_PRECHARGE_PERIOD);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x22);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x22);
if (ret < 0)
return ret;
/* Set COM pins configuration */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_COM_PINS_CONFIG);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x22);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x22);
if (ret < 0)
return ret;
/* Set VCOMH */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_VCOMH);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x49);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x49);
if (ret < 0)
return ret;
/* Turn on the DC-DC Charge Pump */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CHARGE_PUMP);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x14);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x14);
if (ret < 0)
return ret;
/* Switch to horizontal addressing mode */
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_ADDRESS_MODE);
- ret = ret & ssd1307fb_write_cmd(par->client,
- SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client,
+ SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL);
if (ret < 0)
return ret;
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_COL_RANGE);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x0);
- ret = ret & ssd1307fb_write_cmd(par->client, par->width - 1);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x0);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, par->width - 1);
if (ret < 0)
return ret;
ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_PAGE_RANGE);
- ret = ret & ssd1307fb_write_cmd(par->client, 0x0);
- ret = ret & ssd1307fb_write_cmd(par->client,
- par->page_offset + (par->height / 8) - 1);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client, 0x0);
+ if (ret < 0)
+ return ret;
+ ret = ssd1307fb_write_cmd(par->client,
+ par->page_offset + (par->height / 8) - 1);
if (ret < 0)
return ret;
--
1.9.1
^ permalink raw reply related
* RE: [patch] fbdev: off by one test (harmless)
From: David Ung @ 2015-01-14 5:24 UTC (permalink / raw)
To: linux-fbdev
In-Reply-To: <20141226172657.GA14762@mwanda>
> -----Original Message-----
> From: Tomi Valkeinen [mailto:tomi.valkeinen@ti.com]
> Sent: Tuesday, January 13, 2015 3:19 AM
> To: David Ung; 'Jingoo Han'; 'Dan Carpenter'
> Cc: 'Jean-Christophe Plagniol-Villard'; 'Daniel Vetter'; 'Laurent Pinchart';
> 'Rob Clark'; linux-fbdev@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: Re: [patch] fbdev: off by one test (harmless)
>
> * PGP Signed by an unknown key
>
> On 29/12/14 23:51, David Ung wrote:
> >
> >>> test is really a no-op. But it's still off by one and upsets the
> >>> static checkers so we may as well correct it.
> >>
> >> 'idx' should be 0~63, because cea_modes array is defined as
> >> 'cea_modes[64]'.
> >
> > According to CEA/EIA-861E, there are 64 defined modes, but idx is
> > valid for 1-64, 0 is reserved hence the check for
> >
> > If (!idx || idx > 63) {
> >
> > Think idx check really should be !idx || idx > 64 if following
> > CEA/EIA-861E
>
> In that case there's something funny with the code. The code indexes
> 'cea_modes' using 'idx', and I _think_ cea_modes is already offset properly,
> i.e. there's no entry at 0. But its length is 64, which is not right, as there's the
> empty item in the beginning.
>
> So maybe the correct fix is to increase the length of cea_modes to 65, and
> change the idx check as you mention above?
>
In that case might aswell go with CEA/EAI-861F for completeness and have the check against 107.
but with a slight waste of memory.
David
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox