* [patch 1/2] video/kyro: delete some dead code
From: Dan Carpenter @ 2013-01-25 6:42 UTC (permalink / raw)
To: Florian Tobias Schandinat; +Cc: linux-fbdev, linux-kernel, kernel-janitors
_OLDCODE is never defined. Delete it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/video/kyro/STG4000OverlayDevice.c b/drivers/video/kyro/STG4000OverlayDevice.c
index 0aeeaa1..84b6ea8 100644
--- a/drivers/video/kyro/STG4000OverlayDevice.c
+++ b/drivers/video/kyro/STG4000OverlayDevice.c
@@ -430,10 +430,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
*/
ulSrc = srcDest.ulSrcX2 - srcDest.ulSrcX1;
ulDest = srcDest.lDstX2 - srcDest.lDstX1;
-#ifdef _OLDCODE
- ulLeft = srcDest.ulDstX1;
- ulRight = srcDest.ulDstX2;
-#else
+
if (srcDest.ulDstX1 > 2) {
ulLeft = srcDest.ulDstX1 + 2;
ulRight = srcDest.ulDstX2 + 1;
@@ -441,7 +438,7 @@ int SetOverlayViewPort(volatile STG4000REG __iomem *pSTGReg,
ulLeft = srcDest.ulDstX1;
ulRight = srcDest.ulDstX2 + 1;
}
-#endif
+
/* first work out the position we are to display as offset from the source of the buffer */
bResult = 1;
^ permalink raw reply related
* Re: [PATCH] backlight: add an AS3711 PMIC backlight driver
From: Jingoo Han @ 2013-01-25 5:20 UTC (permalink / raw)
To: 'Guennadi Liakhovetski'
Cc: 'Andrew Morton', linux-kernel, linux-fbdev, linux-sh,
'Magnus Damm', 'Richard Purdie'
In-Reply-To: <Pine.LNX.4.64.1301081846020.1794@axis700.grange>
On Wednesday, January 09, 2013 2:55 AM, Guennadi Liakhovetski wrote
>
> This is an initial commit of a backlight driver, using step-up DCDC power
> supplies on AS3711 PMIC. Only one mode has actually been tested, several
> further modes have been implemented "dry," but disabled to avoid accidental
> hardware damage. Anyone wishing to use any of those modes will have to
> modify the driver.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
CC'ed Andrew Morton.
Hi Guennadi Liakhovetski,
I have reviewed this patch with AS3711 datasheet.
I cannot find any problems. It looks good.
However, some hardcoded numbers need to be changed
to the bit definitions.
Acked-by: Jingoo Han <jg1.han@samsung.com>
Best regards,
Jingoo Han
> ---
>
> Tested on sh73a0-based kzm9g board. As the commit message says, only one
> mode has been tested and is enabled. That mode copies the sample code from
> the manufacturer. Deviations from that code proved to be fatal for the
> hardware...
>
> drivers/video/backlight/Kconfig | 7 +
> drivers/video/backlight/Makefile | 1 +
> drivers/video/backlight/as3711_bl.c | 379 +++++++++++++++++++++++++++++++++++
> 3 files changed, 387 insertions(+), 0 deletions(-)
> create mode 100644 drivers/video/backlight/as3711_bl.c
>
> diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
> index 765a945..6ef0ede 100644
> --- a/drivers/video/backlight/Kconfig
> +++ b/drivers/video/backlight/Kconfig
> @@ -390,6 +390,13 @@ config BACKLIGHT_TPS65217
> If you have a Texas Instruments TPS65217 say Y to enable the
> backlight driver.
>
> +config BACKLIGHT_AS3711
> + tristate "AS3711 Backlight"
> + depends on BACKLIGHT_CLASS_DEVICE && MFD_AS3711
> + help
> + If you have an Austrian Microsystems AS3711 say Y to enable the
> + backlight driver.
> +
> endif # BACKLIGHT_CLASS_DEVICE
>
> endif # BACKLIGHT_LCD_SUPPORT
> diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
> index e7ce729..d3e188f 100644
> --- a/drivers/video/backlight/Makefile
> +++ b/drivers/video/backlight/Makefile
> @@ -45,3 +45,4 @@ obj-$(CONFIG_BACKLIGHT_PCF50633) += pcf50633-backlight.o
> obj-$(CONFIG_BACKLIGHT_AAT2870) += aat2870_bl.o
> obj-$(CONFIG_BACKLIGHT_OT200) += ot200_bl.o
> obj-$(CONFIG_BACKLIGHT_TPS65217) += tps65217_bl.o
> +obj-$(CONFIG_BACKLIGHT_AS3711) += as3711_bl.o
> diff --git a/drivers/video/backlight/as3711_bl.c b/drivers/video/backlight/as3711_bl.c
> new file mode 100644
> index 0000000..c6bc65d
> --- /dev/null
> +++ b/drivers/video/backlight/as3711_bl.c
> @@ -0,0 +1,379 @@
> +/*
> + * AS3711 PMIC backlight driver, using DCDC Step Up Converters
> + *
> + * Copyright (C) 2012 Renesas Electronics Corporation
> + * Author: Guennadi Liakhovetski, <g.liakhovetski@gmx.de>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the version 2 of the GNU General Public License as
> + * published by the Free Software Foundation
> + */
> +
> +#include <linux/backlight.h>
> +#include <linux/delay.h>
> +#include <linux/device.h>
> +#include <linux/err.h>
> +#include <linux/fb.h>
> +#include <linux/kernel.h>
> +#include <linux/mfd/as3711.h>
> +#include <linux/module.h>
> +#include <linux/regmap.h>
> +#include <linux/slab.h>
> +
> +enum as3711_bl_type {
> + AS3711_BL_SU1,
> + AS3711_BL_SU2,
> +};
> +
> +struct as3711_bl_data {
> + bool powered;
> + const char *fb_name;
> + struct device *fb_dev;
> + enum as3711_bl_type type;
> + int brightness;
> + struct backlight_device *bl;
> +};
> +
> +struct as3711_bl_supply {
> + struct as3711_bl_data su1;
> + struct as3711_bl_data su2;
> + const struct as3711_bl_pdata *pdata;
> + struct as3711 *as3711;
> +};
> +
> +static struct as3711_bl_supply *to_supply(struct as3711_bl_data *su)
> +{
> + switch (su->type) {
> + case AS3711_BL_SU1:
> + return container_of(su, struct as3711_bl_supply, su1);
> + case AS3711_BL_SU2:
> + return container_of(su, struct as3711_bl_supply, su2);
> + }
> + return NULL;
> +}
> +
> +static int as3711_set_brightness_auto_i(struct as3711_bl_data *data,
> + unsigned int brightness)
> +{
> + struct as3711_bl_supply *supply = to_supply(data);
> + struct as3711 *as3711 = supply->as3711;
> + const struct as3711_bl_pdata *pdata = supply->pdata;
> + int ret = 0;
> +
> + /* Only all equal current values are supported */
> + if (pdata->su2_auto_curr1)
> + ret = regmap_write(as3711->regmap, AS3711_CURR1_VALUE,
> + brightness);
> + if (!ret && pdata->su2_auto_curr2)
> + ret = regmap_write(as3711->regmap, AS3711_CURR2_VALUE,
> + brightness);
> + if (!ret && pdata->su2_auto_curr3)
> + ret = regmap_write(as3711->regmap, AS3711_CURR3_VALUE,
> + brightness);
> +
> + return ret;
> +}
> +
> +static int as3711_set_brightness_v(struct as3711 *as3711,
> + unsigned int brightness,
> + unsigned int reg)
> +{
> + if (brightness > 31)
> + return -EINVAL;
> +
> + return regmap_update_bits(as3711->regmap, reg, 0xf0,
> + brightness << 4);
> +}
> +
> +static int as3711_bl_su2_reset(struct as3711_bl_supply *supply)
> +{
> + struct as3711 *as3711 = supply->as3711;
> + int ret = regmap_update_bits(as3711->regmap, AS3711_STEPUP_CONTROL_5,
> + 3, supply->pdata->su2_fbprot);
> + if (!ret)
> + ret = regmap_update_bits(as3711->regmap,
> + AS3711_STEPUP_CONTROL_2, 1, 0);
> + if (!ret)
> + ret = regmap_update_bits(as3711->regmap,
> + AS3711_STEPUP_CONTROL_2, 1, 1);
> + return ret;
> +}
> +
> +/*
> + * Someone with less fragile or less expensive hardware could try to simplify
> + * the brightness adjustment procedure.
> + */
> +static int as3711_bl_update_status(struct backlight_device *bl)
> +{
> + struct as3711_bl_data *data = bl_get_data(bl);
> + struct as3711_bl_supply *supply = to_supply(data);
> + struct as3711 *as3711 = supply->as3711;
> + int brightness = bl->props.brightness;
> + int ret = 0;
> +
> + dev_dbg(&bl->dev, "%s(): brightness %u, pwr %x, blank %x, state %x\n",
> + __func__, bl->props.brightness, bl->props.power,
> + bl->props.fb_blank, bl->props.state);
> +
> + if (bl->props.power != FB_BLANK_UNBLANK ||
> + bl->props.fb_blank != FB_BLANK_UNBLANK ||
> + bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
> + brightness = 0;
> +
> + if (data->type = AS3711_BL_SU1) {
> + ret = as3711_set_brightness_v(as3711, brightness,
> + AS3711_STEPUP_CONTROL_1);
> + } else {
> + const struct as3711_bl_pdata *pdata = supply->pdata;
> +
> + switch (pdata->su2_feedback) {
> + case AS3711_SU2_VOLTAGE:
> + ret = as3711_set_brightness_v(as3711, brightness,
> + AS3711_STEPUP_CONTROL_2);
> + break;
> + case AS3711_SU2_CURR_AUTO:
> + ret = as3711_set_brightness_auto_i(data, brightness / 4);
> + if (ret < 0)
> + return ret;
> + if (brightness) {
> + ret = as3711_bl_su2_reset(supply);
> + if (ret < 0)
> + return ret;
> + udelay(500);
> + ret = as3711_set_brightness_auto_i(data, brightness);
> + } else {
> + ret = regmap_update_bits(as3711->regmap,
> + AS3711_STEPUP_CONTROL_2, 1, 0);
> + }
> + break;
> + /* Manual one current feedback pin below */
> + case AS3711_SU2_CURR1:
> + ret = regmap_write(as3711->regmap, AS3711_CURR1_VALUE,
> + brightness);
> + break;
> + case AS3711_SU2_CURR2:
> + ret = regmap_write(as3711->regmap, AS3711_CURR2_VALUE,
> + brightness);
> + break;
> + case AS3711_SU2_CURR3:
> + ret = regmap_write(as3711->regmap, AS3711_CURR3_VALUE,
> + brightness);
> + break;
> + default:
> + ret = -EINVAL;
> + }
> + }
> + if (!ret)
> + data->brightness = brightness;
> +
> + return ret;
> +}
> +
> +static int as3711_bl_get_brightness(struct backlight_device *bl)
> +{
> + struct as3711_bl_data *data = bl_get_data(bl);
> +
> + return data->brightness;
> +}
> +
> +static const struct backlight_ops as3711_bl_ops = {
> + .update_status = as3711_bl_update_status,
> + .get_brightness = as3711_bl_get_brightness,
> +};
> +
> +static int as3711_bl_init_su2(struct as3711_bl_supply *supply)
> +{
> + struct as3711 *as3711 = supply->as3711;
> + const struct as3711_bl_pdata *pdata = supply->pdata;
> + u8 ctl = 0;
> + int ret;
> +
> + dev_dbg(as3711->dev, "%s(): use %u\n", __func__, pdata->su2_feedback);
> +
> + /* Turn SU2 off */
> + ret = regmap_write(as3711->regmap, AS3711_STEPUP_CONTROL_2, 0);
> + if (ret < 0)
> + return ret;
> +
> + switch (pdata->su2_feedback) {
> + case AS3711_SU2_VOLTAGE:
> + ret = regmap_update_bits(as3711->regmap, AS3711_STEPUP_CONTROL_4, 3, 0);
> + break;
> + case AS3711_SU2_CURR1:
> + ctl = 1;
> + ret = regmap_update_bits(as3711->regmap, AS3711_STEPUP_CONTROL_4, 3, 1);
> + break;
> + case AS3711_SU2_CURR2:
> + ctl = 4;
> + ret = regmap_update_bits(as3711->regmap, AS3711_STEPUP_CONTROL_4, 3, 2);
> + break;
> + case AS3711_SU2_CURR3:
> + ctl = 0x10;
> + ret = regmap_update_bits(as3711->regmap, AS3711_STEPUP_CONTROL_4, 3, 3);
> + break;
> + case AS3711_SU2_CURR_AUTO:
> + if (pdata->su2_auto_curr1)
> + ctl = 2;
> + if (pdata->su2_auto_curr2)
> + ctl |= 8;
> + if (pdata->su2_auto_curr3)
> + ctl |= 0x20;
> + ret = 0;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + if (!ret)
> + ret = regmap_write(as3711->regmap, AS3711_CURR_CONTROL, ctl);
> +
> + return ret;
> +}
> +
> +static int as3711_bl_register(struct platform_device *pdev,
> + unsigned int max_brightness, struct as3711_bl_data *su)
> +{
> + struct backlight_properties props = {.type = BACKLIGHT_RAW,};
> + struct backlight_device *bl;
> +
> + /* max tuning I = 31uA for voltage- and 38250uA for current-feedback */
> + props.max_brightness = max_brightness;
> +
> + bl = backlight_device_register(su->type = AS3711_BL_SU1 ?
> + "as3711-su1" : "as3711-su2",
> + &pdev->dev, su,
> + &as3711_bl_ops, &props);
> + if (IS_ERR(bl)) {
> + dev_err(&pdev->dev, "failed to register backlight\n");
> + return PTR_ERR(bl);
> + }
> +
> + bl->props.brightness = props.max_brightness;
> +
> + backlight_update_status(bl);
> +
> + su->bl = bl;
> +
> + return 0;
> +}
> +
> +static int as3711_backlight_probe(struct platform_device *pdev)
> +{
> + struct as3711_bl_pdata *pdata = dev_get_platdata(&pdev->dev);
> + struct as3711 *as3711 = dev_get_drvdata(pdev->dev.parent);
> + struct as3711_bl_supply *supply;
> + struct as3711_bl_data *su;
> + unsigned int max_brightness;
> + int ret;
> +
> + if (!pdata || (!pdata->su1_fb && !pdata->su2_fb)) {
> + dev_err(&pdev->dev, "No platform data, exiting...\n");
> + return -ENODEV;
> + }
> +
> + /*
> + * Due to possible hardware damage I chose to block all modes,
> + * unsupported on my hardware. Anyone, wishing to use any of those modes
> + * will have to first review the code, then activate and test it.
> + */
> + if (pdata->su1_fb ||
> + pdata->su2_fbprot != AS3711_SU2_GPIO4 ||
> + pdata->su2_feedback != AS3711_SU2_CURR_AUTO) {
> + dev_warn(&pdev->dev,
> + "Attention! An untested mode has been chosen!\n"
> + "Please, review the code, enable, test, and report success:-)\n");
> + return -EINVAL;
> + }
> +
> + supply = devm_kzalloc(&pdev->dev, sizeof(*supply), GFP_KERNEL);
> + if (!supply)
> + return -ENOMEM;
> +
> + supply->as3711 = as3711;
> + supply->pdata = pdata;
> +
> + if (pdata->su1_fb) {
> + su = &supply->su1;
> + su->fb_name = pdata->su1_fb;
> + su->type = AS3711_BL_SU1;
> +
> + max_brightness = min(pdata->su1_max_uA, 31);
> + ret = as3711_bl_register(pdev, max_brightness, su);
> + if (ret < 0)
> + return ret;
> + }
> +
> + if (pdata->su2_fb) {
> + su = &supply->su2;
> + su->fb_name = pdata->su2_fb;
> + su->type = AS3711_BL_SU2;
> +
> + switch (pdata->su2_fbprot) {
> + case AS3711_SU2_GPIO2:
> + case AS3711_SU2_GPIO3:
> + case AS3711_SU2_GPIO4:
> + case AS3711_SU2_LX_SD4:
> + break;
> + default:
> + ret = -EINVAL;
> + goto esu2;
> + }
> +
> + switch (pdata->su2_feedback) {
> + case AS3711_SU2_VOLTAGE:
> + max_brightness = min(pdata->su2_max_uA, 31);
> + break;
> + case AS3711_SU2_CURR1:
> + case AS3711_SU2_CURR2:
> + case AS3711_SU2_CURR3:
> + case AS3711_SU2_CURR_AUTO:
> + max_brightness = min(pdata->su2_max_uA / 150, 255);
> + break;
> + default:
> + ret = -EINVAL;
> + goto esu2;
> + }
> +
> + ret = as3711_bl_init_su2(supply);
> + if (ret < 0)
> + return ret;
> +
> + ret = as3711_bl_register(pdev, max_brightness, su);
> + if (ret < 0)
> + goto esu2;
> + }
> +
> + platform_set_drvdata(pdev, supply);
> +
> + return 0;
> +
> +esu2:
> + backlight_device_unregister(supply->su1.bl);
> + return ret;
> +}
> +
> +static int as3711_backlight_remove(struct platform_device *pdev)
> +{
> + struct as3711_bl_supply *supply = platform_get_drvdata(pdev);
> +
> + backlight_device_unregister(supply->su1.bl);
> + backlight_device_unregister(supply->su2.bl);
> +
> + return 0;
> +}
> +
> +static struct platform_driver as3711_backlight_driver = {
> + .driver = {
> + .name = "as3711-backlight",
> + .owner = THIS_MODULE,
> + },
> + .probe = as3711_backlight_probe,
> + .remove = as3711_backlight_remove,
> +};
> +
> +module_platform_driver(as3711_backlight_driver);
> +
> +MODULE_DESCRIPTION("Backlight Driver for AS3711 PMICs");
> +MODULE_AUTHOR("Guennadi Liakhovetski <g.liakhovetski@gmx.de");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:as3711-backlight");
> --
> 1.7.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [patch] backlight: s6e63m0: report ->gamma_table_count correctly
From: Jingoo Han @ 2013-01-25 2:22 UTC (permalink / raw)
To: 'Dan Carpenter'
Cc: 'Andrew Morton', 'Inki Dae',
'Richard Purdie', 'Florian Tobias Schandinat',
linux-fbdev, kernel-janitors, linux-kernel, 'Jingoo Han'
In-Reply-To: <20130124070524.GD5611@elgon.mountain>
On Thursday, January 24, 2013 10:45 PM, Dan Carpenter wrote
CC'ed Andrew Morton, Inki Dae.
>
> gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to
> int.
>
> The current code sets ->gamma_table_count to 6 on 64bit arches and to 3
> on 32 bit arches. It should be 3 on everything.
Actually, I don't know it is right.
However, it is certain that this panel is currently used on 32 bit arches
such as ARM SoCs.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This is from reading the code. We use ->gamma_table_count in sysfs file
> but other than that I'm not sure what it's for. I am not very familiar
> with this code.
>
> diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c
> index 2126b96..9c2677f 100644
> --- a/drivers/video/backlight/s6e63m0.c
> +++ b/drivers/video/backlight/s6e63m0.c
> @@ -766,7 +766,7 @@ static int s6e63m0_probe(struct spi_device *spi)
> * know that.
> */
> lcd->gamma_table_count > - sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int));
> + sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int *));
>
> ret = device_create_file(&(spi->dev), &dev_attr_gamma_mode);
> if (ret < 0)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] vgacon/vt: clear buffer attributes when we load a 512 character font (v2)
From: Dave Airlie @ 2013-01-25 2:21 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
When we switch from 256->512 byte font rendering mode, it means the
current contents of the screen is being reinterpreted. The bit that holds
the high bit of the 9-bit font, may have been previously set, and thus
the new font misrenders.
The problem case we see is grub2 writes spaces with the bit set, so it
ends up with data like 0x820, which gets reinterpreted into 0x120 char
which the font translates into G with a circumflex. This flashes up on
screen at boot and is quite ugly.
A current side effect of this patch though is that any rendering on the
screen changes color to a slightly darker color, but at least the screen
no longer corrupts.
v2: as suggested by hpa, always clear the attribute space, whether we
are are going to or from 512 chars.
Signed-off-by: Dave Airlie <airlied@redhat.com>
f
---
drivers/tty/vt/vt.c | 2 +-
drivers/video/console/vgacon.c | 22 +++++++++++++++-------
include/linux/vt_kern.h | 1 +
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 8fd8968..c8067ae 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -638,7 +638,7 @@ static inline void save_screen(struct vc_data *vc)
* Redrawing of screen
*/
-static void clear_buffer_attributes(struct vc_data *vc)
+void clear_buffer_attributes(struct vc_data *vc)
{
unsigned short *p = (unsigned short *)vc->vc_origin;
int count = vc->vc_screenbuf_size / 2;
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index d449a74..5855d17 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -1064,7 +1064,7 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
unsigned short video_port_status = vga_video_port_reg + 6;
int font_select = 0x00, beg, i;
char *charmap;
-
+ bool clear_attribs = false;
if (vga_video_type != VIDEO_TYPE_EGAM) {
charmap = (char *) VGA_MAP_MEM(colourmap, 0);
beg = 0x0e;
@@ -1169,12 +1169,6 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
/* if 512 char mode is already enabled don't re-enable it. */
if ((set) && (ch512 != vga_512_chars)) {
- /* attribute controller */
- for (i = 0; i < MAX_NR_CONSOLES; i++) {
- struct vc_data *c = vc_cons[i].d;
- if (c && c->vc_sw = &vga_con)
- c->vc_hi_font_mask = ch512 ? 0x0800 : 0;
- }
vga_512_chars = ch512;
/* 256-char: enable intensity bit
512-char: disable intensity bit */
@@ -1185,8 +1179,22 @@ static int vgacon_do_font_op(struct vgastate *state,char *arg,int set,int ch512)
it means, but it works, and it appears necessary */
inb_p(video_port_status);
vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0);
+ clear_attribs = true;
}
raw_spin_unlock_irq(&vga_lock);
+
+ if (clear_attribs) {
+ for (i = 0; i < MAX_NR_CONSOLES; i++) {
+ struct vc_data *c = vc_cons[i].d;
+ if (c && c->vc_sw = &vga_con) {
+ /* force hi font mask to 0, so we always clear
+ the bit on either transition */
+ c->vc_hi_font_mask = 0x00;
+ clear_buffer_attributes(c);
+ c->vc_hi_font_mask = ch512 ? 0x0800 : 0;
+ }
+ }
+ }
return 0;
}
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 50ae7d0..1f55665 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -47,6 +47,7 @@ int con_set_cmap(unsigned char __user *cmap);
int con_get_cmap(unsigned char __user *cmap);
void scrollback(struct vc_data *vc, int lines);
void scrollfront(struct vc_data *vc, int lines);
+void clear_buffer_attributes(struct vc_data *vc);
void update_region(struct vc_data *vc, unsigned long start, int count);
void redraw_screen(struct vc_data *vc, int is_switch);
#define update_screen(x) redraw_screen(x, 0)
--
1.8.1
^ permalink raw reply related
* Re: [git pull] fbcon locking fixes.
From: Linus Torvalds @ 2013-01-25 1:57 UTC (permalink / raw)
To: Dave Airlie
Cc: Maarten Lankhorst, linux-fbdev@vger.kernel.org,
Linux Kernel Mailing List, DRI mailing list, Andrew Morton
In-Reply-To: <CAPM=9txUNG_CeK+YBhcA_47BVv4Z2GAmEC_J59cY+D9nRgv54A@mail.gmail.com>
On Thu, Jan 24, 2013 at 5:45 PM, Dave Airlie <airlied@gmail.com> wrote:
>
> Okay I've just sent out another fbcon patch to fix the locking harder.
>
> There was a path going into set_con2fb_path if an fb driver was
> already registered, I just pushed the locking out further on anyone
> going in there.
>
> it boots on my EFI macbook here.
Ok, good. Sounds like we'll finally get it fixed, but I'm still too
much of a scaredy-cat to take it for now, so -next it is...
Linus
^ permalink raw reply
* Re: [git pull] fbcon locking fixes.
From: Dave Airlie @ 2013-01-25 1:45 UTC (permalink / raw)
To: Linus Torvalds
Cc: Dave Airlie, Andrew Morton, DRI mailing list,
Linux Kernel Mailing List, linux-fbdev@vger.kernel.org,
m.b.lankhorst
In-Reply-To: <CAPM=9tz6_=k1Ze5h2935-W59BCVy9KXA_z6t8inW6_-Cxw244Q@mail.gmail.com>
On Fri, Jan 25, 2013 at 11:06 AM, Dave Airlie <airlied@gmail.com> wrote:
> On Fri, Jan 25, 2013 at 10:53 AM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>> On Thu, Jan 24, 2013 at 4:42 PM, Dave Airlie <airlied@linux.ie> wrote:
>>>
>>> These patches have been sailing around long enough, waiting for a maintainer
>>> to reappear, so I've decided enough is enough, lockdep is kinda useful to have.
>>
>> Last this was tried, these patches failed miserably.
>>
>> They caused instant lockdep splat and then a total lockup with efifb.
>> It may be that Takashi's patch helps fix that problem, but it's in no
>> way clear that it does, so the patch series isn't at all obviously
>> stable.
>>
>> Yes, lockdep is indeed "kinda useful", and there clearly are locking
>> problems in fbdev. But I'm not seeing myself pulling these for 3.8.
>> They've been too problematic to pull in at this late stage.
>>
>
> Okay I'll fix the efifb problem and then maybe queue them for -next.
Okay I've just sent out another fbcon patch to fix the locking harder.
There was a path going into set_con2fb_path if an fb driver was
already registered, I just pushed the locking out further on anyone
going in there.
it boots on my EFI macbook here.
Dave.
^ permalink raw reply
* [PATCH] fbcon: fix locking harder
From: Dave Airlie @ 2013-01-25 1:43 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
Okay so Alan's patch handled the case where there was no registered fbcon,
however the other path entered in set_con2fb_map pit.
In there we called fbcon_takeover, but we also took the console lock in a couple
of places. So push the console lock out to the callers of set_con2fb_map,
this means fbmem and switcheroo needed to take the lock around the fb notifier
entry points that lead to this.
This should fix the efifb regression seen by Maarten.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vga_switcheroo.c | 3 +++
drivers/video/console/fbcon.c | 11 ++++++++---
drivers/video/fbmem.c | 2 ++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index fa60add..cf787e1 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -25,6 +25,7 @@
#include <linux/fb.h>
#include <linux/pci.h>
+#include <linux/console.h>
#include <linux/vga_switcheroo.h>
#include <linux/vgaarb.h>
@@ -337,8 +338,10 @@ static int vga_switchto_stage2(struct vga_switcheroo_client *new_client)
if (new_client->fb_info) {
struct fb_event event;
+ console_lock();
event.info = new_client->fb_info;
fb_notifier_call_chain(FB_EVENT_REMAP_ALL_CONSOLE, &event);
+ console_unlock();
}
ret = vgasr_priv.handler->switchto(new_client->id);
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 2aef9ca..2e2d959 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -842,6 +842,8 @@ static void con2fb_init_display(struct vc_data *vc, struct fb_info *info,
*
* Maps a virtual console @unit to a frame buffer device
* @newidx.
+ *
+ * This should be called with the console lock held.
*/
static int set_con2fb_map(int unit, int newidx, int user)
{
@@ -859,7 +861,7 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (!search_for_mapped_con() || !con_is_bound(&fb_con)) {
info_idx = newidx;
- return fbcon_takeover(0);
+ return do_fbcon_takeover(0);
}
if (oldidx != -1)
@@ -867,7 +869,6 @@ static int set_con2fb_map(int unit, int newidx, int user)
found = search_fb_in_map(newidx);
- console_lock();
con2fb_map[unit] = newidx;
if (!err && !found)
err = con2fb_acquire_newinfo(vc, info, unit, oldidx);
@@ -894,7 +895,6 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (!search_fb_in_map(info_idx))
info_idx = newidx;
- console_unlock();
return err;
}
@@ -3019,6 +3019,7 @@ static inline int fbcon_unbind(void)
}
#endif /* CONFIG_VT_HW_CONSOLE_BINDING */
+/* called with console_lock held */
static int fbcon_fb_unbind(int idx)
{
int i, new_idx = -1, ret = 0;
@@ -3045,6 +3046,7 @@ static int fbcon_fb_unbind(int idx)
return ret;
}
+/* called with console_lock held */
static int fbcon_fb_unregistered(struct fb_info *info)
{
int i, idx;
@@ -3082,6 +3084,7 @@ static int fbcon_fb_unregistered(struct fb_info *info)
return 0;
}
+/* called with console_lock held */
static void fbcon_remap_all(int idx)
{
int i;
@@ -3126,6 +3129,7 @@ static inline void fbcon_select_primary(struct fb_info *info)
}
#endif /* CONFIG_FRAMEBUFFER_DETECT_PRIMARY */
+/* called with console_lock held */
static int fbcon_fb_registered(struct fb_info *info)
{
int ret = 0, i, idx;
@@ -3278,6 +3282,7 @@ static int fbcon_event_notify(struct notifier_block *self,
ret = fbcon_fb_unregistered(info);
break;
case FB_EVENT_SET_CONSOLE_MAP:
+ /* called with console lock held */
con2fb = event->data;
ret = set_con2fb_map(con2fb->console - 1,
con2fb->framebuffer, 1);
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 070b9a1..dc61c12 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1177,8 +1177,10 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
event.data = &con2fb;
if (!lock_fb_info(info))
return -ENODEV;
+ console_lock();
event.info = info;
ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP, &event);
+ console_unlock();
unlock_fb_info(info);
break;
case FBIOBLANK:
--
1.8.1
^ permalink raw reply related
* Re: [git pull] fbcon locking fixes.
From: Dave Airlie @ 2013-01-25 1:06 UTC (permalink / raw)
To: Linus Torvalds
Cc: Dave Airlie, Andrew Morton, DRI mailing list,
Linux Kernel Mailing List, linux-fbdev@vger.kernel.org
In-Reply-To: <CA+55aFxzDv0emWgyde7iEWpgZarAGaExrKbEHFr-UcbhoeH_Cw@mail.gmail.com>
On Fri, Jan 25, 2013 at 10:53 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Jan 24, 2013 at 4:42 PM, Dave Airlie <airlied@linux.ie> wrote:
>>
>> These patches have been sailing around long enough, waiting for a maintainer
>> to reappear, so I've decided enough is enough, lockdep is kinda useful to have.
>
> Last this was tried, these patches failed miserably.
>
> They caused instant lockdep splat and then a total lockup with efifb.
> It may be that Takashi's patch helps fix that problem, but it's in no
> way clear that it does, so the patch series isn't at all obviously
> stable.
>
> Yes, lockdep is indeed "kinda useful", and there clearly are locking
> problems in fbdev. But I'm not seeing myself pulling these for 3.8.
> They've been too problematic to pull in at this late stage.
>
Okay I'll fix the efifb problem and then maybe queue them for -next.
Dave.
^ permalink raw reply
* Re: [git pull] fbcon locking fixes.
From: Linus Torvalds @ 2013-01-25 0:53 UTC (permalink / raw)
To: Dave Airlie
Cc: Andrew Morton, DRI mailing list, Linux Kernel Mailing List,
linux-fbdev@vger.kernel.org
In-Reply-To: <alpine.DEB.2.00.1301250041001.25545@skynet.skynet.ie>
On Thu, Jan 24, 2013 at 4:42 PM, Dave Airlie <airlied@linux.ie> wrote:
>
> These patches have been sailing around long enough, waiting for a maintainer
> to reappear, so I've decided enough is enough, lockdep is kinda useful to have.
Last this was tried, these patches failed miserably.
They caused instant lockdep splat and then a total lockup with efifb.
It may be that Takashi's patch helps fix that problem, but it's in no
way clear that it does, so the patch series isn't at all obviously
stable.
Yes, lockdep is indeed "kinda useful", and there clearly are locking
problems in fbdev. But I'm not seeing myself pulling these for 3.8.
They've been too problematic to pull in at this late stage.
Linus
^ permalink raw reply
* Re: [git pull] fbcon locking fixes.
From: Andrew Morton @ 2013-01-25 0:50 UTC (permalink / raw)
To: Dave Airlie
Cc: torvalds, DRI mailing list, linux-kernel, linux-fbdev,
Maarten Lankhorst
In-Reply-To: <alpine.DEB.2.00.1301250041001.25545@skynet.skynet.ie>
On Fri, 25 Jan 2013 00:42:37 +0000 (GMT)
Dave Airlie <airlied@linux.ie> wrote:
> These patches have been sailing around long enough, waiting for a maintainer
> to reappear, so I've decided enough is enough, lockdep is kinda useful to have.
>
> Thanks to Daniel for annoying me enough :-)
Me too, but the patches broke Maarten's EFI driver setup:
https://lkml.org/lkml/2013/1/15/203.
^ permalink raw reply
* [git pull] fbcon locking fixes.
From: Dave Airlie @ 2013-01-25 0:42 UTC (permalink / raw)
To: torvalds, Andrew Morton; +Cc: DRI mailing list, linux-kernel, linux-fbdev
Hi Linus,
These patches have been sailing around long enough, waiting for a maintainer
to reappear, so I've decided enough is enough, lockdep is kinda useful to have.
Thanks to Daniel for annoying me enough :-)
Dave 'not the fbdev maintainer' Airlie.
The following changes since commit ba2ab41f3d68f277860768b2c5b197768b196332:
Merge tag 'pm+acpi-for-3.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (2013-01-24 10:19:13 -0800)
are available in the git repository at:
git://people.freedesktop.org/~airlied/linux fbcon-locking-fixes
for you to fetch changes up to a9d2331a8eccc17408abd5a7cd3e463745254d65:
fb: Yet another band-aid for fixing lockdep mess (2013-01-25 10:34:49 +1000)
----------------------------------------------------------------
Alan Cox (1):
fb: rework locking to fix lock ordering on takeover
Takashi Iwai (1):
fb: Yet another band-aid for fixing lockdep mess
drivers/tty/vt/vt.c | 134 ++++++++++++++++++++++++++++++------------
drivers/video/console/fbcon.c | 33 ++++++++++-
drivers/video/fbmem.c | 9 ++-
drivers/video/fbsysfs.c | 3 +
include/linux/console.h | 2 +
include/linux/vt_kern.h | 2 +
6 files changed, 140 insertions(+), 43 deletions(-)
^ permalink raw reply
* Re: RE: [PATCH v4 12/12] video: da8xx-fb: CCF clock divider handling
From: Mike Turquette @ 2013-01-24 17:00 UTC (permalink / raw)
To: Mohammed, Afzal, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Florian Tobias Schandinat, Valkeinen, Tomi, Grant Likely,
Rob Herring, Rob Landley
In-Reply-To: <C8443D0743D26F4388EA172BF4E2A7A93EA92ADF@DBDE01.ent.ti.com>
Quoting Mohammed, Afzal (2013-01-24 03:36:02)
> Hi Mike,
>
> On Thu, Jan 24, 2013 at 01:52:04, Mike Turquette wrote:
> > Quoting Afzal Mohammed (2013-01-23 03:48:56)
>
> > > +static inline void da8xx_fb_clkc_enable(void)
> > > +{
> > > if (lcd_revision = LCD_VERSION_2)
> > > lcdc_write(LCD_V2_DMA_CLK_EN | LCD_V2_LIDD_CLK_EN |
> > > LCD_V2_CORE_CLK_EN, LCD_CLK_ENABLE_REG);
>
> > > +static inline int da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
> > > + struct fb_videomode *mode)
> > > +{
>
> > > + ret = clk_set_rate(par->child_clk, PICOS2KHZ(mode->pixclock) * 1000);
> > > + if (IS_ERR_VALUE(ret)) {
> > > + dev_err(par->dev, "unable to setup pixel clock of %u ps",
> > > + mode->pixclock);
> > > + return ret;
> > > + }
> > > + da8xx_fb_clkc_enable();
>
> > It looks like you are using the legacy method to enable/disable the
> > clock and using the CCF basic divider to set the rate. This feels a bit
> > hacky to me. If you want to model your clock in CCF then you should
> > probably model the whole clock, not just the rate-change aspects of it.
>
> Initially I thought about it, but seeing requirement of 3 gate clocks
> (due to 3 bits meant for different purposes - DMA, LIDD and CORE
> functionalities), felt that having 4 clocks (3 gate + 1 divider) in
> driver would be an overdesign [leaving a branch instead of a leaf of
> the tree in driver ;)].
>
> > Have you looked at the composite clock patches from Prashant? Those
> > might give you the divider+gate properties that you are looking for:
> > http://article.gmane.org/gmane.linux.kernel/1416697
>
> Thanks for the pointer,
>
> Now with the composite clock in mind, it was tried to relate to what
> was required for the present scenario.
>
> So there are 3 - LIDD is actually not for present use case, CORE could
> be clubbed with the divider to have a composite clock. And CORE is
> in functional clock path and logically it's perfectly alright to have
> the composite clock.
>
Some of the clock names are a bit generic, so a question that I'm going
to repeat throughout my response: "is this clock only inside of your
video IP ?"
Regarding the CORE clock, is this only inside of your IP or are you
referring to the SoC CORE clock which is driven by a DPLL and clocks
DDR and many other peripherals (often MMC, UART, etc)?
Note that this is from my past experience with OMAP, and I'm making an
assumption that the clock scheme between OMAP and Da Vinci/AM335x parts
isn't very different.
Is there a public TRM I can look at? It would help me understand this
without having to ask you so many annoying questions ;)
> And now we are left with DMA, this is actually in the interface clock
> path which driver in unaware. An option would be to have DMA clock
> as child of CORE plus divider composite clock, even though logically
> DMA can't be considered in the same path.
>
Why is the driver unaware of the interface clk? For instance OMAP3 had
separate fclk and iclk for IPs and drivers would call clk_enable on
both. Or am I misunderstanding something?
In general I don't think the clock subtree should be modeled in a way
that is convenient for software, but instead model the actual hardware.
Trust me, if you don't model the actual hardware then you will be very
confused when you come back and revisit this code in 6 months and can't
remember why things are so weird looking.
Thanks,
Mike
> Also tried not enabling DMA clock, but driver is able to provide
> display without any issues, so was thinking whether to avoid
> instantiating DMA clock at all and hence to have a simple single
> composite clock. Trying to get information internally on whether
> not setting DMA clock bits would actually make a difference.
>
> If you have any opinion on how to deal here, let me know.
>
> Regards
> Afzal
^ permalink raw reply
* RE: [PATCH v4 12/12] video: da8xx-fb: CCF clock divider handling
From: Mohammed, Afzal @ 2013-01-24 11:36 UTC (permalink / raw)
To: Mike Turquette, linux-fbdev@vger.kernel.org,
linux-omap@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Florian Tobias Schandinat, Valkeinen, Tomi, Grant Likely,
Rob Herring, Rob Landley
In-Reply-To: <20130123202204.9205.66575@quantum>
SGkgTWlrZSwNCg0KT24gVGh1LCBKYW4gMjQsIDIwMTMgYXQgMDE6NTI6MDQsIE1pa2UgVHVycXVl
dHRlIHdyb3RlOg0KPiBRdW90aW5nIEFmemFsIE1vaGFtbWVkICgyMDEzLTAxLTIzIDAzOjQ4OjU2
KQ0KDQo+ID4gK3N0YXRpYyBpbmxpbmUgdm9pZCBkYTh4eF9mYl9jbGtjX2VuYWJsZSh2b2lkKQ0K
PiA+ICt7DQo+ID4gICAgICAgICBpZiAobGNkX3JldmlzaW9uID09IExDRF9WRVJTSU9OXzIpDQo+
ID4gICAgICAgICAgICAgICAgIGxjZGNfd3JpdGUoTENEX1YyX0RNQV9DTEtfRU4gfCBMQ0RfVjJf
TElERF9DTEtfRU4gfA0KPiA+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT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CBsZXQgbWUga25vdy4NCg0KUmVnYXJkcw0KQWZ6YWwNCg0KDQo
^ permalink raw reply
* Re: [PATCH 2/2] drm/i915: fixup per-crtc locking in intel_release_load_detect_pipe
From: Daniel Vetter @ 2013-01-24 9:55 UTC (permalink / raw)
To: Dave Airlie
Cc: Daniel Vetter, Intel Graphics Development, linux-fbdev-devel,
LKML, DRI Development
In-Reply-To: <1358958309-5342-3-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Jan 23, 2013 at 05:25:09PM +0100, Daniel Vetter wrote:
> One of the early return cases missed the mutex unlocking. Hilarity
> ensued.
>
> This regression has been introduced in
>
> commit 7b24056be6db7ce907baffdd4cf142ab774ea60c
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Wed Dec 12 00:35:33 2012 +0100
>
> drm: don't hold crtc mutexes for connector ->detect callbacks
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59750
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Cancan Feng <cancan.feng@intel.com>
Dave, please pick this one up for your drm-next tree since the issue only
happens there due to the modeset locking rework.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply
* RE: [PATCH v16 RESEND 0/7] of: add display helper
From: Mohammed, Afzal @ 2013-01-24 8:47 UTC (permalink / raw)
To: Steffen Trumtrar, Leela Krishna Amudala
Cc: linux-fbdev@vger.kernel.org, David Airlie,
devicetree-discuss@lists.ozlabs.org, Florian Tobias Schandinat,
dri-devel@lists.freedesktop.org, Rob Clark, Valkeinen, Tomi,
Laurent Pinchart, kernel@pengutronix.de, Guennady Liakhovetski,
linux-media@vger.kernel.org
In-Reply-To: <20130124081958.GA28406@pengutronix.de>
SGkgU3RlZmZlbiwNCg0KT24gVGh1LCBKYW4gMjQsIDIwMTMgYXQgMTM6NDk6NTgsIFN0ZWZmZW4g
VHJ1bXRyYXIgd3JvdGU6DQo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ydWN0IGZiX3ZpZGVvbW9kZSAqZmIsDQogICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgaW50IGluZGV4KTsNCisjZWxzZQ0KK3N0YXRpYyBpbmxpbmUgaW50IG9m
X2dldF9mYl92aWRlb21vZGUoc3RydWN0IGRldmljZV9ub2RlICpucCwNCisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGZiX3ZpZGVvbW9kZSAqZmIsDQorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBpbmRleCkNCit7DQorICAgICAgIHJl
dHVybiAtRUlOVkFMOw0KK30NCisjZW5kaWYNCisNCiBleHRlcm4gaW50IGZiX3ZpZGVvbW9kZV9m
cm9tX3ZpZGVvbW9kZShjb25zdCBzdHJ1Y3QgdmlkZW9tb2RlICp2bSwNCiAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBmYl92aWRlb21vZGUgKmZibW9kZSk7DQoN
Cg=
^ permalink raw reply
* Re: [PATCH v16 RESEND 0/7] of: add display helper
From: Steffen Trumtrar @ 2013-01-24 8:19 UTC (permalink / raw)
To: Leela Krishna Amudala
Cc: linux-fbdev, Mohammed, Afzal, David Airlie, devicetree-discuss,
Florian Tobias Schandinat, dri-devel, Rob Clark, Tomi Valkeinen,
Laurent Pinchart, kernel, Guennady Liakhovetski, linux-media
In-Reply-To: <CAL1wa8d6wXdxgVJ=c2ma2Adm-RkF3S5ga219dSrh1fFo0L9X8w@mail.gmail.com>
On Thu, Jan 24, 2013 at 10:44:50AM +0530, Leela Krishna Amudala wrote:
> Steffen,
>
> You can add my tested-by for this series.. :)
> I have been using them for Exynos: smdk5250 board.
>
Thanks. I'll use that opportunity for a v17 that is rebased onto 3.8-rc4.
Regards,
Steffen
> On Wed, Jan 23, 2013 at 2:42 PM, Steffen Trumtrar
> <s.trumtrar@pengutronix.de> wrote:
> > On Tue, Jan 22, 2013 at 03:50:48PM -0600, Rob Clark wrote:
> >> On Mon, Jan 21, 2013 at 5:07 AM, Steffen Trumtrar
> >> <s.trumtrar@pengutronix.de> wrote:
> >> > Hi!
> >> >
> >> > There was still no maintainer, that commented, ack'd, nack'd, apply'd the
> >> > series. So, this is just a resend.
> >> > The patches were tested with:
> >> >
> >> > - v15 on Tegra by Thierry
> >> > - sh-mobile-lcdcfb by Laurent
> >> > - MX53QSB by Marek
> >> > - Exynos: smdk5250 by Leela
> >> > - AM335X EVM & AM335X EVM-SK by Afzal
> >> > - imx6q: sabrelite, sabresd by Philipp and me
> >> > - imx53: tqma53/mba53 by me
> >>
> >>
> >> btw, you can add my tested-by for this series.. I've been using them
> >> for the tilcdc lcd-panel output driver support.
> >>
> >
> > Thanks. The more drivers the merrier ;-)
> >
> > Steffen
> >
> >> >
> >> >
> >> > Changes since v15:
> >> > - move include/linux/{videomode,display_timing}.h to include/video
> >> > - move include/linux/of_{videomode,display_timing}.h to include/video
> >> > - reimplement flags: add VESA flags and data flags
> >> > - let pixelclock in struct videomode be unsigned long
> >> > - rename of_display_timings_exists to of_display_timings_exist
> >> > - revise logging/error messages: replace __func__ with np->full_name
> >> > - rename pixelclk-inverted to pixelclk-active
> >> > - revise comments in code
> >> >
> >> > Changes since v14:
> >> > - fix "const struct *" warning
> >> > (reported by: Leela Krishna Amudala <l.krishna@samsung.com>)
> >> > - return -EINVAL when htotal or vtotal are zero
> >> > - remove unreachable code in of_get_display_timings
> >> > - include headers in .c files and not implicit in .h
> >> > - sort includes alphabetically
> >> > - fix lower/uppercase in binding documentation
> >> > - rebase onto v3.7-rc7
> >> >
> >> > Changes since v13:
> >> > - fix "const struct *" warning
> >> > (reported by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>)
> >> > - prevent division by zero in fb_videomode_from_videomode
> >> >
> >> > Changes since v12:
> >> > - rename struct display_timing to via_display_timing in via subsystem
> >> > - fix refreshrate calculation
> >> > - fix "const struct *" warnings
> >> > (reported by: Manjunathappa, Prakash <prakash.pm@ti.com>)
> >> > - some CodingStyle fixes
> >> > - rewrite parts of commit messages and display-timings.txt
> >> > - let display_timing_get_value get all values instead of just typical
> >> >
> >> > Changes since v11:
> >> > - make pointers const where applicable
> >> > - add reviewed-by Laurent Pinchart
> >> >
> >> > Changes since v10:
> >> > - fix function name (drm_)display_mode_from_videomode
> >> > - add acked-by, reviewed-by, tested-by
> >> >
> >> > Changes since v9:
> >> > - don't leak memory when previous timings were correct
> >> > - CodingStyle fixes
> >> > - move blank lines around
> >> >
> >> > Changes since v8:
> >> > - fix memory leaks
> >> > - change API to be more consistent (foo_from_bar(struct bar, struct foo))
> >> > - include headers were necessary
> >> > - misc minor bugfixes
> >> >
> >> > Changes since v7:
> >> > - move of_xxx to drivers/video
> >> > - remove non-binding documentation from display-timings.txt
> >> > - squash display_timings and videomode in one patch
> >> > - misc minor fixes
> >> >
> >> > Changes since v6:
> >> > - get rid of some empty lines etc.
> >> > - move functions to their subsystems
> >> > - split of_ from non-of_ functions
> >> > - add at least some kerneldoc to some functions
> >> >
> >> > Changes since v5:
> >> > - removed all display stuff and just describe timings
> >> >
> >> > Changes since v4:
> >> > - refactored functions
> >> >
> >> > Changes since v3:
> >> > - print error messages
> >> > - free alloced memory
> >> > - general cleanup
> >> >
> >> > Changes since v2:
> >> > - use hardware-near property-names
> >> > - provide a videomode structure
> >> > - allow ranges for all properties (<min,typ,max>)
> >> > - functions to get display_mode or fb_videomode
> >> >
> >> >
> >> > Regards,
> >> > Steffen
> >> >
> >> >
> >> > Steffen Trumtrar (7):
> >> > viafb: rename display_timing to via_display_timing
> >> > video: add display_timing and videomode
> >> > video: add of helper for display timings/videomode
> >> > fbmon: add videomode helpers
> >> > fbmon: add of_videomode helpers
> >> > drm_modes: add videomode helpers
> >> > drm_modes: add of_videomode helpers
> >> >
> >> > .../devicetree/bindings/video/display-timing.txt | 109 +++++++++
> >> > drivers/gpu/drm/drm_modes.c | 70 ++++++
> >> > drivers/video/Kconfig | 21 ++
> >> > drivers/video/Makefile | 4 +
> >> > drivers/video/display_timing.c | 24 ++
> >> > drivers/video/fbmon.c | 94 ++++++++
> >> > drivers/video/of_display_timing.c | 239 ++++++++++++++++++++
> >> > drivers/video/of_videomode.c | 54 +++++
> >> > drivers/video/via/hw.c | 6 +-
> >> > drivers/video/via/hw.h | 2 +-
> >> > drivers/video/via/lcd.c | 2 +-
> >> > drivers/video/via/share.h | 2 +-
> >> > drivers/video/via/via_modesetting.c | 8 +-
> >> > drivers/video/via/via_modesetting.h | 6 +-
> >> > drivers/video/videomode.c | 39 ++++
> >> > include/drm/drmP.h | 9 +
> >> > include/linux/fb.h | 8 +
> >> > include/video/display_timing.h | 124 ++++++++++
> >> > include/video/of_display_timing.h | 20 ++
> >> > include/video/of_videomode.h | 18 ++
> >> > include/video/videomode.h | 48 ++++
> >> > 21 files changed, 894 insertions(+), 13 deletions(-)
> >> > create mode 100644 Documentation/devicetree/bindings/video/display-timing.txt
> >> > create mode 100644 drivers/video/display_timing.c
> >> > create mode 100644 drivers/video/of_display_timing.c
> >> > create mode 100644 drivers/video/of_videomode.c
> >> > create mode 100644 drivers/video/videomode.c
> >> > create mode 100644 include/video/display_timing.h
> >> > create mode 100644 include/video/of_display_timing.h
> >> > create mode 100644 include/video/of_videomode.h
> >> > create mode 100644 include/video/videomode.h
> >> >
> >> > --
> >> > 1.7.10.4
> >> >
> >>
> >
> > --
> > Pengutronix e.K. | |
> > Industrial Linux Solutions | http://www.pengutronix.de/ |
> > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: [PATCH v16 RESEND 0/7] of: add display helper
From: Steffen Trumtrar @ 2013-01-24 7:56 UTC (permalink / raw)
To: Dave Airlie
Cc: Rob Clark, devicetree-discuss, David Airlie, Rob Herring,
linux-fbdev, dri-devel, Laurent Pinchart, Thierry Reding,
Guennady Liakhovetski, linux-media, Tomi Valkeinen,
Stephen Warren, Florian Tobias Schandinat, Leela Krishna Amudala,
Mohammed, Afzal, kernel
In-Reply-To: <CAPM=9txadRcm4j7_GryvxgosEhF8S3-1rGxqR_bw8UXMaoVWug@mail.gmail.com>
On Thu, Jan 24, 2013 at 10:15:54AM +1000, Dave Airlie wrote:
> >> > Hi!
> >> >
> >> > There was still no maintainer, that commented, ack'd, nack'd, apply'd the
> >> > series. So, this is just a resend.
> >> > The patches were tested with:
> >> >
> >> > - v15 on Tegra by Thierry
> >> > - sh-mobile-lcdcfb by Laurent
> >> > - MX53QSB by Marek
> >> > - Exynos: smdk5250 by Leela
> >> > - AM335X EVM & AM335X EVM-SK by Afzal
> >> > - imx6q: sabrelite, sabresd by Philipp and me
> >> > - imx53: tqma53/mba53 by me
> >>
> >>
> >> btw, you can add my tested-by for this series.. I've been using them
> >> for the tilcdc lcd-panel output driver support.
> >>
> >
> > Thanks. The more drivers the merrier ;-)
> >
>
> I'll probably merge these via my tree for lack of anyone else doing
> it. I just don't want to end up as the fbdev maintainer by default,
\o/ very good to hear. Thanks.
> maybe if we move the console stuff out of drivers/video to somewhere
Okay. That confused me for a second, but it doesn't seem to be directed at
me *phew*.
> else I'd be willing to look after it, but the thought of maintaining
> fbdev drivers would drive me to a liver transplant.
>
> Dave.
>
Regards,
Steffen
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* [patch] backlight: s6e63m0: report ->gamma_table_count correctly
From: Dan Carpenter @ 2013-01-24 7:05 UTC (permalink / raw)
To: linux-fbdev
gamma_table has 3 arrays which each hold MAX_GAMMA_LEVEL pointers to
int.
The current code sets ->gamma_table_count to 6 on 64bit arches and to 3
on 32 bit arches. It should be 3 on everything.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is from reading the code. We use ->gamma_table_count in sysfs file
but other than that I'm not sure what it's for. I am not very familiar
with this code.
diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c
index 2126b96..9c2677f 100644
--- a/drivers/video/backlight/s6e63m0.c
+++ b/drivers/video/backlight/s6e63m0.c
@@ -766,7 +766,7 @@ static int s6e63m0_probe(struct spi_device *spi)
* know that.
*/
lcd->gamma_table_count - sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int));
+ sizeof(gamma_table) / (MAX_GAMMA_LEVEL * sizeof(int *));
ret = device_create_file(&(spi->dev), &dev_attr_gamma_mode);
if (ret < 0)
^ permalink raw reply related
* Re: [PATCH 2/3] tegra: pwm-backlight: add tegra pwm-bl driver
From: Alex Courbot @ 2013-01-24 6:10 UTC (permalink / raw)
To: Thierry Reding, Richard Purdie
Cc: Stephen Warren,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Zhang,
gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
In-Reply-To: <2178053.V0UsGT5PW9@percival>
On Wednesday 23 January 2013 17:45:39 Alex Courbot wrote:
> > I'm confused. Why would you want to call into pwm_bl directly? If we're
> > going to split this up into separate platform devices, why not look up a
> > given backlight device and use the backlight API on that? The pieces of
> > the puzzle are all there: you can use of_find_backlight_by_node() to
> > obtain a backlight device from a device tree node, so I'd expect the DT
> > to look something like this:
> > backlight: backlight {
> >
> > compatible = "pwm-backlight";
> > ...
> >
> > };
>
> This would still prevent any power control from the backlight driver. I.e.
> if someone sets the brightness to 0 through sysfs, we cannot power the
> backlight off as pwm-backlight cannot control more than the PWM without
> platform callbacks. Backlight could only be powered off as a result of a fb
> blank event.
In order to solve this, how about adding a backlight notifier call chain to
broadcast backlight events in a fashion similar to what is done in
fbmem/fbcon? Then backlight_update_status() could send events like
BACKLIGHT_EARLY_EVENT_UPDATE and BACKLIGHT_EVENT_UPDATE to which panel drivers
could subscribe in order to power the backlight up and down as needed.
Then as the backlight is mentioned in the panel's DT node,
> panel: panel {
> compatible = "...";
> ...
> backlight = <&backlight>;
> ...
> };
the panel's driver could listen to backlight-related events and do its stuff
transparently, without changing anything to the backlight drivers. This would
be a good way to replace pwm-backlight's callbacks for platforms that use the
DT, and would also be applicable to any backlight class device.
Generally speaking, having a mean to monitor backlights state in the kernel
does not seem too crazy, especially since we already have a way to notify user
space through backlight_generate_event().
Richard, does that sound ok to you?
Alex.
^ permalink raw reply
* Re: [PATCH v16 RESEND 0/7] of: add display helper
From: Leela Krishna Amudala @ 2013-01-24 5:26 UTC (permalink / raw)
To: Steffen Trumtrar
Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Mohammed, Afzal, David Airlie,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Florian Tobias Schandinat,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Rob Clark,
Tomi Valkeinen, Laurent Pinchart, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
Guennady Liakhovetski, linux-media-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20130123091202.GA11828-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Steffen,
You can add my tested-by for this series.. :)
I have been using them for Exynos: smdk5250 board.
On Wed, Jan 23, 2013 at 2:42 PM, Steffen Trumtrar
<s.trumtrar@pengutronix.de> wrote:
> On Tue, Jan 22, 2013 at 03:50:48PM -0600, Rob Clark wrote:
>> On Mon, Jan 21, 2013 at 5:07 AM, Steffen Trumtrar
>> <s.trumtrar@pengutronix.de> wrote:
>> > Hi!
>> >
>> > There was still no maintainer, that commented, ack'd, nack'd, apply'd the
>> > series. So, this is just a resend.
>> > The patches were tested with:
>> >
>> > - v15 on Tegra by Thierry
>> > - sh-mobile-lcdcfb by Laurent
>> > - MX53QSB by Marek
>> > - Exynos: smdk5250 by Leela
>> > - AM335X EVM & AM335X EVM-SK by Afzal
>> > - imx6q: sabrelite, sabresd by Philipp and me
>> > - imx53: tqma53/mba53 by me
>>
>>
>> btw, you can add my tested-by for this series.. I've been using them
>> for the tilcdc lcd-panel output driver support.
>>
>
> Thanks. The more drivers the merrier ;-)
>
> Steffen
>
>> >
>> >
>> > Changes since v15:
>> > - move include/linux/{videomode,display_timing}.h to include/video
>> > - move include/linux/of_{videomode,display_timing}.h to include/video
>> > - reimplement flags: add VESA flags and data flags
>> > - let pixelclock in struct videomode be unsigned long
>> > - rename of_display_timings_exists to of_display_timings_exist
>> > - revise logging/error messages: replace __func__ with np->full_name
>> > - rename pixelclk-inverted to pixelclk-active
>> > - revise comments in code
>> >
>> > Changes since v14:
>> > - fix "const struct *" warning
>> > (reported by: Leela Krishna Amudala <l.krishna@samsung.com>)
>> > - return -EINVAL when htotal or vtotal are zero
>> > - remove unreachable code in of_get_display_timings
>> > - include headers in .c files and not implicit in .h
>> > - sort includes alphabetically
>> > - fix lower/uppercase in binding documentation
>> > - rebase onto v3.7-rc7
>> >
>> > Changes since v13:
>> > - fix "const struct *" warning
>> > (reported by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>)
>> > - prevent division by zero in fb_videomode_from_videomode
>> >
>> > Changes since v12:
>> > - rename struct display_timing to via_display_timing in via subsystem
>> > - fix refreshrate calculation
>> > - fix "const struct *" warnings
>> > (reported by: Manjunathappa, Prakash <prakash.pm@ti.com>)
>> > - some CodingStyle fixes
>> > - rewrite parts of commit messages and display-timings.txt
>> > - let display_timing_get_value get all values instead of just typical
>> >
>> > Changes since v11:
>> > - make pointers const where applicable
>> > - add reviewed-by Laurent Pinchart
>> >
>> > Changes since v10:
>> > - fix function name (drm_)display_mode_from_videomode
>> > - add acked-by, reviewed-by, tested-by
>> >
>> > Changes since v9:
>> > - don't leak memory when previous timings were correct
>> > - CodingStyle fixes
>> > - move blank lines around
>> >
>> > Changes since v8:
>> > - fix memory leaks
>> > - change API to be more consistent (foo_from_bar(struct bar, struct foo))
>> > - include headers were necessary
>> > - misc minor bugfixes
>> >
>> > Changes since v7:
>> > - move of_xxx to drivers/video
>> > - remove non-binding documentation from display-timings.txt
>> > - squash display_timings and videomode in one patch
>> > - misc minor fixes
>> >
>> > Changes since v6:
>> > - get rid of some empty lines etc.
>> > - move functions to their subsystems
>> > - split of_ from non-of_ functions
>> > - add at least some kerneldoc to some functions
>> >
>> > Changes since v5:
>> > - removed all display stuff and just describe timings
>> >
>> > Changes since v4:
>> > - refactored functions
>> >
>> > Changes since v3:
>> > - print error messages
>> > - free alloced memory
>> > - general cleanup
>> >
>> > Changes since v2:
>> > - use hardware-near property-names
>> > - provide a videomode structure
>> > - allow ranges for all properties (<min,typ,max>)
>> > - functions to get display_mode or fb_videomode
>> >
>> >
>> > Regards,
>> > Steffen
>> >
>> >
>> > Steffen Trumtrar (7):
>> > viafb: rename display_timing to via_display_timing
>> > video: add display_timing and videomode
>> > video: add of helper for display timings/videomode
>> > fbmon: add videomode helpers
>> > fbmon: add of_videomode helpers
>> > drm_modes: add videomode helpers
>> > drm_modes: add of_videomode helpers
>> >
>> > .../devicetree/bindings/video/display-timing.txt | 109 +++++++++
>> > drivers/gpu/drm/drm_modes.c | 70 ++++++
>> > drivers/video/Kconfig | 21 ++
>> > drivers/video/Makefile | 4 +
>> > drivers/video/display_timing.c | 24 ++
>> > drivers/video/fbmon.c | 94 ++++++++
>> > drivers/video/of_display_timing.c | 239 ++++++++++++++++++++
>> > drivers/video/of_videomode.c | 54 +++++
>> > drivers/video/via/hw.c | 6 +-
>> > drivers/video/via/hw.h | 2 +-
>> > drivers/video/via/lcd.c | 2 +-
>> > drivers/video/via/share.h | 2 +-
>> > drivers/video/via/via_modesetting.c | 8 +-
>> > drivers/video/via/via_modesetting.h | 6 +-
>> > drivers/video/videomode.c | 39 ++++
>> > include/drm/drmP.h | 9 +
>> > include/linux/fb.h | 8 +
>> > include/video/display_timing.h | 124 ++++++++++
>> > include/video/of_display_timing.h | 20 ++
>> > include/video/of_videomode.h | 18 ++
>> > include/video/videomode.h | 48 ++++
>> > 21 files changed, 894 insertions(+), 13 deletions(-)
>> > create mode 100644 Documentation/devicetree/bindings/video/display-timing.txt
>> > create mode 100644 drivers/video/display_timing.c
>> > create mode 100644 drivers/video/of_display_timing.c
>> > create mode 100644 drivers/video/of_videomode.c
>> > create mode 100644 drivers/video/videomode.c
>> > create mode 100644 include/video/display_timing.h
>> > create mode 100644 include/video/of_display_timing.h
>> > create mode 100644 include/video/of_videomode.h
>> > create mode 100644 include/video/videomode.h
>> >
>> > --
>> > 1.7.10.4
>> >
>>
>
> --
> Pengutronix e.K. | |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply
* Re: [PATCH v16 RESEND 0/7] of: add display helper
From: Dave Airlie @ 2013-01-24 0:15 UTC (permalink / raw)
To: Steffen Trumtrar
Cc: Rob Clark, devicetree-discuss, David Airlie, Rob Herring,
linux-fbdev, dri-devel, Laurent Pinchart, Thierry Reding,
Guennady Liakhovetski, linux-media, Tomi Valkeinen,
Stephen Warren, Florian Tobias Schandinat, Leela Krishna Amudala,
Mohammed, Afzal, kernel
In-Reply-To: <20130123091202.GA11828@pengutronix.de>
>> > Hi!
>> >
>> > There was still no maintainer, that commented, ack'd, nack'd, apply'd the
>> > series. So, this is just a resend.
>> > The patches were tested with:
>> >
>> > - v15 on Tegra by Thierry
>> > - sh-mobile-lcdcfb by Laurent
>> > - MX53QSB by Marek
>> > - Exynos: smdk5250 by Leela
>> > - AM335X EVM & AM335X EVM-SK by Afzal
>> > - imx6q: sabrelite, sabresd by Philipp and me
>> > - imx53: tqma53/mba53 by me
>>
>>
>> btw, you can add my tested-by for this series.. I've been using them
>> for the tilcdc lcd-panel output driver support.
>>
>
> Thanks. The more drivers the merrier ;-)
>
I'll probably merge these via my tree for lack of anyone else doing
it. I just don't want to end up as the fbdev maintainer by default,
maybe if we move the console stuff out of drivers/video to somewhere
else I'd be willing to look after it, but the thought of maintaining
fbdev drivers would drive me to a liver transplant.
Dave.
^ permalink raw reply
* Re: [PATCH v4 12/12] video: da8xx-fb: CCF clock divider handling
From: Mike Turquette @ 2013-01-23 20:22 UTC (permalink / raw)
To: Afzal Mohammed, linux-fbdev, linux-omap, devicetree-discuss,
linux-doc, linux-kernel
Cc: Florian Tobias Schandinat, Tomi Valkeinen, Grant Likely,
Rob Herring, Rob Landley
In-Reply-To: <fa8dab522507e087d5a94bac13dda71544911707.1358937685.git.afzal@ti.com>
Quoting Afzal Mohammed (2013-01-23 03:48:56)
<snip>
> +static inline void da8xx_fb_clkc_enable(void)
> +{
> if (lcd_revision = LCD_VERSION_2)
> lcdc_write(LCD_V2_DMA_CLK_EN | LCD_V2_LIDD_CLK_EN |
> LCD_V2_CORE_CLK_EN, LCD_CLK_ENABLE_REG);
> }
>
> -static inline void da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
> +#ifdef CONFIG_COMMON_CLK
> +static inline int da8xx_fb_calc_config_clk_divider(struct da8xx_fb_par *par,
> + struct fb_videomode *mode)
> +{
> + int ret;
> +
> + ret = clk_set_rate(par->child_clk, PICOS2KHZ(mode->pixclock) * 1000);
> + if (IS_ERR_VALUE(ret)) {
> + dev_err(par->dev, "unable to setup pixel clock of %u ps",
> + mode->pixclock);
> + return ret;
> + }
> + da8xx_fb_clkc_enable();
It looks like you are using the legacy method to enable/disable the
clock and using the CCF basic divider to set the rate. This feels a bit
hacky to me. If you want to model your clock in CCF then you should
probably model the whole clock, not just the rate-change aspects of it.
Have you looked at the composite clock patches from Prashant? Those
might give you the divider+gate properties that you are looking for:
http://article.gmane.org/gmane.linux.kernel/1416697
Regards,
Mike
^ permalink raw reply
* Re: [PATCH 1/2] fb: Rework locking to fix lock ordering on takeover
From: Daniel Vetter @ 2013-01-23 16:49 UTC (permalink / raw)
To: Takashi Iwai
Cc: linux-fbdev-devel, Intel Graphics Development, LKML,
DRI Development, Andrew Morton, Alan Cox, Alan Cox
In-Reply-To: <s5hk3r3etwt.wl%tiwai@suse.de>
On Wed, Jan 23, 2013 at 5:38 PM, Takashi Iwai <tiwai@suse.de> wrote:
> At Wed, 23 Jan 2013 17:25:08 +0100,
> Daniel Vetter wrote:
>>
>> From: Alan Cox <alan@lxorguk.ukuu.org.uk>
>>
>> Adjust the console layer to allow a take over call where the caller already
>> holds the locks. Make the fb layer lock in order.
>>
>> This s partly a band aid, the fb layer is terminally confused about the
>> locking rules it uses for its notifiers it seems.
>>
>> Signed-off-by: Alan Cox <alan@linux.intel.com>
>> [danvet: Tiny whitespace cleanup.]
>> Reported-and-tested-by: Hugh Dickins <hughd@google.com>
>> Reported-and-tested-by: Sasha Levin <levinsasha928@gmail.com>
>> References: https://lkml.org/lkml/2012/10/25/516
>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> FYI, the latest patch of this is found in mm tree:
> http://ozlabs.org/~akpm/mmots/broken-out/fb-rework-locking-to-fix-lock-ordering-on-takeover.patch
>
> Also I hit the same problem in another code paths (for unbind and
> unregister):
> http://marc.info/?t=135309396400003&r=1&w=2
>
> My additional patch is found in mm tree, too:
> http://ozlabs.org/~akpm/mmots/broken-out/fb-yet-another-band-aid-for-fixing-lockdep-mess.patch
Indeed, there's more stuff :( And I've missed the export_symbol fix
for the first patch. Still, is there any chance we can at least merge
the first one (I don't think that many people unload framebuffers)
into 3.8 with cc: stable? I'd like to get at least rid of the known
deadlocks at kms takeover time, since we have quite a few unexplained
such bug reports floating around ... Andrew, Dave?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply
* Re: [PATCH 1/2] fb: Rework locking to fix lock ordering on takeover
From: Takashi Iwai @ 2013-01-23 16:38 UTC (permalink / raw)
To: Daniel Vetter
Cc: Dave Airlie, Intel Graphics Development, DRI Development, LKML,
linux-fbdev-devel, Alan Cox, Alan Cox
In-Reply-To: <1358958309-5342-2-git-send-email-daniel.vetter@ffwll.ch>
At Wed, 23 Jan 2013 17:25:08 +0100,
Daniel Vetter wrote:
>
> From: Alan Cox <alan@lxorguk.ukuu.org.uk>
>
> Adjust the console layer to allow a take over call where the caller already
> holds the locks. Make the fb layer lock in order.
>
> This s partly a band aid, the fb layer is terminally confused about the
> locking rules it uses for its notifiers it seems.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> [danvet: Tiny whitespace cleanup.]
> Reported-and-tested-by: Hugh Dickins <hughd@google.com>
> Reported-and-tested-by: Sasha Levin <levinsasha928@gmail.com>
> References: https://lkml.org/lkml/2012/10/25/516
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
FYI, the latest patch of this is found in mm tree:
http://ozlabs.org/~akpm/mmots/broken-out/fb-rework-locking-to-fix-lock-ordering-on-takeover.patch
Also I hit the same problem in another code paths (for unbind and
unregister):
http://marc.info/?t=135309396400003&r=1&w=2
My additional patch is found in mm tree, too:
http://ozlabs.org/~akpm/mmots/broken-out/fb-yet-another-band-aid-for-fixing-lockdep-mess.patch
Takashi
^ permalink raw reply
* [PATCH 2/2] drm/i915: fixup per-crtc locking in intel_release_load_detect_pipe
From: Daniel Vetter @ 2013-01-23 16:25 UTC (permalink / raw)
To: Dave Airlie
Cc: Intel Graphics Development, DRI Development, LKML,
linux-fbdev-devel, Daniel Vetter
In-Reply-To: <1358958309-5342-1-git-send-email-daniel.vetter@ffwll.ch>
One of the early return cases missed the mutex unlocking. Hilarity
ensued.
This regression has been introduced in
commit 7b24056be6db7ce907baffdd4cf142ab774ea60c
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed Dec 12 00:35:33 2012 +0100
drm: don't hold crtc mutexes for connector ->detect callbacks
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59750
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 26df9e3..ece4afd 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6522,6 +6522,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
drm_framebuffer_unreference(old->release_fb);
}
+ mutex_unlock(&crtc->mutex);
return;
}
--
1.7.10.4
^ permalink raw reply related
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