Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [PATCH 11/32] OMAPDRM: fix overlay manager handling
From: Archit Taneja @ 2013-06-07  6:33 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-fbdev, linux-omap
In-Reply-To: <1369906493-27538-12-git-send-email-tomi.valkeinen@ti.com>

On Thursday 30 May 2013 03:04 PM, Tomi Valkeinen wrote:
> Currently omapdrm creates crtcs, which map directly to DSS overlay
> managers, only on demand at init time. This would make it difficult to
> manage connecting the display entities in the future, as the code cannot
> just search for a suitable overlay manager.
>
> We cannot fix this the sane way, which would be to create crtcs for each
> overlay manager, because we need an overlay for each crtc. With limited
> number of overlays, that's not possible.
>
> So the solution for now is to detach the overlay manager from the crtc.
> crtcs are still created on demand at init time, but all overlay managers
> are always initialized by the omapdss.
>
> This way we can create and connect whole display pipelines from the
> overlay manager to the display, regardless of which crtcs omapdrm would
> create.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/gpu/drm/omapdrm/omap_crtc.c | 22 +++++++++++++++-------
>   drivers/gpu/drm/omapdrm/omap_drv.c  |  2 ++
>   drivers/gpu/drm/omapdrm/omap_drv.h  |  1 +
>   drivers/video/omap2/dss/apply.c     |  3 ---
>   drivers/video/omap2/dss/dispc.c     |  4 ++++
>   5 files changed, 22 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 79b200a..02075bf 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -40,7 +40,7 @@ struct omap_crtc {
>   	 * mgr->id.)  Eventually this will be replaced w/ something
>   	 * more common-panel-framework-y
>   	 */
> -	struct omap_overlay_manager mgr;
> +	struct omap_overlay_manager *mgr;
>
>   	struct omap_video_timings timings;
>   	bool enabled;
> @@ -90,6 +90,9 @@ uint32_t pipe2vbl(struct drm_crtc *crtc)
>    * job of sequencing the setup of the video pipe in the proper order
>    */
>
> +/* ovl-mgr-id -> crtc */
> +static struct omap_crtc *omap_crtcs[8];
> +
>   /* we can probably ignore these until we support command-mode panels: */
>   static void omap_crtc_start_update(struct omap_overlay_manager *mgr)
>   {
> @@ -107,7 +110,7 @@ static void omap_crtc_disable(struct omap_overlay_manager *mgr)
>   static void omap_crtc_set_timings(struct omap_overlay_manager *mgr,
>   		const struct omap_video_timings *timings)
>   {
> -	struct omap_crtc *omap_crtc = container_of(mgr, struct omap_crtc, mgr);
> +	struct omap_crtc *omap_crtc = omap_crtcs[mgr->id];
>   	DBG("%s", omap_crtc->name);
>   	omap_crtc->timings = *timings;
>   	omap_crtc->full_update = true;
> @@ -116,7 +119,7 @@ static void omap_crtc_set_timings(struct omap_overlay_manager *mgr,
>   static void omap_crtc_set_lcd_config(struct omap_overlay_manager *mgr,
>   		const struct dss_lcd_mgr_config *config)
>   {
> -	struct omap_crtc *omap_crtc = container_of(mgr, struct omap_crtc, mgr);
> +	struct omap_crtc *omap_crtc = omap_crtcs[mgr->id];
>   	DBG("%s", omap_crtc->name);
>   	dispc_mgr_set_lcd_config(omap_crtc->channel, config);
>   }
> @@ -569,7 +572,7 @@ static void omap_crtc_pre_apply(struct omap_drm_apply *apply)
>   	} else {
>   		if (encoder) {
>   			omap_encoder_set_enabled(encoder, false);
> -			omap_encoder_update(encoder, &omap_crtc->mgr,
> +			omap_encoder_update(encoder, omap_crtc->mgr,
>   					&omap_crtc->timings);
>   			omap_encoder_set_enabled(encoder, true);
>   			omap_crtc->full_update = false;
> @@ -595,6 +598,11 @@ static const char *channel_names[] = {
>   		[OMAP_DSS_CHANNEL_LCD2] = "lcd2",
>   };

Since we are creating overlay managers structs now, we could get rid of 
the channel_names strings above and use mgr->name instead. Not 
necessary, of course.

Archit

>
> +void omap_crtc_pre_init(void)
> +{
> +	dss_install_mgr_ops(&mgr_ops);
> +}
> +
>   /* initialize crtc */
>   struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>   		struct drm_plane *plane, enum omap_channel channel, int id)
> @@ -635,9 +643,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>   	omap_irq_register(dev, &omap_crtc->error_irq);
>
>   	/* temporary: */
> -	omap_crtc->mgr.id = channel;
> -
> -	dss_install_mgr_ops(&mgr_ops);
> +	omap_crtc->mgr = omap_dss_get_overlay_manager(channel);
>
>   	/* TODO: fix hard-coded setup.. add properties! */
>   	info = &omap_crtc->info;
> @@ -651,6 +657,8 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>
>   	omap_plane_install_properties(omap_crtc->plane, &crtc->base);
>
> +	omap_crtcs[channel] = omap_crtc;
> +
>   	return crtc;
>
>   fail:
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 691e760..f8947f9 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -98,6 +98,8 @@ static int omap_modeset_init(struct drm_device *dev)
>   	int num_crtcs;
>   	int i, id = 0;
>
> +	omap_crtc_pre_init();
> +
>   	drm_mode_config_init(dev);
>
>   	omap_drm_irq_install(dev);
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
> index 215a20d..14f17da 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -157,6 +157,7 @@ const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc);
>   enum omap_channel omap_crtc_channel(struct drm_crtc *crtc);
>   int omap_crtc_apply(struct drm_crtc *crtc,
>   		struct omap_drm_apply *apply);
> +void omap_crtc_pre_init(void);
>   struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>   		struct drm_plane *plane, enum omap_channel channel, int id);
>
> diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
> index 74d1d00..c844071 100644
> --- a/drivers/video/omap2/dss/apply.c
> +++ b/drivers/video/omap2/dss/apply.c
> @@ -1577,7 +1577,6 @@ int omapdss_compat_init(void)
>
>   	apply_init_priv();
>
> -	dss_init_overlay_managers();
>   	dss_init_overlay_managers_sysfs(pdev);
>   	dss_init_overlays(pdev);
>
> @@ -1642,7 +1641,6 @@ err_disp_sysfs:
>
>   err_mgr_ops:
>   	dss_uninit_overlay_managers_sysfs(pdev);
> -	dss_uninit_overlay_managers();
>   	dss_uninit_overlays(pdev);
>
>   	compat_refcnt--;
> @@ -1671,7 +1669,6 @@ void omapdss_compat_uninit(void)
>   	dss_uninstall_mgr_ops();
>
>   	dss_uninit_overlay_managers_sysfs(pdev);
> -	dss_uninit_overlay_managers();
>   	dss_uninit_overlays(pdev);
>   out:
>   	mutex_unlock(&compat_init_lock);
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index b33b016..83d7bb9 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -3710,6 +3710,8 @@ static int __init omap_dispchw_probe(struct platform_device *pdev)
>
>   	dispc_runtime_put();
>
> +	dss_init_overlay_managers();
> +
>   	dss_debugfs_create_file("dispc", dispc_dump_regs);
>
>   	return 0;
> @@ -3723,6 +3725,8 @@ static int __exit omap_dispchw_remove(struct platform_device *pdev)
>   {
>   	pm_runtime_disable(&pdev->dev);
>
> +	dss_uninit_overlay_managers();
> +
>   	return 0;
>   }
>
>


^ permalink raw reply

* Re: [PATCH 10/32] OMAPDSS: split overlay manager creation
From: Archit Taneja @ 2013-06-07  6:31 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-fbdev, linux-omap
In-Reply-To: <1369906493-27538-11-git-send-email-tomi.valkeinen@ti.com>

On Thursday 30 May 2013 03:04 PM, Tomi Valkeinen wrote:
> Split the function that creates overlay manager structs into two: one
> that creates just the structs, and one that creates the sysfs files for
> the manager.
>
> This will help us use the overlay manager structs with omapdrm in the
> following patches, while still leaving the sysfs files out.

Maybe the omapdss Makefile should also reflect this change, we could 
move manager.o so that it doesn't look like a compat file any more.

Archit

>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/video/omap2/dss/apply.c         |  9 ++++++---
>   drivers/video/omap2/dss/dss.h           |  6 ++++--
>   drivers/video/omap2/dss/manager-sysfs.c |  2 ++
>   drivers/video/omap2/dss/manager.c       | 29 ++++++++++++++++++++++-------
>   4 files changed, 34 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
> index b84bd99..74d1d00 100644
> --- a/drivers/video/omap2/dss/apply.c
> +++ b/drivers/video/omap2/dss/apply.c
> @@ -1577,7 +1577,8 @@ int omapdss_compat_init(void)
>
>   	apply_init_priv();
>
> -	dss_init_overlay_managers(pdev);
> +	dss_init_overlay_managers();
> +	dss_init_overlay_managers_sysfs(pdev);
>   	dss_init_overlays(pdev);
>
>   	for (i = 0; i < omap_dss_get_num_overlay_managers(); i++) {
> @@ -1640,7 +1641,8 @@ err_disp_sysfs:
>   	dss_uninstall_mgr_ops();
>
>   err_mgr_ops:
> -	dss_uninit_overlay_managers(pdev);
> +	dss_uninit_overlay_managers_sysfs(pdev);
> +	dss_uninit_overlay_managers();
>   	dss_uninit_overlays(pdev);
>
>   	compat_refcnt--;
> @@ -1668,7 +1670,8 @@ void omapdss_compat_uninit(void)
>
>   	dss_uninstall_mgr_ops();
>
> -	dss_uninit_overlay_managers(pdev);
> +	dss_uninit_overlay_managers_sysfs(pdev);
> +	dss_uninit_overlay_managers();
>   	dss_uninit_overlays(pdev);
>   out:
>   	mutex_unlock(&compat_init_lock);
> diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h
> index 8475893..7964d3b 100644
> --- a/drivers/video/omap2/dss/dss.h
> +++ b/drivers/video/omap2/dss/dss.h
> @@ -194,8 +194,10 @@ void display_uninit_sysfs(struct platform_device *pdev,
>   		struct omap_dss_device *dssdev);
>
>   /* manager */
> -int dss_init_overlay_managers(struct platform_device *pdev);
> -void dss_uninit_overlay_managers(struct platform_device *pdev);
> +int dss_init_overlay_managers(void);
> +void dss_uninit_overlay_managers(void);
> +int dss_init_overlay_managers_sysfs(struct platform_device *pdev);
> +void dss_uninit_overlay_managers_sysfs(struct platform_device *pdev);
>   int dss_mgr_simple_check(struct omap_overlay_manager *mgr,
>   		const struct omap_overlay_manager_info *info);
>   int dss_mgr_check_timings(struct omap_overlay_manager *mgr,
> diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
> index 5104681..72784b3 100644
> --- a/drivers/video/omap2/dss/manager-sysfs.c
> +++ b/drivers/video/omap2/dss/manager-sysfs.c
> @@ -511,4 +511,6 @@ void dss_manager_kobj_uninit(struct omap_overlay_manager *mgr)
>   {
>   	kobject_del(&mgr->kobj);
>   	kobject_put(&mgr->kobj);
> +
> +	memset(&mgr->kobj, 0, sizeof(mgr->kobj));
>   }
> diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
> index 2551eaa..1aac9b4 100644
> --- a/drivers/video/omap2/dss/manager.c
> +++ b/drivers/video/omap2/dss/manager.c
> @@ -36,9 +36,9 @@
>   static int num_managers;
>   static struct omap_overlay_manager *managers;
>
> -int dss_init_overlay_managers(struct platform_device *pdev)
> +int dss_init_overlay_managers(void)
>   {
> -	int i, r;
> +	int i;
>
>   	num_managers = dss_feat_get_num_mgrs();
>
> @@ -76,6 +76,17 @@ int dss_init_overlay_managers(struct platform_device *pdev)
>   			dss_feat_get_supported_outputs(mgr->id);
>
>   		INIT_LIST_HEAD(&mgr->overlays);
> +	}
> +
> +	return 0;
> +}
> +
> +int dss_init_overlay_managers_sysfs(struct platform_device *pdev)
> +{
> +	int i, r;
> +
> +	for (i = 0; i < num_managers; ++i) {
> +		struct omap_overlay_manager *mgr = &managers[i];
>
>   		r = dss_manager_kobj_init(mgr, pdev);
>   		if (r)
> @@ -85,18 +96,22 @@ int dss_init_overlay_managers(struct platform_device *pdev)
>   	return 0;
>   }
>
> -void dss_uninit_overlay_managers(struct platform_device *pdev)
> +void dss_uninit_overlay_managers(void)
> +{
> +	kfree(managers);
> +	managers = NULL;
> +	num_managers = 0;
> +}
> +
> +void dss_uninit_overlay_managers_sysfs(struct platform_device *pdev)
>   {
>   	int i;
>
>   	for (i = 0; i < num_managers; ++i) {
>   		struct omap_overlay_manager *mgr = &managers[i];
> +
>   		dss_manager_kobj_uninit(mgr);
>   	}
> -
> -	kfree(managers);
> -	managers = NULL;
> -	num_managers = 0;
>   }
>
>   int omap_dss_get_num_overlay_managers(void)
>


^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Alex Courbot @ 2013-06-07  6:08 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Olof Johansson, Stephen Warren, Tomi Valkeinen,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org,
	Alexandre Courbot
In-Reply-To: <20130606163240.GY19468@game.jcrosoft.org>

On 06/07/2013 01:32 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> We're talking about adding a bunch of code instead of one line in a
>> table. Sorry, I NACK your NACK. If we get more entries we'll add the
>> parser, but not just for this.
> as there is no NACK so far I do take as a NACK

... which means?

Anyway, I have sent a new version of this patch that includes a summary 
motivating why we need it. Please explain clearly whether you accept it 
or not, and if not, what we need to do to add this mode in a 
satisfactory way.

Thanks,
Alex.


^ permalink raw reply

* [PATCH v2] simplefb: add support for a8b8g8r8 pixel format
From: Alexandre Courbot @ 2013-06-07  6:01 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Stephen Warren,
	Olof Johansson
  Cc: gnurou, linux-kernel, linux-fbdev, Alexandre Courbot

A framebuffer of this format is set up by SHIELD's bootloader. This
allows us to use it as a framebuffer console.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
---
Changes from v1:
- Added description to motivate the change
- Added ack

 Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
 drivers/video/simplefb.c                                       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
index 3ea4605..70c26f3 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
@@ -12,6 +12,7 @@ Required properties:
 - stride: The number of bytes in each line of the framebuffer.
 - format: The format of the framebuffer surface. Valid values are:
   - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
+  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
 
 Example:
 
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index e2e9e3e..d7041aa 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -84,6 +84,7 @@ struct simplefb_format {
 
 static struct simplefb_format simplefb_formats[] = {
 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
+	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
 };
 
 struct simplefb_params {
-- 
1.8.3


^ permalink raw reply related

* Re: [PATCH 06/32] OMAPDSS: DPI: fix regulators for DT
From: Archit Taneja @ 2013-06-07  5:57 UTC (permalink / raw)
  To: Tomi Valkeinen; +Cc: linux-fbdev, linux-omap
In-Reply-To: <1369906493-27538-7-git-send-email-tomi.valkeinen@ti.com>

On Thursday 30 May 2013 03:04 PM, Tomi Valkeinen wrote:
> On some platforms DPI requires a regulator to be enabled to power up the
> output pins. This regulator is, for some reason, currently attached to
> the virtual omapdss device, instead of the DPI device. This does not
> work for DT, as the regulator mappings need to be described in the DT
> data, and the virtual omapdss device is not present there.
>
> Fix the issue by acquiring the regulator in the DPI device. To retain
> compatibility with the current board files, the old method of getting
> the regulator is kept. The old method can be removed when the board
> files have been changed to pass the regulator to DPI.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/video/omap2/dss/dpi.c | 21 ++++++++++++++++++---
>   1 file changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c
> index ef8fca2..43f6b26 100644
> --- a/drivers/video/omap2/dss/dpi.c
> +++ b/drivers/video/omap2/dss/dpi.c
> @@ -37,7 +37,10 @@
>   #include "dss_features.h"
>
>   static struct {
> +	struct platform_device *pdev;

We don't really need to add a new member here for getting the output's 
device pointer. It's already there in dpi.output.dev.

Archit

> +
>   	struct regulator *vdds_dsi_reg;
> +	bool vdds_dsi_from_core;
>   	struct platform_device *dsidev;
>
>   	struct mutex lock;
> @@ -583,10 +586,15 @@ static int dpi_init_display(struct omap_dss_device *dssdev)
>   		struct regulator *vdds_dsi;
>
>   		vdds_dsi = dss_get_vdds_dsi();
> -
>   		if (IS_ERR(vdds_dsi)) {
> -			DSSERR("can't get VDDS_DSI regulator\n");
> -			return PTR_ERR(vdds_dsi);
> +			vdds_dsi = regulator_get(&dpi.pdev->dev, "vdds_dsi");
> +			if (IS_ERR(vdds_dsi)) {
> +				DSSERR("can't get VDDS_DSI regulator\n");
> +				return PTR_ERR(vdds_dsi);
> +			}
> +			dpi.vdds_dsi_from_core = false;
> +		} else {
> +			dpi.vdds_dsi_from_core = true;
>   		}
>
>   		dpi.vdds_dsi_reg = vdds_dsi;
> @@ -702,6 +710,8 @@ static int omap_dpi_probe(struct platform_device *pdev)
>   {
>   	int r;
>
> +	dpi.pdev = pdev;
> +
>   	mutex_init(&dpi.lock);
>
>   	dpi_init_output(pdev);
> @@ -725,6 +735,11 @@ static int __exit omap_dpi_remove(struct platform_device *pdev)
>
>   	dpi_uninit_output(pdev);
>
> +	if (dpi.vdds_dsi_reg != NULL && dpi.vdds_dsi_from_core = false) {
> +		regulator_put(dpi.vdds_dsi_reg);
> +		dpi.vdds_dsi_reg = NULL;
> +	}
> +
>   	return 0;
>   }
>
>


^ permalink raw reply

* [PATCH] backlight: add CONFIG_PM_SLEEP to suspend/resume functions
From: Jingoo Han @ 2013-06-07  1:39 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: 'Shuah Khan', linux-fbdev, linux-kernel, shuahkhan,
	rpurdie, FlorianSchandinat, plagnioj, tomi.valkeinen,
	rafael.j.wysocki, 'Arnd Bergmann', 'Jingoo Han'

Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
build warning when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
the CONFIG_PM_SLEEP is enabled.

drivers/video/backlight/backlight.c:211:12: warning: 'backlight_suspend' defined but not used [-Wunused-function]
drivers/video/backlight/backlight.c:225:12: warning: 'backlight_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/backlight/backlight.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index cedbcbe..750807c 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -208,6 +208,7 @@ static ssize_t backlight_show_actual_brightness(struct device *dev,
 
 static struct class *backlight_class;
 
+#ifdef CONFIG_PM_SLEEP
 static int backlight_suspend(struct device *dev)
 {
 	struct backlight_device *bd = to_backlight_device(dev);
@@ -235,6 +236,7 @@ static int backlight_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(backlight_class_dev_pm_ops, backlight_suspend,
 			 backlight_resume);
-- 
1.7.10.4



^ permalink raw reply related

* Re: [PATCH v3] backlight: Convert from Legacy pm ops to dev_pm_ops
From: Jingoo Han @ 2013-06-07  1:29 UTC (permalink / raw)
  To: 'Arnd Bergmann'
  Cc: 'Andrew Morton', 'Shuah Khan', linux-fbdev,
	linux-kernel, shuahkhan, rpurdie, FlorianSchandinat, plagnioj,
	tomi.valkeinen, rafael.j.wysocki, Jingoo Han
In-Reply-To: <5441622.ypFXsKluBt@wuerfel>

On Friday, June 07, 2013 6:28 AM, Arnd Bergmann wrote:
> On Monday 03 June 2013 13:10:10 Jingoo Han wrote:
> > On Sunday, June 02, 2013 8:07 AM, Shuah Khan wrote:
> > >
> > > Convert drivers/video/backlight/class to use dev_pm_ops for power
> > > management and remove Legacy PM ops hooks. With this change, backlight
> > > class registers suspend/resume callbacks via class->pm (dev_pm_ops)
> > > instead of Legacy class->suspend/resume. When __device_suspend() runs
> > > call-backs, it will find class->pm ops for the backlight class.
> > >
> > > Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> > > Cc: Shuah Khan <shuahkhan@gmail.com>
> >
> > CC'ed Andrew Morton,
> >
> > It looks good.
> >
> > Acked-by: Jingoo Han <jg1.han@samsung.com>
> >
> 
> I'm getting this build warning now:
> 
> arnd@wuerfel:/git/arm-soc$ cat build/omap1_defconfig/faillog
> /git/arm-soc/drivers/video/backlight/backlight.c:212:12: warning: 'backlight_suspend' defined but not
> used [-Wunused-function]
>  static int backlight_suspend(struct device *dev)
>             ^
> /git/arm-soc/drivers/video/backlight/backlight.c:226:12: warning: 'backlight_resume' defined but not
> used [-Wunused-function]
>  static int backlight_resume(struct device *dev)

Hi Arnd Bergmann,

I see what happens.
This build warning happens when CONFIG_PM is selected and
CONFIG_PM_SLEEP is not selected.

So, I will add '#ifdef CONFIG_PM_SLEEP' to './drivers/video/backlight/backlight.c'
and send it soon.
Thank you.

Best regards,
Jingoo Han

> 
> 	Arnd


^ permalink raw reply

* Re: [PATCH v3] backlight: Convert from Legacy pm ops to dev_pm_ops
From: Arnd Bergmann @ 2013-06-06 21:27 UTC (permalink / raw)
  To: Jingoo Han
  Cc: Andrew Morton, 'Shuah Khan', linux-fbdev, linux-kernel,
	shuahkhan, rpurdie, FlorianSchandinat, plagnioj, tomi.valkeinen,
	rafael.j.wysocki
In-Reply-To: <001a01ce6010$3daaf3c0$b900db40$@samsung.com>

On Monday 03 June 2013 13:10:10 Jingoo Han wrote:
> On Sunday, June 02, 2013 8:07 AM, Shuah Khan wrote:
> > 
> > Convert drivers/video/backlight/class to use dev_pm_ops for power
> > management and remove Legacy PM ops hooks. With this change, backlight
> > class registers suspend/resume callbacks via class->pm (dev_pm_ops)
> > instead of Legacy class->suspend/resume. When __device_suspend() runs
> > call-backs, it will find class->pm ops for the backlight class.
> > 
> > Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
> > Cc: Shuah Khan <shuahkhan@gmail.com>
> 
> CC'ed Andrew Morton,
> 
> It looks good.
> 
> Acked-by: Jingoo Han <jg1.han@samsung.com>
> 

I'm getting this build warning now:

arnd@wuerfel:/git/arm-soc$ cat build/omap1_defconfig/faillog 
/git/arm-soc/drivers/video/backlight/backlight.c:212:12: warning: 'backlight_suspend' defined but not used [-Wunused-function]
 static int backlight_suspend(struct device *dev)
            ^
/git/arm-soc/drivers/video/backlight/backlight.c:226:12: warning: 'backlight_resume' defined but not used [-Wunused-function]
 static int backlight_resume(struct device *dev)

	Arnd

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Stephen Warren @ 2013-06-06 16:45 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Alex Courbot, Tomi Valkeinen, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <20130606162943.GX19468@game.jcrosoft.org>

On 06/06/2013 10:29 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
...
> I did reject this patch but put a warning I do not want to see a huge table
> if so => factorisation or parser

Did you mean "accept" here not "reject"?

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Olof Johansson @ 2013-06-06 16:33 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Stephen Warren, Alex Courbot, Tomi Valkeinen, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <20130606162011.GV19468@game.jcrosoft.org>

On Thu, Jun 6, 2013 at 9:20 AM, Jean-Christophe PLAGNIOL-VILLARD
<plagnioj@jcrosoft.com> wrote:
> On 10:11 Thu 06 Jun     , Stephen Warren wrote:
>> On 06/06/2013 02:12 AM, Alex Courbot wrote:
>> > On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> >>
>> >> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com>
>> >> wrote:
>> >>
>> >>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>
>> No commit description? It'd be useful to at least justify this by
>> mentioning that some platform will actually use this...
>>
>> ...
>> >>> static struct simplefb_format simplefb_formats[] = {
>> >>>     { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>> >>> +    { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>> >>
>> >> why don't you parse the string?
>> >>
>> >> so you will a real generic bindings
>> >
>> > Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
>> >
>> > The list of modes of this driver should not grow too big. Even in terms
>> > of footprint I'd say the list should remain smaller than the parsing code.
>> >
>> > What we can discuss though is whether we want to keep this a8b8g8r8
>> > syntax or switch to something more standard, say "rgba8888".
>>
>> I would prefer to keep the syntax of the new formats consistent, so that
>> if we ever do add format-parsing code rather than table-based lookup,
>> all the existing formats will continue to work unchanged, without any
>> kind of fallback lookup table.
>
> I do prefer a format-parsing than any long lookup table that take time at boot
> time

We're talking about adding a bunch of code instead of one line in a
table. Sorry, I NACK your NACK. If we get more entries we'll add the
parser, but not just for this.

If you want to make a framebuffer-subsystem generic and shared helper,
go ahead. I'm sure simplefb will move over to it when it's available.

Until then:

Acked-by: Olof Johansson <olof@lixom.net>



-Olof

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06 16:32 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Stephen Warren, Alex Courbot, Tomi Valkeinen, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <CAOesGMgybYe_BBb0M4YS8tmM2C5jawf91OOyOuwwS5HSiUjPpQ@mail.gmail.com>

On 09:33 Thu 06 Jun     , Olof Johansson wrote:
> On Thu, Jun 6, 2013 at 9:20 AM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > On 10:11 Thu 06 Jun     , Stephen Warren wrote:
> >> On 06/06/2013 02:12 AM, Alex Courbot wrote:
> >> > On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> >>
> >> >> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com>
> >> >> wrote:
> >> >>
> >> >>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> >>
> >> No commit description? It'd be useful to at least justify this by
> >> mentioning that some platform will actually use this...
> >>
> >> ...
> >> >>> static struct simplefb_format simplefb_formats[] = {
> >> >>>     { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
> >> >>> +    { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
> >> >>
> >> >> why don't you parse the string?
> >> >>
> >> >> so you will a real generic bindings
> >> >
> >> > Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> >> >
> >> > The list of modes of this driver should not grow too big. Even in terms
> >> > of footprint I'd say the list should remain smaller than the parsing code.
> >> >
> >> > What we can discuss though is whether we want to keep this a8b8g8r8
> >> > syntax or switch to something more standard, say "rgba8888".
> >>
> >> I would prefer to keep the syntax of the new formats consistent, so that
> >> if we ever do add format-parsing code rather than table-based lookup,
> >> all the existing formats will continue to work unchanged, without any
> >> kind of fallback lookup table.
> >
> > I do prefer a format-parsing than any long lookup table that take time at boot
> > time
> 
> We're talking about adding a bunch of code instead of one line in a
> table. Sorry, I NACK your NACK. If we get more entries we'll add the
> parser, but not just for this.
as there is no NACK so far I do take as a NACK

Best Regards,
J.
> 
> If you want to make a framebuffer-subsystem generic and shared helper,
> go ahead. I'm sure simplefb will move over to it when it's available.
> 
> Until then:
> 
> Acked-by: Olof Johansson <olof@lixom.net>
> 
> 
> 
> -Olof

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06 16:29 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Alex Courbot, Tomi Valkeinen, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <51B0B61C.2000008@wwwdotorg.org>

On 10:17 Thu 06 Jun     , Stephen Warren wrote:
> On 06/06/2013 08:50 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 17:27 Thu 06 Jun     , Alex Courbot wrote:
> >> On 06/06/2013 05:24 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>
> >>> On Jun 6, 2013, at 10:12 AM, Alex Courbot <acourbot@nvidia.com> wrote:
> >>>
> >>>> On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>>>
> >>>>> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
> ...
> >>>>>> static struct simplefb_format simplefb_formats[] = {
> >>>>>> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
> >>>>>> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
> >>>>>
> >>>>> why don't you parse the string?
> 
> Jean-Christophe, I'm afraid I can't tell exactly what you're arguing for.
> 
> Here, you want code added to parse the string ...
> 
> This has already been rejected as being over-engineered, and more than
> this simple driver needs. Even if it were shared code, the only
> practical use of such a parsing function would be to support this
> driver, since presumably any other HW-specific driver already knows
> exactly which format the FB is in, and hence wouldn't need to share this
> code.
> 
> >>>>> so you will a real generic bindings
> >>>>
> >>>> Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> >>>>
> >>>> The list of modes of this driver should not grow too big. Even in terms of footprint I'd say the list should remain smaller than the parsing code.
> >>>>
> >>>> What we can discuss though is whether we want to keep this a8b8g8r8 syntax or switch to something more standard, say "rgba8888".
> >>>
> >>> I'm going to be very honest I do not like the simplefb driver from the beginning
> >>> but I do found it useful. And as said in it's name it need to be *SIMPLE*
> >>>
> >>> Then a huge list of compatible no way
> >>> otherwise we drop this from the simplefb and make it a generic helper
> >>>
> >>> I do not want to see format parser in every drivers this need to handle at video framework level
> 
> ... yet here you appear to be arguing against using a format parser, or
> including a format parser ...
> 
> Note that a lookup table isn't any kind of shared parser; it's just a
> very tiny and simple table of static data. It seems quite unlikely that
> this could be a maintenance issue, even if over time a few more entries
> get added to the table.
> 
> >>> If I see that we start to increase again and again the simplefb I will not accept
> >>> to merge the code as we must keep it simple
> >>
> >> In that case it's probably better to maintain a "simple" list of
> >> supported modes, which is what this patch does.
> > 
> > so get out it of the simplefb other drivers can use it
> 
> ... yet here you appear to want to move the list of modes into some
> central location ...
> 
> I don't think that's useful for the reason I mentioned above: presumably
> any other HW-specific driver already knows exactly which format the FB
> is in, and hence wouldn't need to share this code/table.
> 
> Why don't we simply take this patch to extend this table, and then *if*
> any other FB driver needs to parse a format from DT, we can move the
> code(table) to a common location at that time. That will be a trivial
> change, and one this patch does nothing to make any harder. Making the
> code/table common before then seems like over-engineering.

that why I said *if I see that we start ....*

I did reject this patch but put a warning I do not want to see a huge table
if so => factorisation or parser

Best Regards,
J.

^ permalink raw reply

* Re: [PATCH v4 0/7] xilinxfb changes
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06 16:23 UTC (permalink / raw)
  To: Michal Simek
  Cc: Timur Tabi, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Tomi Valkeinen, Grant Likely
In-Reply-To: <cover.1370254386.git.michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>

On 12:13 Mon 03 Jun     , Michal Simek wrote:
> Hi,
> 

Arnd can you take look on it again please

I'll take a look on it next week

Best Regards,
J.
> I have done more changes in the driver to support probing
> on little and big endian system where detection is done
> directly on the hardware.
> I have also done some cleanups to get it to the better shape.
> 
> Thanks for your review,
> Michal
> 
> Changes in v4:
> - Acked by Arnd
> - Remove "video: xilinxfb: Fix sparse warnings"
>   patch because it is trying to fix incorrect API
>   usage and sparse should warn about it.
> 
> Changes in v3:
> - fix commit message
> - Remove out_be IO name from function name
> - Change patch subject from "Do not use out_be32 IO function"
>   to "Do not name out_be32 in function name"
> - New patch in this patchset based on discussions
> - New patch in this patchset based on discussions
> - New patch in this patchset
> - New patch in this patchset based on discussions
> 
> Changes in v2:
> - use of_property_read_u32 helper function
> 
> Michal Simek (7):
>   video: xilinxfb: Fix OF probing on little-endian systems
>   video: xilinxfb: Do not name out_be32 in function name
>   video: xilinxfb: Rename PLB_ACCESS_FLAG to BUS_ACCESS_FLAG
>   video: xilinxfb: Use drvdata->regs_phys instead of physaddr
>   video: xilinxfb: Group bus initialization
>   video: xilinxfb: Add support for little endian accesses
>   video: xilinxfb: Use driver for Xilinx ARM Zynq
> 
>  drivers/video/Kconfig    |   2 +-
>  drivers/video/xilinxfb.c | 135 +++++++++++++++++++++++------------------------
>  2 files changed, 68 insertions(+), 69 deletions(-)
> 
> --
> 1.8.2.3
> 



^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06 16:20 UTC (permalink / raw)
  To: Stephen Warren
  Cc: Alex Courbot, Tomi Valkeinen, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <51B0B4A2.4010104@wwwdotorg.org>

On 10:11 Thu 06 Jun     , Stephen Warren wrote:
> On 06/06/2013 02:12 AM, Alex Courbot wrote:
> > On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>
> >> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com>
> >> wrote:
> >>
> >>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> 
> No commit description? It'd be useful to at least justify this by
> mentioning that some platform will actually use this...
> 
> ...
> >>> static struct simplefb_format simplefb_formats[] = {
> >>>     { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
> >>> +    { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
> >>
> >> why don't you parse the string?
> >>
> >> so you will a real generic bindings
> > 
> > Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> > 
> > The list of modes of this driver should not grow too big. Even in terms
> > of footprint I'd say the list should remain smaller than the parsing code.
> > 
> > What we can discuss though is whether we want to keep this a8b8g8r8
> > syntax or switch to something more standard, say "rgba8888".
> 
> I would prefer to keep the syntax of the new formats consistent, so that
> if we ever do add format-parsing code rather than table-based lookup,
> all the existing formats will continue to work unchanged, without any
> kind of fallback lookup table.

I do prefer a format-parsing than any long lookup table that take time at boot
time

Best Regards,
J.

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Stephen Warren @ 2013-06-06 16:17 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Alex Courbot, Tomi Valkeinen, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <20130606145059.GU19468@game.jcrosoft.org>

On 06/06/2013 08:50 AM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 17:27 Thu 06 Jun     , Alex Courbot wrote:
>> On 06/06/2013 05:24 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>>
>>> On Jun 6, 2013, at 10:12 AM, Alex Courbot <acourbot@nvidia.com> wrote:
>>>
>>>> On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>>>>
>>>>> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
...
>>>>>> static struct simplefb_format simplefb_formats[] = {
>>>>>> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>>>>>> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>>>>>
>>>>> why don't you parse the string?

Jean-Christophe, I'm afraid I can't tell exactly what you're arguing for.

Here, you want code added to parse the string ...

This has already been rejected as being over-engineered, and more than
this simple driver needs. Even if it were shared code, the only
practical use of such a parsing function would be to support this
driver, since presumably any other HW-specific driver already knows
exactly which format the FB is in, and hence wouldn't need to share this
code.

>>>>> so you will a real generic bindings
>>>>
>>>> Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
>>>>
>>>> The list of modes of this driver should not grow too big. Even in terms of footprint I'd say the list should remain smaller than the parsing code.
>>>>
>>>> What we can discuss though is whether we want to keep this a8b8g8r8 syntax or switch to something more standard, say "rgba8888".
>>>
>>> I'm going to be very honest I do not like the simplefb driver from the beginning
>>> but I do found it useful. And as said in it's name it need to be *SIMPLE*
>>>
>>> Then a huge list of compatible no way
>>> otherwise we drop this from the simplefb and make it a generic helper
>>>
>>> I do not want to see format parser in every drivers this need to handle at video framework level

... yet here you appear to be arguing against using a format parser, or
including a format parser ...

Note that a lookup table isn't any kind of shared parser; it's just a
very tiny and simple table of static data. It seems quite unlikely that
this could be a maintenance issue, even if over time a few more entries
get added to the table.

>>> If I see that we start to increase again and again the simplefb I will not accept
>>> to merge the code as we must keep it simple
>>
>> In that case it's probably better to maintain a "simple" list of
>> supported modes, which is what this patch does.
> 
> so get out it of the simplefb other drivers can use it

... yet here you appear to want to move the list of modes into some
central location ...

I don't think that's useful for the reason I mentioned above: presumably
any other HW-specific driver already knows exactly which format the FB
is in, and hence wouldn't need to share this code/table.

Why don't we simply take this patch to extend this table, and then *if*
any other FB driver needs to parse a format from DT, we can move the
code(table) to a common location at that time. That will be a trivial
change, and one this patch does nothing to make any harder. Making the
code/table common before then seems like over-engineering.

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Stephen Warren @ 2013-06-06 16:11 UTC (permalink / raw)
  To: Alex Courbot
  Cc: Jean-Christophe PLAGNIOL-VILLARD, Tomi Valkeinen, Olof Johansson,
	gnurou@gmail.org, linux-kernel@vger.kernel.org,
	linux-fbdev@vger.kernel.org
In-Reply-To: <51B0446A.4090305@nvidia.com>

On 06/06/2013 02:12 AM, Alex Courbot wrote:
> On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>
>> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com>
>> wrote:
>>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

No commit description? It'd be useful to at least justify this by
mentioning that some platform will actually use this...

...
>>> static struct simplefb_format simplefb_formats[] = {
>>>     { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>>> +    { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>>
>> why don't you parse the string?
>>
>> so you will a real generic bindings
> 
> Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> 
> The list of modes of this driver should not grow too big. Even in terms
> of footprint I'd say the list should remain smaller than the parsing code.
> 
> What we can discuss though is whether we want to keep this a8b8g8r8
> syntax or switch to something more standard, say "rgba8888".

I would prefer to keep the syntax of the new formats consistent, so that
if we ever do add format-parsing code rather than table-based lookup,
all the existing formats will continue to work unchanged, without any
kind of fallback lookup table.

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06 14:50 UTC (permalink / raw)
  To: Alex Courbot
  Cc: Tomi Valkeinen, Stephen Warren, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <51B047FD.4020400@nvidia.com>

On 17:27 Thu 06 Jun     , Alex Courbot wrote:
> On 06/06/2013 05:24 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >
> >On Jun 6, 2013, at 10:12 AM, Alex Courbot <acourbot@nvidia.com> wrote:
> >
> >>On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> >>>
> >>>On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
> >>>
> >>>>Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> >>>>---
> >>>>Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
> >>>>drivers/video/simplefb.c                                       | 1 +
> >>>>2 files changed, 2 insertions(+)
> >>>>
> >>>>diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> >>>>index 3ea4605..70c26f3 100644
> >>>>--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> >>>>+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> >>>>@@ -12,6 +12,7 @@ Required properties:
> >>>>- stride: The number of bytes in each line of the framebuffer.
> >>>>- format: The format of the framebuffer surface. Valid values are:
> >>>>   - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
> >>>>+  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
> >>>>
> >>>>Example:
> >>>>
> >>>>diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
> >>>>index e2e9e3e..d7041aa 100644
> >>>>--- a/drivers/video/simplefb.c
> >>>>+++ b/drivers/video/simplefb.c
> >>>>@@ -84,6 +84,7 @@ struct simplefb_format {
> >>>>
> >>>>static struct simplefb_format simplefb_formats[] = {
> >>>>	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
> >>>>+	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
> >>>
> >>>why don't you parse the string?
> >>>
> >>>so you will a real generic bindings
> >>
> >>Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> >>
> >>The list of modes of this driver should not grow too big. Even in terms of footprint I'd say the list should remain smaller than the parsing code.
> >>
> >>What we can discuss though is whether we want to keep this a8b8g8r8 syntax or switch to something more standard, say "rgba8888".
> >
> >I'm going to be very honest I do not like the simplefb driver from the beginning
> >but I do found it useful. And as said in it's name it need to be *SIMPLE*
> >
> >Then a huge list of compatible no way
> >otherwise we drop this from the simplefb and make it a generic helper
> >
> >I do not want to see format parser in every drivers this need to handle at video framework level
> >
> >If I see that we start to increase again and again the simplefb I will not accept
> >to merge the code as we must keep it simple
> 
> In that case it's probably better to maintain a "simple" list of
> supported modes, which is what this patch does.

so get out it of the simplefb other drivers can use it

Best Regards,
J.
> Alex.
> 

^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Alex Courbot @ 2013-06-06  8:27 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Tomi Valkeinen, Stephen Warren, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <29610936-BB03-4844-888B-56E1C8E5DF4A@jcrosoft.com>

On 06/06/2013 05:24 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>
> On Jun 6, 2013, at 10:12 AM, Alex Courbot <acourbot@nvidia.com> wrote:
>
>> On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>>>
>>> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>>>
>>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>>> ---
>>>> Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
>>>> drivers/video/simplefb.c                                       | 1 +
>>>> 2 files changed, 2 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>>> index 3ea4605..70c26f3 100644
>>>> --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>>> +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>>> @@ -12,6 +12,7 @@ Required properties:
>>>> - stride: The number of bytes in each line of the framebuffer.
>>>> - format: The format of the framebuffer surface. Valid values are:
>>>>    - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
>>>> +  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
>>>>
>>>> Example:
>>>>
>>>> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
>>>> index e2e9e3e..d7041aa 100644
>>>> --- a/drivers/video/simplefb.c
>>>> +++ b/drivers/video/simplefb.c
>>>> @@ -84,6 +84,7 @@ struct simplefb_format {
>>>>
>>>> static struct simplefb_format simplefb_formats[] = {
>>>> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>>>> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>>>
>>> why don't you parse the string?
>>>
>>> so you will a real generic bindings
>>
>> Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
>>
>> The list of modes of this driver should not grow too big. Even in terms of footprint I'd say the list should remain smaller than the parsing code.
>>
>> What we can discuss though is whether we want to keep this a8b8g8r8 syntax or switch to something more standard, say "rgba8888".
>
> I'm going to be very honest I do not like the simplefb driver from the beginning
> but I do found it useful. And as said in it's name it need to be *SIMPLE*
>
> Then a huge list of compatible no way
> otherwise we drop this from the simplefb and make it a generic helper
>
> I do not want to see format parser in every drivers this need to handle at video framework level
>
> If I see that we start to increase again and again the simplefb I will not accept
> to merge the code as we must keep it simple

In that case it's probably better to maintain a "simple" list of 
supported modes, which is what this patch does.

Alex.


^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06  8:24 UTC (permalink / raw)
  To: Alex Courbot
  Cc: Jean-Christophe PLAGNIOL-VILLARD, Tomi Valkeinen, Stephen Warren,
	Olof Johansson, gnurou@gmail.org, linux-kernel@vger.kernel.org,
	linux-fbdev@vger.kernel.org
In-Reply-To: <51B0446A.4090305@nvidia.com>


On Jun 6, 2013, at 10:12 AM, Alex Courbot <acourbot@nvidia.com> wrote:

> On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>> 
>> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>> 
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>> ---
>>> Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
>>> drivers/video/simplefb.c                                       | 1 +
>>> 2 files changed, 2 insertions(+)
>>> 
>>> diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>> index 3ea4605..70c26f3 100644
>>> --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>> +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>>> @@ -12,6 +12,7 @@ Required properties:
>>> - stride: The number of bytes in each line of the framebuffer.
>>> - format: The format of the framebuffer surface. Valid values are:
>>>   - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
>>> +  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
>>> 
>>> Example:
>>> 
>>> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
>>> index e2e9e3e..d7041aa 100644
>>> --- a/drivers/video/simplefb.c
>>> +++ b/drivers/video/simplefb.c
>>> @@ -84,6 +84,7 @@ struct simplefb_format {
>>> 
>>> static struct simplefb_format simplefb_formats[] = {
>>> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>>> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>> 
>> why don't you parse the string?
>> 
>> so you will a real generic bindings
> 
> Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330
> 
> The list of modes of this driver should not grow too big. Even in terms of footprint I'd say the list should remain smaller than the parsing code.
> 
> What we can discuss though is whether we want to keep this a8b8g8r8 syntax or switch to something more standard, say "rgba8888".

I'm going to be very honest I do not like the simplefb driver from the beginning
but I do found it useful. And as said in it's name it need to be *SIMPLE*

Then a huge list of compatible no way
otherwise we drop this from the simplefb and make it a generic helper

I do not want to see format parser in every drivers this need to handle at video framework level

If I see that we start to increase again and again the simplefb I will not accept
to merge the code as we must keep it simple

Best Regards,
J.


^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Alex Courbot @ 2013-06-06  8:12 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: Tomi Valkeinen, Stephen Warren, Olof Johansson, gnurou@gmail.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
In-Reply-To: <3356BC4D-EEF6-4FCA-9310-5B0727EBF288@jcrosoft.com>

On 06/06/2013 04:59 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
>
> On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>> ---
>> Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
>> drivers/video/simplefb.c                                       | 1 +
>> 2 files changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>> index 3ea4605..70c26f3 100644
>> --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>> +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
>> @@ -12,6 +12,7 @@ Required properties:
>> - stride: The number of bytes in each line of the framebuffer.
>> - format: The format of the framebuffer surface. Valid values are:
>>    - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
>> +  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
>>
>> Example:
>>
>> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
>> index e2e9e3e..d7041aa 100644
>> --- a/drivers/video/simplefb.c
>> +++ b/drivers/video/simplefb.c
>> @@ -84,6 +84,7 @@ struct simplefb_format {
>>
>> static struct simplefb_format simplefb_formats[] = {
>> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
>> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
>
> why don't you parse the string?
>
> so you will a real generic bindings

Tried that already, got NACKed: https://lkml.org/lkml/2013/5/27/330

The list of modes of this driver should not grow too big. Even in terms 
of footprint I'd say the list should remain smaller than the parsing code.

What we can discuss though is whether we want to keep this a8b8g8r8 
syntax or switch to something more standard, say "rgba8888".

Alex.


^ permalink raw reply

* Re: [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-06-06  7:59 UTC (permalink / raw)
  To: Alexandre Courbot
  Cc: Jean-Christophe PLAGNIOL-VILLARD, Tomi Valkeinen, Stephen Warren,
	Olof Johansson, gnurou, linux-kernel, linux-fbdev
In-Reply-To: <1370503259-16618-1-git-send-email-acourbot@nvidia.com>


On Jun 6, 2013, at 9:20 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:

> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
> ---
> Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
> drivers/video/simplefb.c                                       | 1 +
> 2 files changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> index 3ea4605..70c26f3 100644
> --- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> +++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
> @@ -12,6 +12,7 @@ Required properties:
> - stride: The number of bytes in each line of the framebuffer.
> - format: The format of the framebuffer surface. Valid values are:
>   - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
> +  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
> 
> Example:
> 
> diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
> index e2e9e3e..d7041aa 100644
> --- a/drivers/video/simplefb.c
> +++ b/drivers/video/simplefb.c
> @@ -84,6 +84,7 @@ struct simplefb_format {
> 
> static struct simplefb_format simplefb_formats[] = {
> 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
> +	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },

why don't you parse the string?

so you will a real generic bindings

Best Regards,
J.
> };
> 
> struct simplefb_params {
> -- 
> 1.8.3
> 


^ permalink raw reply

* re: uvesafb: Clean up MTRR code
From: Dan Carpenter @ 2013-06-06  7:49 UTC (permalink / raw)
  To: linux-fbdev

Hello Andy Lutomirski,

This is a semi-automatic email about new static checker warnings.

The patch 63e28a7a5ffc: "uvesafb: Clean up MTRR code" from May 13, 
2013, leads to the following Smatch complaint:

drivers/video/uvesafb.c:1819 uvesafb_remove()
	 warn: variable dereferenced before check 'par' (see line 1814)

drivers/video/uvesafb.c
  1813			iounmap(info->screen_base);
  1814			arch_phys_wc_del(par->mtrr_handle);
                                         ^^^^^^^^^^^^^^^^
New dereference.

  1815			release_mem_region(info->fix.smem_start, info->fix.smem_len);
  1816			fb_destroy_modedb(info->monspecs.modedb);
  1817			fb_dealloc_cmap(&info->cmap);
  1818	
  1819			if (par) {
                            ^^^
Old check.

  1820				if (par->vbe_modes)
  1821					kfree(par->vbe_modes);

regards,
dan carpenter

^ permalink raw reply

* Re: [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
From: Archit Taneja @ 2013-06-06  7:22 UTC (permalink / raw)
  To: Emil Goode
  Cc: axel.lin, linux-omap, linux-fbdev, linux-kernel, kernel-janitors,
	Valkeinen, Tomi
In-Reply-To: <1370453396-18043-1-git-send-email-emilgoode@gmail.com>

Hi,

On Wednesday 05 June 2013 10:59 PM, Emil Goode wrote:
> It's not necessary to free memory allocated with devm_kzalloc
> in a remove function and using kfree leads to a double free.

Looks fine to me. Tomi, could you take this for 3.11?

Archit

>
> Signed-off-by: Emil Goode <emilgoode@gmail.com>
> ---
>   drivers/video/omap2/displays/panel-picodlp.c |    2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c
> index 62f2db0..859e111 100644
> --- a/drivers/video/omap2/displays/panel-picodlp.c
> +++ b/drivers/video/omap2/displays/panel-picodlp.c
> @@ -469,8 +469,6 @@ static void picodlp_panel_remove(struct omap_dss_device *dssdev)
>   	i2c_unregister_device(picod->picodlp_i2c_client);
>   	dev_set_drvdata(&dssdev->dev, NULL);
>   	dev_dbg(&dssdev->dev, "removing picodlp panel\n");
> -
> -	kfree(picod);
>   }
>
>   static int picodlp_panel_enable(struct omap_dss_device *dssdev)
>


^ permalink raw reply

* [PATCH] simplefb: add support for a8b8g8r8 pixel format
From: Alexandre Courbot @ 2013-06-06  7:20 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Stephen Warren,
	Olof Johansson
  Cc: gnurou, linux-kernel, linux-fbdev, Alexandre Courbot

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 Documentation/devicetree/bindings/video/simple-framebuffer.txt | 1 +
 drivers/video/simplefb.c                                       | 1 +
 2 files changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/video/simple-framebuffer.txt b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
index 3ea4605..70c26f3 100644
--- a/Documentation/devicetree/bindings/video/simple-framebuffer.txt
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer.txt
@@ -12,6 +12,7 @@ Required properties:
 - stride: The number of bytes in each line of the framebuffer.
 - format: The format of the framebuffer surface. Valid values are:
   - r5g6b5 (16-bit pixels, d[15:11]=r, d[10:5]=g, d[4:0]=b).
+  - a8b8g8r8 (32-bit pixels, d[31:24]=a, d[23:16]=b, d[15:8]=g, d[7:0]=r).
 
 Example:
 
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index e2e9e3e..d7041aa 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -84,6 +84,7 @@ struct simplefb_format {
 
 static struct simplefb_format simplefb_formats[] = {
 	{ "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0} },
+	{ "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {31, 8} },
 };
 
 struct simplefb_params {
-- 
1.8.3


^ permalink raw reply related

* [PATCH] OMAPDSS: Remove kfree for memory allocated with devm_kzalloc
From: Emil Goode @ 2013-06-05 17:29 UTC (permalink / raw)
  To: archit, axel.lin
  Cc: linux-omap, linux-fbdev, linux-kernel, kernel-janitors,
	Emil Goode

It's not necessary to free memory allocated with devm_kzalloc
in a remove function and using kfree leads to a double free.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
---
 drivers/video/omap2/displays/panel-picodlp.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-picodlp.c b/drivers/video/omap2/displays/panel-picodlp.c
index 62f2db0..859e111 100644
--- a/drivers/video/omap2/displays/panel-picodlp.c
+++ b/drivers/video/omap2/displays/panel-picodlp.c
@@ -469,8 +469,6 @@ static void picodlp_panel_remove(struct omap_dss_device *dssdev)
 	i2c_unregister_device(picod->picodlp_i2c_client);
 	dev_set_drvdata(&dssdev->dev, NULL);
 	dev_dbg(&dssdev->dev, "removing picodlp panel\n");
-
-	kfree(picod);
 }
 
 static int picodlp_panel_enable(struct omap_dss_device *dssdev)
-- 
1.7.10.4


^ permalink raw reply related


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