Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 00/15] PHY framework
From: Kishon Vijay Abraham I @ 2013-07-18  6:58 UTC (permalink / raw)
  To: linux-arm-kernel

Added a generic PHY framework that provides a set of APIs for the PHY drivers
to create/destroy a PHY and APIs for the PHY users to obtain a reference to
the PHY with or without using phandle.

This framework will be of use only to devices that uses external PHY (PHY
functionality is not embedded within the controller).

The intention of creating this framework is to bring the phy drivers spread
all over the Linux kernel to drivers/phy to increase code re-use and to
increase code maintainability.

Comments to make PHY as bus wasn't done because PHY devices can be part of
other bus and making a same device attached to multiple bus leads to bad
design.

If the PHY driver has to send notification on connect/disconnect, the PHY
driver should make use of the extcon framework. Using this susbsystem
to use extcon framwork will have to be analysed.

Exynos MIPI CSIS/DSIM PHY and Displayport PHY have started using this
framework. Have included those patches also in this series.

twl4030-usb and omap-usb2 have also been adapted to this framework.

These patches are also available @
git://gitorious.org/linuxphy/linuxphy.git tags/phy-for-v3.12

Jingoo Han (3):
  phy: Add driver for Exynos DP PHY
  video: exynos_dp: remove non-DT support for Exynos Display Port
  video: exynos_dp: Use the generic PHY driver

Kishon Vijay Abraham I (8):
  drivers: phy: add generic PHY framework
  usb: phy: omap-usb2: use the new generic PHY framework
  usb: phy: twl4030: use the new generic PHY framework
  ARM: OMAP: USB: Add phy binding information
  ARM: dts: omap: update usb_otg_hs data
  usb: musb: omap2430: use the new generic PHY framework
  usb: phy: omap-usb2: remove *set_suspend* callback from omap-usb2
  usb: phy: twl4030-usb: remove *set_suspend* and *phy_init* ops

Sylwester Nawrocki (4):
  phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs
  video: exynos_mipi_dsim: Use the generic PHY driver
  exynos4-is: Use the generic MIPI CSIS PHY driver
  ARM: Samsung: Remove the MIPI PHY setup code

 .../devicetree/bindings/phy/phy-bindings.txt       |   66 +++
 .../devicetree/bindings/phy/samsung-phy.txt        |   22 +
 Documentation/devicetree/bindings/usb/omap-usb.txt |    5 +
 Documentation/devicetree/bindings/usb/usb-phy.txt  |    6 +
 .../devicetree/bindings/video/exynos_dp.txt        |   18 +-
 Documentation/phy.txt                              |  129 +++++
 MAINTAINERS                                        |    7 +
 arch/arm/boot/dts/omap3-beagle-xm.dts              |    2 +
 arch/arm/boot/dts/omap3-evm.dts                    |    2 +
 arch/arm/boot/dts/omap3-overo.dtsi                 |    2 +
 arch/arm/boot/dts/omap4.dtsi                       |    3 +
 arch/arm/boot/dts/twl4030.dtsi                     |    1 +
 arch/arm/mach-exynos/include/mach/regs-pmu.h       |    5 -
 arch/arm/mach-omap2/usb-musb.c                     |    3 +
 arch/arm/mach-s5pv210/include/mach/regs-clock.h    |    4 -
 arch/arm/plat-samsung/Kconfig                      |    5 -
 arch/arm/plat-samsung/Makefile                     |    1 -
 arch/arm/plat-samsung/setup-mipiphy.c              |   60 ---
 drivers/Kconfig                                    |    2 +
 drivers/Makefile                                   |    2 +
 drivers/media/platform/exynos4-is/mipi-csis.c      |   16 +-
 drivers/phy/Kconfig                                |   28 +
 drivers/phy/Makefile                               |    7 +
 drivers/phy/phy-core.c                             |  544 ++++++++++++++++++++
 drivers/phy/phy-exynos-dp-video.c                  |  111 ++++
 drivers/phy/phy-exynos-mipi-video.c                |  169 ++++++
 drivers/usb/musb/Kconfig                           |    1 +
 drivers/usb/musb/musb_core.c                       |    1 +
 drivers/usb/musb/musb_core.h                       |    3 +
 drivers/usb/musb/omap2430.c                        |   26 +-
 drivers/usb/phy/Kconfig                            |    1 +
 drivers/usb/phy/phy-omap-usb2.c                    |   60 ++-
 drivers/usb/phy/phy-twl4030-usb.c                  |   63 ++-
 drivers/video/exynos/Kconfig                       |    2 +-
 drivers/video/exynos/exynos_dp_core.c              |  132 ++---
 drivers/video/exynos/exynos_dp_core.h              |  110 ++++
 drivers/video/exynos/exynos_dp_reg.c               |    2 -
 drivers/video/exynos/exynos_mipi_dsi.c             |   19 +-
 include/linux/phy/phy.h                            |  344 +++++++++++++
 include/linux/platform_data/mipi-csis.h            |   11 +-
 include/linux/usb/musb.h                           |    3 +
 include/video/exynos_dp.h                          |  131 -----
 include/video/exynos_mipi_dsim.h                   |    6 +-
 43 files changed, 1746 insertions(+), 389 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-bindings.txt
 create mode 100644 Documentation/devicetree/bindings/phy/samsung-phy.txt
 create mode 100644 Documentation/phy.txt
 delete mode 100644 arch/arm/plat-samsung/setup-mipiphy.c
 create mode 100644 drivers/phy/Kconfig
 create mode 100644 drivers/phy/Makefile
 create mode 100644 drivers/phy/phy-core.c
 create mode 100644 drivers/phy/phy-exynos-dp-video.c
 create mode 100644 drivers/phy/phy-exynos-mipi-video.c
 create mode 100644 include/linux/phy/phy.h
 delete mode 100644 include/video/exynos_dp.h

-- 
1.7.10.4


^ permalink raw reply

* Re: [PATCH RESEND] video: mxsfb: Let device core handle pinctrl
From: Andrew Morton @ 2013-07-17 22:24 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <1373923884-13332-1-git-send-email-festevam@gmail.com>

On Mon, 15 Jul 2013 18:31:24 -0300 Fabio Estevam <festevam@gmail.com> wrote:

> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
> we can rely on device core for handling pinctrl, so remove 
> devm_pinctrl_get_select_default() from the driver.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> Andrew,
> 
> Should this go via your tree?

Well, no, it should really be reviewed by and merged by
Jean-Christophe.  Is there a problem in fbdev land?

^ permalink raw reply

* Re: [PATCH 0/3] Few ignored framebuffer fixes/additions
From: Andrew Morton @ 2013-07-17 21:37 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-1-git-send-email-maxime.ripard@free-electrons.com>

On Mon, 15 Jul 2013 17:26:59 +0200 Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> Sorry to bother you again with the framebuffer stuff but the new
> maintainer doesn't appear to be responsive either.

Jean-Christophe is doing things - on 11 July he sent out a call for
late patches to linux-fbdev@vger.kernel.org.

So hopefully the resend of this patch series will be handled
appropriately?


^ permalink raw reply

* Re: [PATCH 3/3] fb: backlight: HX8357: Add HX8369 support
From: 'Maxime Ripard' @ 2013-07-16 15:46 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <003601ce81c8$c2573320$47059960$@samsung.com>

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

Hi Jingoo,

On Tue, Jul 16, 2013 at 11:04:09AM +0900, Jingoo Han wrote:
> On Tuesday, July 16, 2013 12:27 AM, Maxime Ripard wrote:
> > 
> > From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > 
> > Add support for the Himax HX8369 controller as it is quite similar to the
> > hx8357.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Hi Maxime Ripard,
> 
> I reviewed this patch with Himax HX8369 datasheet.
> I cannot find any problems. It looks good.
> 
> However, if possible, please add comment on huge delays such as
> msleep(120), msleep(100), etc.

Right. I'll send a follow-up patch if this is merged right away, or
merge the comments in the next iteration of the patches.

> Acked-by: Jingoo Han <jg1.han@samsung.com>

Thanks for taking the time to review this!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [PATCH v3 3/7] at91/avr32/atmel_lcdfb: prepare clk before calling enable
From: Boris BREZILLON @ 2013-07-16 15:08 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373986995-23899-1-git-send-email-b.brezillon@overkiz.com>

Replace clk_enable/disable with clk_prepare_enable/disable_unprepare to
avoid common clk framework warnings.

Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/video/atmel_lcdfb.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index ece49d5..bf9c5d0 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -954,14 +954,14 @@ static int __init atmel_lcdfb_init_fbinfo(struct atmel_lcdfb_info *sinfo)
 
 static void atmel_lcdfb_start_clock(struct atmel_lcdfb_info *sinfo)
 {
-	clk_enable(sinfo->bus_clk);
-	clk_enable(sinfo->lcdc_clk);
+	clk_prepare_enable(sinfo->bus_clk);
+	clk_prepare_enable(sinfo->lcdc_clk);
 }
 
 static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
 {
-	clk_disable(sinfo->bus_clk);
-	clk_disable(sinfo->lcdc_clk);
+	clk_disable_unprepare(sinfo->bus_clk);
+	clk_disable_unprepare(sinfo->lcdc_clk);
 }
 
 #ifdef CONFIG_OF
-- 
1.7.9.5


^ permalink raw reply related

* Re: [PATCH] logo: Remove trailing whitespace from logo_linux_clut224.ppm
From: Geert Uytterhoeven @ 2013-07-16  7:43 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	linux-fbdev@vger.kernel.org, Linux Kernel Mailing List,
	Rob Landley
In-Reply-To: <CA+55aFxGymOvvaYfOg22AdHpxEOuOctfC8vRW+_u=vtua8Dksg@mail.gmail.com>

Hi Linus,

On Tue, Jul 16, 2013 at 3:02 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Mon, Jul 15, 2013 at 1:29 AM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
>> Commit ad81f0545ef01ea651886dddac4bef6cec930092 ("Linux 3.11-rc1")
>> replaced the Standard 224-color Linux logo, and introduced lots of
>> trailing whitespace. Remove it again.
>
> The logo is temporary, and I'd rather keep it the way it is so that a
> simple revert will fix things up again..

OK, that's a good reason. But unlike last time with Tuz, you can't revert
the whole commit, as that also reverts the version ;-)

> That said, even if it wasn't temporary, I think we might be better off
> with the raw format that the netpbm tools generate these days. It was
> actually slightly annoying to get that big diff from a small edit, and
> it was the result of either the original logo ASCII representation
> having been cleaned up excessively before, or possibly just the netpbm
> tools having changed their output radically.

It seems there are different versions. My (Ubuntu 12.04 LTS) version of
pnmnoraw doesn't add trailing whitespace, but groups the values per
pixel. The old version used to generate the pre-v3.11-rc1 logo didn't
group the values, but used he same width for all fields.

> Of course, it would be even better if we actually used some saner
> format. I'm not exactly artistic, so making that whole silly logo
> change took more time than it really should have. But what was
> *really* painful was to fight the horrible ppm format conversion
> issues, and how we only accept that legacy ascii version etc.

When the logo conversion code was written (before we just had C header
files with arrays, which were a hell to update), my requirements were:
  1. The format must be easy to generate with commonly used tools,
  2. The format must be ASCII, to allow emailing of patches,
  3. The format must be easily parsable, without relying on external tools and
     libraries.

Thanks to "GIT binary patch", 2 is no longer required.
If we switch to e.g. PNG, we may have to rely on one more external library,
upsetting Rob.

Gr{oetje,eeting}s,

                        Geert

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

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

^ permalink raw reply

* Re: [PATCH 2/3] video: hx8357: Make IM pins optional
From: Mike Galbraith @ 2013-07-16  3:29 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <003501ce81be$4a945ed0$dfbd1c70$@samsung.com>

On Tue, 2013-07-16 at 09:49 +0900, Jingoo Han wrote: 
> On Tuesday, July 16, 2013 12:27 AM, Maxime Ripard wrote:

> > +
> > +			ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
> > +						    GPIOF_OUT_INIT_LOW, "im_pins");
> 
> This makes a checkpatch warning such as 'WARNING: line over 80 characters'.
> How about the following?
> 
> 			ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
> 						GPIOF_OUT_INIT_LOW, "im_pins");

IIRC, some maintainers gripe (davem?) when they see such alignment,
preferring the original arg below arg alignment vs strict 80 column.

-Mike


^ permalink raw reply

* Re: [PATCH] logo: Remove trailing whitespace from logo_linux_clut224.ppm
From: H. Peter Anvin @ 2013-07-16  2:39 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Geert Uytterhoeven, Jean-Christophe Plagniol-Villard,
	Tomi Valkeinen, linux-fbdev@vger.kernel.org,
	Linux Kernel Mailing List
In-Reply-To: <CA+55aFxGymOvvaYfOg22AdHpxEOuOctfC8vRW+_u=vtua8Dksg@mail.gmail.com>

On 07/15/2013 06:02 PM, Linus Torvalds wrote:
> 
> That said, even if it wasn't temporary, I think we might be better off
> with the raw format that the netpbm tools generate these days.
>

For "these days" meaning "since the 1980s".  I would suggest bumping up
to the 1990s and go with PNG.

	-hpa



^ permalink raw reply

* Re: [PATCH 3/3] fb: backlight: HX8357: Add HX8369 support
From: Jingoo Han @ 2013-07-16  2:04 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-4-git-send-email-maxime.ripard@free-electrons.com>

On Tuesday, July 16, 2013 12:27 AM, Maxime Ripard wrote:
> 
> From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> Add support for the Himax HX8369 controller as it is quite similar to the
> hx8357.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Hi Maxime Ripard,

I reviewed this patch with Himax HX8369 datasheet.
I cannot find any problems. It looks good.

However, if possible, please add comment on huge delays such as
msleep(120), msleep(100), etc.


Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/video/backlight/hx8357.c | 203 ++++++++++++++++++++++++++++++++++++---
>  1 file changed, 188 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
> index ed94796..b035fab 100644
> --- a/drivers/video/backlight/hx8357.c
> +++ b/drivers/video/backlight/hx8357.c
> @@ -71,6 +71,18 @@
>  #define HX8357_SET_POWER_NORMAL		0xd2
>  #define HX8357_SET_PANEL_RELATED	0xe9
> 
> +#define HX8369_SET_DISPLAY_BRIGHTNESS		0x51
> +#define HX8369_WRITE_CABC_DISPLAY_VALUE		0x53
> +#define HX8369_WRITE_CABC_BRIGHT_CTRL		0x55
> +#define HX8369_WRITE_CABC_MIN_BRIGHTNESS	0x5e
> +#define HX8369_SET_POWER			0xb1
> +#define HX8369_SET_DISPLAY_MODE			0xb2
> +#define HX8369_SET_DISPLAY_WAVEFORM_CYC		0xb4
> +#define HX8369_SET_VCOM				0xb6
> +#define HX8369_SET_EXTENSION_COMMAND		0xb9
> +#define HX8369_SET_GIP				0xd5
> +#define HX8369_SET_GAMMA_CURVE_RELATED		0xe0
> +
>  struct hx8357_data {
>  	unsigned		im_pins[HX8357_NUM_IM_PINS];
>  	unsigned		reset;
> @@ -144,6 +156,61 @@ static u8 hx8357_seq_display_mode[] = {
>  	HX8357_SET_DISPLAY_MODE_RGB_INTERFACE,
>  };
> 
> +static u8 hx8369_seq_write_CABC_min_brightness[] = {
> +	HX8369_WRITE_CABC_MIN_BRIGHTNESS, 0x00,
> +};
> +
> +static u8 hx8369_seq_write_CABC_control[] = {
> +	HX8369_WRITE_CABC_DISPLAY_VALUE, 0x24,
> +};
> +
> +static u8 hx8369_seq_set_display_brightness[] = {
> +	HX8369_SET_DISPLAY_BRIGHTNESS, 0xFF,
> +};
> +
> +static u8 hx8369_seq_write_CABC_control_setting[] = {
> +	HX8369_WRITE_CABC_BRIGHT_CTRL, 0x02,
> +};
> +
> +static u8 hx8369_seq_extension_command[] = {
> +	HX8369_SET_EXTENSION_COMMAND, 0xff, 0x83, 0x69,
> +};
> +
> +static u8 hx8369_seq_display_related[] = {
> +	HX8369_SET_DISPLAY_MODE, 0x00, 0x2b, 0x03, 0x03, 0x70, 0x00,
> +	0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00,	0x01,
> +};
> +
> +static u8 hx8369_seq_panel_waveform_cycle[] = {
> +	HX8369_SET_DISPLAY_WAVEFORM_CYC, 0x0a, 0x1d, 0x80, 0x06, 0x02,
> +};
> +
> +static u8 hx8369_seq_set_address_mode[] = {
> +	HX8357_SET_ADDRESS_MODE, 0x00,
> +};
> +
> +static u8 hx8369_seq_vcom[] = {
> +	HX8369_SET_VCOM, 0x3e, 0x3e,
> +};
> +
> +static u8 hx8369_seq_gip[] = {
> +	HX8369_SET_GIP, 0x00, 0x01, 0x03, 0x25, 0x01, 0x02, 0x28, 0x70,
> +	0x11, 0x13, 0x00, 0x00, 0x40, 0x26, 0x51, 0x37, 0x00, 0x00, 0x71,
> +	0x35, 0x60, 0x24, 0x07, 0x0f, 0x04, 0x04,
> +};
> +
> +static u8 hx8369_seq_power[] = {
> +	HX8369_SET_POWER, 0x01, 0x00, 0x34, 0x03, 0x00, 0x11, 0x11, 0x32,
> +	0x2f, 0x3f, 0x3f, 0x01, 0x3a, 0x01, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
> +};
> +
> +static u8 hx8369_seq_gamma_curve_related[] = {
> +	HX8369_SET_GAMMA_CURVE_RELATED, 0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d,
> +	0x2e, 0x4a, 0x08, 0x0e, 0x0f, 0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
> +	0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d, 0x2e, 0x4a, 0x08, 0x0e, 0x0f,
> +	0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
> +};
> +
>  static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
>  				u8 *txbuf, u16 txlen,
>  				u8 *rxbuf, u16 rxlen)
> @@ -242,6 +309,18 @@ static int hx8357_exit_standby(struct lcd_device *lcdev)
>  	return 0;
>  }
> 
> +static void hx8357_lcd_reset(struct lcd_device *lcdev)
> +{
> +	struct hx8357_data *lcd = lcd_get_data(lcdev);
> +
> +	gpio_set_value(lcd->reset, 1);
> +	usleep_range(10000, 12000);
> +	gpio_set_value(lcd->reset, 0);
> +	usleep_range(10000, 12000);
> +	gpio_set_value(lcd->reset, 1);
> +	msleep(120);
> +}
> +
>  static int hx8357_lcd_init(struct lcd_device *lcdev)
>  {
>  	struct hx8357_data *lcd = lcd_get_data(lcdev);
> @@ -257,14 +336,6 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
>  		gpio_set_value_cansleep(lcd->im_pins[2], 1);
>  	}
> 
> -	/* Reset the screen */
> -	gpio_set_value(lcd->reset, 1);
> -	usleep_range(10000, 12000);
> -	gpio_set_value(lcd->reset, 0);
> -	usleep_range(10000, 12000);
> -	gpio_set_value(lcd->reset, 1);
> -	msleep(120);
> -
>  	ret = hx8357_spi_write_array(lcdev, hx8357_seq_power,
>  				ARRAY_SIZE(hx8357_seq_power));
>  	if (ret < 0)
> @@ -359,6 +430,94 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
>  	return 0;
>  }
> 
> +static int hx8369_lcd_init(struct lcd_device *lcdev)
> +{
> +	int ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command,
> +				ARRAY_SIZE(hx8369_seq_extension_command));
> +	if (ret < 0)
> +		return ret;
> +	usleep_range(10000, 12000);
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related,
> +				ARRAY_SIZE(hx8369_seq_display_related));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle,
> +				ARRAY_SIZE(hx8369_seq_panel_waveform_cycle));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode,
> +				ARRAY_SIZE(hx8369_seq_set_address_mode));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom,
> +				ARRAY_SIZE(hx8369_seq_vcom));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip,
> +				ARRAY_SIZE(hx8369_seq_gip));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_power,
> +				ARRAY_SIZE(hx8369_seq_power));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
> +	if (ret < 0)
> +		return ret;
> +
> +	msleep(120);
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related,
> +				ARRAY_SIZE(hx8369_seq_gamma_curve_related));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
> +	if (ret < 0)
> +		return ret;
> +	usleep_range(1000, 1200);
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control,
> +				ARRAY_SIZE(hx8369_seq_write_CABC_control));
> +	if (ret < 0)
> +		return ret;
> +	usleep_range(10000, 12000);
> +
> +	ret = hx8357_spi_write_array(lcdev,
> +			hx8369_seq_write_CABC_control_setting,
> +			ARRAY_SIZE(hx8369_seq_write_CABC_control_setting));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_array(lcdev,
> +			hx8369_seq_write_CABC_min_brightness,
> +			ARRAY_SIZE(hx8369_seq_write_CABC_min_brightness));
> +	if (ret < 0)
> +		return ret;
> +	usleep_range(10000, 12000);
> +
> +	ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness,
> +				ARRAY_SIZE(hx8369_seq_set_display_brightness));
> +	if (ret < 0)
> +		return ret;
> +
> +	ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
> +	if (ret < 0)
> +		return ret;
> +	msleep(100);
> +
> +	return 0;
> +}
> +
>  #define POWER_IS_ON(pwr)	((pwr) <= FB_BLANK_NORMAL)
> 
>  static int hx8357_set_power(struct lcd_device *lcdev, int power)
> @@ -391,10 +550,24 @@ static struct lcd_ops hx8357_ops = {
>  	.get_power	= hx8357_get_power,
>  };
> 
> +static const struct of_device_id hx8357_dt_ids[] = {
> +	{
> +		.compatible = "himax,hx8357",
> +		.data = hx8357_lcd_init,
> +	},
> +	{
> +		.compatible = "himax,hx8369",
> +		.data = hx8369_lcd_init,
> +	},
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
> +
>  static int hx8357_probe(struct spi_device *spi)
>  {
>  	struct lcd_device *lcdev;
>  	struct hx8357_data *lcd;
> +	const struct of_device_id *match;
>  	int i, ret;
> 
>  	lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL);
> @@ -411,6 +584,10 @@ static int hx8357_probe(struct spi_device *spi)
> 
>  	lcd->spi = spi;
> 
> +	match = of_match_device(hx8357_dt_ids, &spi->dev);
> +	if (!match || !match->data)
> +		return -EINVAL;
> +
>  	lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0);
>  	if (!gpio_is_valid(lcd->reset)) {
>  		dev_err(&spi->dev, "Missing dt property: gpios-reset\n");
> @@ -460,7 +637,9 @@ static int hx8357_probe(struct spi_device *spi)
>  	}
>  	spi_set_drvdata(spi, lcdev);
> 
> -	ret = hx8357_lcd_init(lcdev);
> +	hx8357_lcd_reset(lcdev);
> +
> +	ret = ((int (*)(struct lcd_device *))match->data)(lcdev);
>  	if (ret) {
>  		dev_err(&spi->dev, "Couldn't initialize panel\n");
>  		goto init_error;
> @@ -483,12 +662,6 @@ static int hx8357_remove(struct spi_device *spi)
>  	return 0;
>  }
> 
> -static const struct of_device_id hx8357_dt_ids[] = {
> -	{ .compatible = "himax,hx8357" },
> -	{},
> -};
> -MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
> -
>  static struct spi_driver hx8357_driver = {
>  	.probe  = hx8357_probe,
>  	.remove = hx8357_remove,
> --
> 1.8.3.2
> 
> --
> 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] video: nuc900fb: fix to pass correct device identity to request_irq()
From: Wan ZongShun @ 2013-07-16  1:25 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAPgLHd9CZ=VponJTbTGKTXVTdvMQM6_T+-RWuPMrk0WYZPbW1Q@mail.gmail.com>

2013/7/16 Wei Yongjun <weiyj.lk@gmail.com>:
> The IRQ handler nuc900fb_irqhandler() use dev_id as a type of
> struct nuc900fb_info *, so we should pass fbi as the device
> identity to request_irq().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Wan Zongshun <mcuos.com@gmail.com>

Thanks!
Vincent Wan.

> ---
> Was 'video: nuc900fb: fix to pass correct device identity to free_irq()'
> ---
>  drivers/video/nuc900fb.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
> index 8c527e5..796e511 100644
> --- a/drivers/video/nuc900fb.c
> +++ b/drivers/video/nuc900fb.c
> @@ -587,8 +587,7 @@ static int nuc900fb_probe(struct platform_device *pdev)
>         fbinfo->flags                   = FBINFO_FLAG_DEFAULT;
>         fbinfo->pseudo_palette          = &fbi->pseudo_pal;
>
> -       ret = request_irq(irq, nuc900fb_irqhandler, 0,
> -                         pdev->name, fbinfo);
> +       ret = request_irq(irq, nuc900fb_irqhandler, 0, pdev->name, fbi);
>         if (ret) {
>                 dev_err(&pdev->dev, "cannot register irq handler %d -err %d\n",
>                         irq, ret);
>
>



--
Wan ZongShun.
www.mcuos.com

^ permalink raw reply

* Re: [PATCH] logo: Remove trailing whitespace from logo_linux_clut224.ppm
From: Linus Torvalds @ 2013-07-16  1:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen,
	linux-fbdev@vger.kernel.org, Linux Kernel Mailing List
In-Reply-To: <1373876954-30437-1-git-send-email-geert@linux-m68k.org>

On Mon, Jul 15, 2013 at 1:29 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> Commit ad81f0545ef01ea651886dddac4bef6cec930092 ("Linux 3.11-rc1")
> replaced the Standard 224-color Linux logo, and introduced lots of
> trailing whitespace. Remove it again.

The logo is temporary, and I'd rather keep it the way it is so that a
simple revert will fix things up again..

That said, even if it wasn't temporary, I think we might be better off
with the raw format that the netpbm tools generate these days. It was
actually slightly annoying to get that big diff from a small edit, and
it was the result of either the original logo ASCII representation
having been cleaned up excessively before, or possibly just the netpbm
tools having changed their output radically.

Of course, it would be even better if we actually used some saner
format. I'm not exactly artistic, so making that whole silly logo
change took more time than it really should have. But what was
*really* painful was to fight the horrible ppm format conversion
issues, and how we only accept that legacy ascii version etc.

I guess it doesn't matter, since it's not like that thing normally
changes, so it's likely not really worth fixing. But it did make me go
"does it really have to be this arcane?"

              Linus

^ permalink raw reply

* Re: [PATCH 2/3] video: hx8357: Make IM pins optional
From: Jingoo Han @ 2013-07-16  0:49 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-3-git-send-email-maxime.ripard@free-electrons.com>

On Tuesday, July 16, 2013 12:27 AM, Maxime Ripard wrote:
> 
> The IM pins of the HX8357 controller are used to define the interface
> used to feed pixel stream to the LCD panel.
> 
> Most of the time, these pins are directly routed to either the ground or
> the VCC to set their values.
> 
> Remove the need to assign GPIOs to these pins when we are in such a case.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/video/backlight/hx8357.c | 52 +++++++++++++++++++++++-----------------
>  1 file changed, 30 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
> index a0482b5..ed94796 100644
> --- a/drivers/video/backlight/hx8357.c
> +++ b/drivers/video/backlight/hx8357.c
> @@ -76,6 +76,7 @@ struct hx8357_data {
>  	unsigned		reset;
>  	struct spi_device	*spi;
>  	int			state;
> +	bool			use_im_pins;
>  };
> 
>  static u8 hx8357_seq_power[] = {
> @@ -250,9 +251,11 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
>  	 * Set the interface selection pins to SPI mode, with three
>  	 * wires
>  	 */
> -	gpio_set_value_cansleep(lcd->im_pins[0], 1);
> -	gpio_set_value_cansleep(lcd->im_pins[1], 0);
> -	gpio_set_value_cansleep(lcd->im_pins[2], 1);
> +	if (lcd->use_im_pins) {
> +		gpio_set_value_cansleep(lcd->im_pins[0], 1);
> +		gpio_set_value_cansleep(lcd->im_pins[1], 0);
> +		gpio_set_value_cansleep(lcd->im_pins[2], 1);
> +	}
> 
>  	/* Reset the screen */
>  	gpio_set_value(lcd->reset, 1);
> @@ -424,26 +427,31 @@ static int hx8357_probe(struct spi_device *spi)
>  		return -EINVAL;
>  	}
> 
> -	for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
> -		lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node,
> -						"im-gpios", i);
> -		if (lcd->im_pins[i] = -EPROBE_DEFER) {
> -			dev_info(&spi->dev, "GPIO requested is not here yet, deferring the probe\n");
> -			return -EPROBE_DEFER;
> -		}
> -		if (!gpio_is_valid(lcd->im_pins[i])) {
> -			dev_err(&spi->dev, "Missing dt property: im-gpios\n");
> -			return -EINVAL;
> +	if (of_find_property(spi->dev.of_node, "im-gpios", NULL)) {
> +		lcd->use_im_pins = 1;
> +
> +		for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
> +			lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node,
> +							    "im-gpios", i);
> +			if (lcd->im_pins[i] = -EPROBE_DEFER) {
> +				dev_info(&spi->dev, "GPIO requested is not here yet, deferring the
> probe\n");
> +				return -EPROBE_DEFER;
> +			}
> +			if (!gpio_is_valid(lcd->im_pins[i])) {
> +				dev_err(&spi->dev, "Missing dt property: im-gpios\n");
> +				return -EINVAL;
> +			}
> +
> +			ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
> +						    GPIOF_OUT_INIT_LOW, "im_pins");

This makes a checkpatch warning such as 'WARNING: line over 80 characters'.
How about the following?

			ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
						GPIOF_OUT_INIT_LOW, "im_pins");

> +			if (ret) {
> +				dev_err(&spi->dev, "failed to request gpio %d: %d\n",
> +					lcd->im_pins[i], ret);
> +				return -EINVAL;
> +			}
>  		}
> -
> -		ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
> -					GPIOF_OUT_INIT_LOW, "im_pins");
> -		if (ret) {
> -			dev_err(&spi->dev, "failed to request gpio %d: %d\n",
> -				lcd->im_pins[i], ret);
> -			return -EINVAL;
> -		}
> -	}
> +	} else
> +		lcd->use_im_pins = 0;

According to the 'Documentation/CodingStyle', braces are necessary as below.

	} else {
		lcd->use_im_pins = 0;
	}


Others look good.
Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> 
>  	lcdev = lcd_device_register("mxsfb", &spi->dev, lcd, &hx8357_ops);
>  	if (IS_ERR(lcdev)) {
> --
> 1.8.3.2
> 
> --
> 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] video: nuc900fb: fix to pass correct device identity to request_irq()
From: Wei Yongjun @ 2013-07-16  0:07 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAPgLHd_mMOOeMecVJbTQjiK+xJD+-8jvgH6oAFqTHK_uSpWOJw@mail.gmail.com>

The IRQ handler nuc900fb_irqhandler() use dev_id as a type of
struct nuc900fb_info *, so we should pass fbi as the device
identity to request_irq().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
Was 'video: nuc900fb: fix to pass correct device identity to free_irq()'
---
 drivers/video/nuc900fb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
index 8c527e5..796e511 100644
--- a/drivers/video/nuc900fb.c
+++ b/drivers/video/nuc900fb.c
@@ -587,8 +587,7 @@ static int nuc900fb_probe(struct platform_device *pdev)
 	fbinfo->flags			= FBINFO_FLAG_DEFAULT;
 	fbinfo->pseudo_palette		= &fbi->pseudo_pal;
 
-	ret = request_irq(irq, nuc900fb_irqhandler, 0,
-			  pdev->name, fbinfo);
+	ret = request_irq(irq, nuc900fb_irqhandler, 0, pdev->name, fbi);
 	if (ret) {
 		dev_err(&pdev->dev, "cannot register irq handler %d -err %d\n",
 			irq, ret);



^ permalink raw reply related

* [PATCH RESEND] video: mxsfb: Let device core handle pinctrl
From: Fabio Estevam @ 2013-07-15 21:31 UTC (permalink / raw)
  To: linux-fbdev

From: Fabio Estevam <fabio.estevam@freescale.com>

Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove 
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
---
Andrew,

Should this go via your tree?

 drivers/video/mxsfb.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 21223d4..9d6a286 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -46,7 +46,6 @@
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/fb.h>
 #include <linux/regulator/consumer.h>
 #include <video/of_display_timing.h>
@@ -877,7 +876,6 @@ static int mxsfb_probe(struct platform_device *pdev)
 	struct mxsfb_info *host;
 	struct fb_info *fb_info;
 	struct fb_modelist *modelist;
-	struct pinctrl *pinctrl;
 	int ret;
 
 	if (of_id)
@@ -909,12 +907,6 @@ static int mxsfb_probe(struct platform_device *pdev)
 
 	host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
 
-	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-	if (IS_ERR(pinctrl)) {
-		ret = PTR_ERR(pinctrl);
-		goto fb_release;
-	}
-
 	host->clk = devm_clk_get(&host->pdev->dev, NULL);
 	if (IS_ERR(host->clk)) {
 		ret = PTR_ERR(host->clk);
-- 
1.8.1.2


^ permalink raw reply related

* [PATCH 3/3] fb: backlight: HX8357: Add HX8369 support
From: Maxime Ripard @ 2013-07-15 15:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-1-git-send-email-maxime.ripard@free-electrons.com>

From: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Add support for the Himax HX8369 controller as it is quite similar to the
hx8357.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/video/backlight/hx8357.c | 203 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 188 insertions(+), 15 deletions(-)

diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
index ed94796..b035fab 100644
--- a/drivers/video/backlight/hx8357.c
+++ b/drivers/video/backlight/hx8357.c
@@ -71,6 +71,18 @@
 #define HX8357_SET_POWER_NORMAL		0xd2
 #define HX8357_SET_PANEL_RELATED	0xe9
 
+#define HX8369_SET_DISPLAY_BRIGHTNESS		0x51
+#define HX8369_WRITE_CABC_DISPLAY_VALUE		0x53
+#define HX8369_WRITE_CABC_BRIGHT_CTRL		0x55
+#define HX8369_WRITE_CABC_MIN_BRIGHTNESS	0x5e
+#define HX8369_SET_POWER			0xb1
+#define HX8369_SET_DISPLAY_MODE			0xb2
+#define HX8369_SET_DISPLAY_WAVEFORM_CYC		0xb4
+#define HX8369_SET_VCOM				0xb6
+#define HX8369_SET_EXTENSION_COMMAND		0xb9
+#define HX8369_SET_GIP				0xd5
+#define HX8369_SET_GAMMA_CURVE_RELATED		0xe0
+
 struct hx8357_data {
 	unsigned		im_pins[HX8357_NUM_IM_PINS];
 	unsigned		reset;
@@ -144,6 +156,61 @@ static u8 hx8357_seq_display_mode[] = {
 	HX8357_SET_DISPLAY_MODE_RGB_INTERFACE,
 };
 
+static u8 hx8369_seq_write_CABC_min_brightness[] = {
+	HX8369_WRITE_CABC_MIN_BRIGHTNESS, 0x00,
+};
+
+static u8 hx8369_seq_write_CABC_control[] = {
+	HX8369_WRITE_CABC_DISPLAY_VALUE, 0x24,
+};
+
+static u8 hx8369_seq_set_display_brightness[] = {
+	HX8369_SET_DISPLAY_BRIGHTNESS, 0xFF,
+};
+
+static u8 hx8369_seq_write_CABC_control_setting[] = {
+	HX8369_WRITE_CABC_BRIGHT_CTRL, 0x02,
+};
+
+static u8 hx8369_seq_extension_command[] = {
+	HX8369_SET_EXTENSION_COMMAND, 0xff, 0x83, 0x69,
+};
+
+static u8 hx8369_seq_display_related[] = {
+	HX8369_SET_DISPLAY_MODE, 0x00, 0x2b, 0x03, 0x03, 0x70, 0x00,
+	0xff, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00,	0x01,
+};
+
+static u8 hx8369_seq_panel_waveform_cycle[] = {
+	HX8369_SET_DISPLAY_WAVEFORM_CYC, 0x0a, 0x1d, 0x80, 0x06, 0x02,
+};
+
+static u8 hx8369_seq_set_address_mode[] = {
+	HX8357_SET_ADDRESS_MODE, 0x00,
+};
+
+static u8 hx8369_seq_vcom[] = {
+	HX8369_SET_VCOM, 0x3e, 0x3e,
+};
+
+static u8 hx8369_seq_gip[] = {
+	HX8369_SET_GIP, 0x00, 0x01, 0x03, 0x25, 0x01, 0x02, 0x28, 0x70,
+	0x11, 0x13, 0x00, 0x00, 0x40, 0x26, 0x51, 0x37, 0x00, 0x00, 0x71,
+	0x35, 0x60, 0x24, 0x07, 0x0f, 0x04, 0x04,
+};
+
+static u8 hx8369_seq_power[] = {
+	HX8369_SET_POWER, 0x01, 0x00, 0x34, 0x03, 0x00, 0x11, 0x11, 0x32,
+	0x2f, 0x3f, 0x3f, 0x01, 0x3a, 0x01, 0xe6, 0xe6, 0xe6, 0xe6, 0xe6,
+};
+
+static u8 hx8369_seq_gamma_curve_related[] = {
+	HX8369_SET_GAMMA_CURVE_RELATED, 0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d,
+	0x2e, 0x4a, 0x08, 0x0e, 0x0f, 0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
+	0x00, 0x0d, 0x19, 0x2f, 0x3b, 0x3d, 0x2e, 0x4a, 0x08, 0x0e, 0x0f,
+	0x14, 0x16, 0x14, 0x14, 0x14, 0x1e,
+};
+
 static int hx8357_spi_write_then_read(struct lcd_device *lcdev,
 				u8 *txbuf, u16 txlen,
 				u8 *rxbuf, u16 rxlen)
@@ -242,6 +309,18 @@ static int hx8357_exit_standby(struct lcd_device *lcdev)
 	return 0;
 }
 
+static void hx8357_lcd_reset(struct lcd_device *lcdev)
+{
+	struct hx8357_data *lcd = lcd_get_data(lcdev);
+
+	gpio_set_value(lcd->reset, 1);
+	usleep_range(10000, 12000);
+	gpio_set_value(lcd->reset, 0);
+	usleep_range(10000, 12000);
+	gpio_set_value(lcd->reset, 1);
+	msleep(120);
+}
+
 static int hx8357_lcd_init(struct lcd_device *lcdev)
 {
 	struct hx8357_data *lcd = lcd_get_data(lcdev);
@@ -257,14 +336,6 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
 		gpio_set_value_cansleep(lcd->im_pins[2], 1);
 	}
 
-	/* Reset the screen */
-	gpio_set_value(lcd->reset, 1);
-	usleep_range(10000, 12000);
-	gpio_set_value(lcd->reset, 0);
-	usleep_range(10000, 12000);
-	gpio_set_value(lcd->reset, 1);
-	msleep(120);
-
 	ret = hx8357_spi_write_array(lcdev, hx8357_seq_power,
 				ARRAY_SIZE(hx8357_seq_power));
 	if (ret < 0)
@@ -359,6 +430,94 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
 	return 0;
 }
 
+static int hx8369_lcd_init(struct lcd_device *lcdev)
+{
+	int ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_extension_command,
+				ARRAY_SIZE(hx8369_seq_extension_command));
+	if (ret < 0)
+		return ret;
+	usleep_range(10000, 12000);
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_display_related,
+				ARRAY_SIZE(hx8369_seq_display_related));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_panel_waveform_cycle,
+				ARRAY_SIZE(hx8369_seq_panel_waveform_cycle));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_address_mode,
+				ARRAY_SIZE(hx8369_seq_set_address_mode));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_vcom,
+				ARRAY_SIZE(hx8369_seq_vcom));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_gip,
+				ARRAY_SIZE(hx8369_seq_gip));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_power,
+				ARRAY_SIZE(hx8369_seq_power));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
+	if (ret < 0)
+		return ret;
+
+	msleep(120);
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_gamma_curve_related,
+				ARRAY_SIZE(hx8369_seq_gamma_curve_related));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_byte(lcdev, HX8357_EXIT_SLEEP_MODE);
+	if (ret < 0)
+		return ret;
+	usleep_range(1000, 1200);
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_write_CABC_control,
+				ARRAY_SIZE(hx8369_seq_write_CABC_control));
+	if (ret < 0)
+		return ret;
+	usleep_range(10000, 12000);
+
+	ret = hx8357_spi_write_array(lcdev,
+			hx8369_seq_write_CABC_control_setting,
+			ARRAY_SIZE(hx8369_seq_write_CABC_control_setting));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_array(lcdev,
+			hx8369_seq_write_CABC_min_brightness,
+			ARRAY_SIZE(hx8369_seq_write_CABC_min_brightness));
+	if (ret < 0)
+		return ret;
+	usleep_range(10000, 12000);
+
+	ret = hx8357_spi_write_array(lcdev, hx8369_seq_set_display_brightness,
+				ARRAY_SIZE(hx8369_seq_set_display_brightness));
+	if (ret < 0)
+		return ret;
+
+	ret = hx8357_spi_write_byte(lcdev, HX8357_SET_DISPLAY_ON);
+	if (ret < 0)
+		return ret;
+	msleep(100);
+
+	return 0;
+}
+
 #define POWER_IS_ON(pwr)	((pwr) <= FB_BLANK_NORMAL)
 
 static int hx8357_set_power(struct lcd_device *lcdev, int power)
@@ -391,10 +550,24 @@ static struct lcd_ops hx8357_ops = {
 	.get_power	= hx8357_get_power,
 };
 
+static const struct of_device_id hx8357_dt_ids[] = {
+	{
+		.compatible = "himax,hx8357",
+		.data = hx8357_lcd_init,
+	},
+	{
+		.compatible = "himax,hx8369",
+		.data = hx8369_lcd_init,
+	},
+	{},
+};
+MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
+
 static int hx8357_probe(struct spi_device *spi)
 {
 	struct lcd_device *lcdev;
 	struct hx8357_data *lcd;
+	const struct of_device_id *match;
 	int i, ret;
 
 	lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL);
@@ -411,6 +584,10 @@ static int hx8357_probe(struct spi_device *spi)
 
 	lcd->spi = spi;
 
+	match = of_match_device(hx8357_dt_ids, &spi->dev);
+	if (!match || !match->data)
+		return -EINVAL;
+
 	lcd->reset = of_get_named_gpio(spi->dev.of_node, "gpios-reset", 0);
 	if (!gpio_is_valid(lcd->reset)) {
 		dev_err(&spi->dev, "Missing dt property: gpios-reset\n");
@@ -460,7 +637,9 @@ static int hx8357_probe(struct spi_device *spi)
 	}
 	spi_set_drvdata(spi, lcdev);
 
-	ret = hx8357_lcd_init(lcdev);
+	hx8357_lcd_reset(lcdev);
+
+	ret = ((int (*)(struct lcd_device *))match->data)(lcdev);
 	if (ret) {
 		dev_err(&spi->dev, "Couldn't initialize panel\n");
 		goto init_error;
@@ -483,12 +662,6 @@ static int hx8357_remove(struct spi_device *spi)
 	return 0;
 }
 
-static const struct of_device_id hx8357_dt_ids[] = {
-	{ .compatible = "himax,hx8357" },
-	{},
-};
-MODULE_DEVICE_TABLE(of, hx8357_dt_ids);
-
 static struct spi_driver hx8357_driver = {
 	.probe  = hx8357_probe,
 	.remove = hx8357_remove,
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 2/3] video: hx8357: Make IM pins optional
From: Maxime Ripard @ 2013-07-15 15:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-1-git-send-email-maxime.ripard@free-electrons.com>

The IM pins of the HX8357 controller are used to define the interface
used to feed pixel stream to the LCD panel.

Most of the time, these pins are directly routed to either the ground or
the VCC to set their values.

Remove the need to assign GPIOs to these pins when we are in such a case.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/video/backlight/hx8357.c | 52 +++++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 22 deletions(-)

diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
index a0482b5..ed94796 100644
--- a/drivers/video/backlight/hx8357.c
+++ b/drivers/video/backlight/hx8357.c
@@ -76,6 +76,7 @@ struct hx8357_data {
 	unsigned		reset;
 	struct spi_device	*spi;
 	int			state;
+	bool			use_im_pins;
 };
 
 static u8 hx8357_seq_power[] = {
@@ -250,9 +251,11 @@ static int hx8357_lcd_init(struct lcd_device *lcdev)
 	 * Set the interface selection pins to SPI mode, with three
 	 * wires
 	 */
-	gpio_set_value_cansleep(lcd->im_pins[0], 1);
-	gpio_set_value_cansleep(lcd->im_pins[1], 0);
-	gpio_set_value_cansleep(lcd->im_pins[2], 1);
+	if (lcd->use_im_pins) {
+		gpio_set_value_cansleep(lcd->im_pins[0], 1);
+		gpio_set_value_cansleep(lcd->im_pins[1], 0);
+		gpio_set_value_cansleep(lcd->im_pins[2], 1);
+	}
 
 	/* Reset the screen */
 	gpio_set_value(lcd->reset, 1);
@@ -424,26 +427,31 @@ static int hx8357_probe(struct spi_device *spi)
 		return -EINVAL;
 	}
 
-	for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
-		lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node,
-						"im-gpios", i);
-		if (lcd->im_pins[i] = -EPROBE_DEFER) {
-			dev_info(&spi->dev, "GPIO requested is not here yet, deferring the probe\n");
-			return -EPROBE_DEFER;
-		}
-		if (!gpio_is_valid(lcd->im_pins[i])) {
-			dev_err(&spi->dev, "Missing dt property: im-gpios\n");
-			return -EINVAL;
+	if (of_find_property(spi->dev.of_node, "im-gpios", NULL)) {
+		lcd->use_im_pins = 1;
+
+		for (i = 0; i < HX8357_NUM_IM_PINS; i++) {
+			lcd->im_pins[i] = of_get_named_gpio(spi->dev.of_node,
+							    "im-gpios", i);
+			if (lcd->im_pins[i] = -EPROBE_DEFER) {
+				dev_info(&spi->dev, "GPIO requested is not here yet, deferring the probe\n");
+				return -EPROBE_DEFER;
+			}
+			if (!gpio_is_valid(lcd->im_pins[i])) {
+				dev_err(&spi->dev, "Missing dt property: im-gpios\n");
+				return -EINVAL;
+			}
+
+			ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
+						    GPIOF_OUT_INIT_LOW, "im_pins");
+			if (ret) {
+				dev_err(&spi->dev, "failed to request gpio %d: %d\n",
+					lcd->im_pins[i], ret);
+				return -EINVAL;
+			}
 		}
-
-		ret = devm_gpio_request_one(&spi->dev, lcd->im_pins[i],
-					GPIOF_OUT_INIT_LOW, "im_pins");
-		if (ret) {
-			dev_err(&spi->dev, "failed to request gpio %d: %d\n",
-				lcd->im_pins[i], ret);
-			return -EINVAL;
-		}
-	}
+	} else
+		lcd->use_im_pins = 0;
 
 	lcdev = lcd_device_register("mxsfb", &spi->dev, lcd, &hx8357_ops);
 	if (IS_ERR(lcdev)) {
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 1/3] video: mxsfb: fix color settings for 18bit data bus and 32bpp
From: Maxime Ripard @ 2013-07-15 15:27 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1373902022-20439-1-git-send-email-maxime.ripard@free-electrons.com>

From: Hector Palacios <hector.palacios@digi.com>

For a combination of 18bit LCD data bus width and a color
mode of 32bpp, the driver was setting the color mapping to
rgb666, which is wrong, as the color in memory realy has an
rgb888 layout.

This patch also removes the setting of flag CTRL_DF24 that
makes the driver dimiss the upper 2 bits when handling 32/24bpp
colors in a diplay with 18bit data bus width. This flag made
true color images display wrong in such configurations.

Finally, the color mapping rgb666 has also been removed as nobody
is using it and high level applications like Qt5 cannot work
with it either.

Reference: https://lkml.org/lkml/2013/5/23/220
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/video/mxsfb.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 3ba3771..dc09ebe 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -239,24 +239,6 @@ static const struct fb_bitfield def_rgb565[] = {
 	}
 };
 
-static const struct fb_bitfield def_rgb666[] = {
-	[RED] = {
-		.offset = 16,
-		.length = 6,
-	},
-	[GREEN] = {
-		.offset = 8,
-		.length = 6,
-	},
-	[BLUE] = {
-		.offset = 0,
-		.length = 6,
-	},
-	[TRANSP] = {	/* no support for transparency */
-		.length = 0,
-	}
-};
-
 static const struct fb_bitfield def_rgb888[] = {
 	[RED] = {
 		.offset = 16,
@@ -309,9 +291,6 @@ static int mxsfb_check_var(struct fb_var_screeninfo *var,
 			break;
 		case STMLCDIF_16BIT:
 		case STMLCDIF_18BIT:
-			/* 24 bit to 18 bit mapping */
-			rgb = def_rgb666;
-			break;
 		case STMLCDIF_24BIT:
 			/* real 24 bit */
 			rgb = def_rgb888;
@@ -453,11 +432,6 @@ static int mxsfb_set_par(struct fb_info *fb_info)
 			return -EINVAL;
 		case STMLCDIF_16BIT:
 		case STMLCDIF_18BIT:
-			/* 24 bit to 18 bit mapping */
-			ctrl |= CTRL_DF24; /* ignore the upper 2 bits in
-					    *  each colour component
-					    */
-			break;
 		case STMLCDIF_24BIT:
 			/* real 24 bit */
 			break;
-- 
1.8.3.2


^ permalink raw reply related

* [PATCH 0/3] Few ignored framebuffer fixes/additions
From: Maxime Ripard @ 2013-07-15 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Andrew, 

Sorry to bother you again with the framebuffer stuff but the new
maintainer doesn't appear to be responsive either.k

This is a collection of patches that have been silently ignored,
despite being pinged numerous times:
  - Patch 1 has been sent for the first time on June 7 [1], resent on
    June 18 [2], plus two pings on July, 3rd [3] and July, 12th [4]. With
    no comments whatsoever.
  - Patch 2 has been sent on June, 21st [5]. Jean Christophe commented
    on it on June, 24th [6], but every attempts at getting clear
    explanations on what was expected have been ignored ever since
    (June 25th [7], July 12th [8])
  - Patch 3 was sent on June 21st along with Patch 2 [9]. There was
    comments on it and a second version was sent on June 24th
    [10]. Without any comments so far.

Could you take a look at those patches? We already missed 3.11, and
I'd really like not to miss another merge window because of the fbdev
curse.

Thanks,
Maxime

[1]: https://lkml.org/lkml/2013/6/7/116
[2]: https://lkml.org/lkml/2013/6/18/130
[3]: https://lkml.org/lkml/2013/7/3/105
[4]: https://lkml.org/lkml/2013/7/12/177
[5]: https://lkml.org/lkml/2013/6/21/405
[6]: https://lkml.org/lkml/2013/6/24/313
[7]: https://lkml.org/lkml/2013/6/25/274
[8]: https://lkml.org/lkml/2013/7/12/103
[9]: https://lkml.org/lkml/2013/6/21/407
[10]: https://lkml.org/lkml/2013/6/24/302

Alexandre Belloni (1):
  fb: backlight: HX8357: Add HX8369 support

Hector Palacios (1):
  video: mxsfb: fix color settings for 18bit data bus and 32bpp

Maxime Ripard (1):
  video: hx8357: Make IM pins optional

 drivers/video/backlight/hx8357.c | 255 +++++++++++++++++++++++++++++++++------
 drivers/video/mxsfb.c            |  26 ----
 2 files changed, 218 insertions(+), 63 deletions(-)

-- 
1.8.3.2


^ permalink raw reply

* Re: [BUG] radeon: suspend resume
From: Michel Dänzer @ 2013-07-15 10:35 UTC (permalink / raw)
  To: kerolasa; +Cc: dri-devel
In-Reply-To: <CAG27Bk2NzdZELTeByjH5Sj_NbB+TOhYDK66aX1-9e=W_LT39Hg@mail.gmail.com>


[ The radeon driver is discussed on the dri-devel mailing list, moving
there ]

On Son, 2013-07-14 at 13:26 +0100, Sami Kerola wrote:
> 
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
> CP stall for more than 10000msec
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
> (waiting for 0x0000000000000004 last fence id 0x0000000000000002)
> Jul 14 12:51:31 kerolasa-home kernel: [drm:r600_uvd_ib_test] *ERROR*
> radeon: fence wait failed (-35).
> Jul 14 12:51:31 kerolasa-home kernel: [drm:radeon_ib_ring_tests]
> *ERROR* radeon: failed testing IB on ring 5 (-35).

Looks like the patch from
https://bugs.freedesktop.org/show_bug.cgi?idf425 might help.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

^ permalink raw reply

* Re: [PATCH] video: remove unused variable "dev" in vga16fb_destroy()
From: Jingoo Han @ 2013-07-15  7:13 UTC (permalink / raw)
  To: 'Yijing Wang', 'Jean-Christophe Plagniol-Villard',
	'Tomi Valkeinen'
  Cc: linux-kernel, linux-fbdev, 'Hanjun Guo', jiang.liu,
	Jingoo Han
In-Reply-To: <1373869765-52572-1-git-send-email-wangyijing@huawei.com>

On Monday, July 15, 2013 3:29 PM, Yijing Wang wrote:
> 
> Delete unused variable "dev" to fix build warning in
> drivers/video/vga16fb.c
> 
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> Cc: Jingoo Han <jg1.han@samsung.com>

It looks good.
Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/video/vga16fb.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
> index 830ded4..2827333 100644
> --- a/drivers/video/vga16fb.c
> +++ b/drivers/video/vga16fb.c
> @@ -1265,7 +1265,6 @@ static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image
> 
>  static void vga16fb_destroy(struct fb_info *info)
>  {
> -	struct platform_device *dev = container_of(info->device, struct platform_device, dev);
>  	iounmap(info->screen_base);
>  	fb_dealloc_cmap(&info->cmap);
>  	/* XXX unshare VGA regions */
> --
> 1.7.1



^ permalink raw reply

* [PATCH] video: remove unused variable "dev" in vga16fb_destroy()
From: Yijing Wang @ 2013-07-15  6:29 UTC (permalink / raw)
  To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
  Cc: linux-kernel, linux-fbdev, Hanjun Guo, jiang.liu, Yijing Wang,
	Jingoo Han

Delete unused variable "dev" to fix build warning in
drivers/video/vga16fb.c

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Cc: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/vga16fb.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/video/vga16fb.c b/drivers/video/vga16fb.c
index 830ded4..2827333 100644
--- a/drivers/video/vga16fb.c
+++ b/drivers/video/vga16fb.c
@@ -1265,7 +1265,6 @@ static void vga16fb_imageblit(struct fb_info *info, const struct fb_image *image
 
 static void vga16fb_destroy(struct fb_info *info)
 {
-	struct platform_device *dev = container_of(info->device, struct platform_device, dev);
 	iounmap(info->screen_base);
 	fb_dealloc_cmap(&info->cmap);
 	/* XXX unshare VGA regions */
-- 
1.7.1



^ permalink raw reply related

* Re: [PATCH] video: nuc900fb: fix to pass correct device identity to free_irq()
From: Wan ZongShun @ 2013-07-15  2:41 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <CAPgLHd_mMOOeMecVJbTQjiK+xJD+-8jvgH6oAFqTHK_uSpWOJw@mail.gmail.com>

2013/7/12 Wei Yongjun <weiyj.lk@gmail.com>:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> free_irq() expects the same device identity that was passed to
> corresponding request_irq(), otherwise the IRQ is not freed.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Sorry, repost.

Hi Yongjun,

(1)  ret = request_irq(irq, nuc900fb_irqhandler, 0,
              pdev->name, fbinfo);

(2)  static irqreturn_t nuc900fb_irqhandler(int irq, void *dev_id)
{
    struct nuc900fb_info *fbi = dev_id;
    void __iomem *regs = fbi->io;

From (1) and (2), we should consider the wrong with passing 'fbinfo'
to 'nuc900fb_irqhandler', it should pass the 'fbi' instead as
following codes:

ret = request_irq(irq, nuc900fb_irqhandler, 0,
              pdev->name, fbi);

So if we fix this wrong,' free_irq(irq, fbi);' would be ok, right?

Thanks!
Vincent Wan.


> ---
>  drivers/video/nuc900fb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/nuc900fb.c b/drivers/video/nuc900fb.c
> index 8c527e5..ebd5501 100644
> --- a/drivers/video/nuc900fb.c
> +++ b/drivers/video/nuc900fb.c
> @@ -661,7 +661,7 @@ release_clock:
>         clk_disable(fbi->clk);
>         clk_put(fbi->clk);
>  release_irq:
> -       free_irq(irq, fbi);
> +       free_irq(irq, fbinfo);
>  release_regs:
>         iounmap(fbi->io);
>  release_mem_region:
> @@ -702,7 +702,7 @@ static int nuc900fb_remove(struct platform_device *pdev)
>         iounmap(fbi->io);
>
>         irq = platform_get_irq(pdev, 0);
> -       free_irq(irq, fbi);
> +       free_irq(irq, fbinfo);
>
>         release_resource(fbi->mem);
>         kfree(fbi->mem);
>



--
Wan ZongShun.
www.mcuos.com

^ permalink raw reply

* Re: [BUG] radeon: suspend resume
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-07-14 20:13 UTC (permalink / raw)
  To: linux-fbdev
In-Reply-To: <CAG27Bk2NzdZELTeByjH5Sj_NbB+TOhYDK66aX1-9e=W_LT39Hg@mail.gmail.com>


On Jul 14, 2013, at 8:26 PM, Sami Kerola <kerolasa@iki.fi> wrote:

> Hello,
> 
> I build from Linus's tree from point
> 
> commit 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e
> 
> a kernel which has a power management suspend/resume problem.  In short I
> do not get video back at resume, and my laptop becomes completely
> unresponsive.  I have hunch the NO_HZ has something to do with issue.

You will have to bisect and found the commit that introduce the bug

as commit 9903883f1dd6e86

    Merge tag 'dm-3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm

    Pull device-mapper changes from Alasdair G Kergon:
     "Add a device-mapper target called dm-switch to provide a multipath
      framework for storage arrays that dynamically reconfigure their
      preferred paths for different device regions.

      Fix a bug in the verity target that prevented its use with some
      specific sizes of devices.

      Improve some locking mechanisms in the device-mapper core and bufio.

      Add Mike Snitzer as a device-mapper maintainer.

      A few more clean-ups and fixes"

is a merge about device-mapper not fbdev and even Radeon drivers

Best Regards,
J.

> 
> # zgrep ^CONFIG_NO_HZ /proc/config.gz
> CONFIG_NO_HZ_COMMON=y
> CONFIG_NO_HZ_FULL=y
> CONFIG_NO_HZ=y
> 
> The NO_HZ combined with this piece of hardware results seems to be the
> issue.
> 
> 00:01.0 VGA compatible controller: Advanced Micro Devices, Inc.
> [AMD/ATI] Wrestler [Radeon HD 7310] (prog-if 00 [VGA controller])
>        Subsystem: Toshiba America Info Systems Device fb33
>        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B- DisINTx+
>        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSELúst >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>        Latency: 0, Cache Line Size: 64 bytes
>        Interrupt: pin A routed to IRQ 49
>        Region 0: Memory at e0000000 (32-bit, prefetchable) [size%6M]
>        Region 1: I/O ports at 5000 [size%6]
>        Region 2: Memory at f0400000 (32-bit, non-prefetchable) [size%6K]
>        Expansion ROM at <unassigned> [disabled]
>        Capabilities: [50] Power Management version 3
>                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>        Capabilities: [58] Express (v2) Root Complex Integrated Endpoint, MSI 00
>                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s
> <4us, L1 unlimited
>                        ExtTag+ RBE+ FLReset-
>                DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
> Unsupported-
>                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
>                        MaxPayload 128 bytes, MaxReadReq 128 bytes
>                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+
> AuxPwr- TransPend-
>                LnkCap: Port #0, Speed unknown, Width x0, ASPM
> unknown, Latency L0 <64ns, L1 <1us
>                        ClockPM- Surprise- LLActRep- BwNot-
>                LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
>                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
>                LnkSta: Speed unknown, Width x0, TrErr- Train-
> SlotClk- DLActive- BWMgmt- ABWMgmt-
>                DevCap2: Completion Timeout: Not Supported,
> TimeoutDis-, LTR-, OBFF Not Supported
>                DevCtl2: Completion Timeout: 50us to 50ms,
> TimeoutDis-, LTR-, OBFF Disabled
>                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
>                         Transmit Margin: Normal Operating Range,
> EnterModifiedCompliance- ComplianceSOS-
>                         Compliance De-emphasis: -6dB
>                LnkSta2: Current De-emphasis Level: -6dB,
> EqualizationComplete-, EqualizationPhase1-
>                         EqualizationPhase2-, EqualizationPhase3-,
> LinkEqualizationRequest-
>        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
>                Address: 00000000fee0300c  Data: 4152
>        Capabilities: [100 v1] Vendor Specific Information: ID\001
> Rev=1 Len\x010 <?>
>        Kernel driver in use: radeon
>        Kernel modules: radeon
> 
> 
> Here are some message from journalctl from the time suspend begun, and
> resume failed.  To me the two lines with '*ERROR* radeon' does not look
> right.  The messages are result of 'echo devices > /sys/power/pm_test'.
> 
> 
> Jul 14 12:51:12 kerolasa-home kernel: PM: Hibernation mode set to 'platform'
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
> (ffff8800d2c09010): kobject_add_internal: parent: 'vc', set: 'devices'
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
> (ffff8800d2c09010): kobject_uevent_env
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
> (ffff8800d2c09010): fill_kobj_path: path = '/devices/virtual/vc/vcs63'
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
> (ffff8800d2c08010): kobject_add_internal: parent: 'vc', set: 'devices'
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
> (ffff8800d2c08010): kobject_uevent_env
> Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
> (ffff8800d2c08010): fill_kobj_path: path > '/devices/virtual/vc/vcsa63'
> Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0x0009f000-0x000fffff]
> Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0xdf6bf000-0xdfbfefff]
> Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0xdfc00000-0xffffffff]
> Jul 14 12:51:12 kerolasa-home kernel: PM: Basic memory bitmaps created
> Jul 14 12:51:31 kerolasa-home kernel: PM: Syncing filesystems ... done.
> Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: carrier lost
> Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting host route
> to 192.168.1.2 via 127.0.0.1
> Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting route to
> 192.168.1.0/24
> Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting default
> route via 192.168.1.1
> Jul 14 12:51:31 kerolasa-home kernel: Freezing user space processes
> ... (elapsed 0.001 seconds) done.
> Jul 14 12:51:31 kerolasa-home kernel: PM: Preallocating image
> memory... done (allocated 187558 pages)
> Jul 14 12:51:31 kerolasa-home kernel: PM: Allocated 750232 kbytes in
> 0.32 seconds (2344.47 MB/s)
> Jul 14 12:51:31 kerolasa-home kernel: Freezing remaining freezable
> tasks ... (elapsed 0.001 seconds) done.
> Jul 14 12:51:31 kerolasa-home kernel: Suspending console(s) (use
> no_console_suspend to debug)
> Jul 14 12:51:31 kerolasa-home kernel: wlan0: deauthenticating from
> 20:f3:a3:39:74:56 by local choice (reason=3)
> Jul 14 12:51:31 kerolasa-home kernel: cfg80211: Calling CRDA to update
> world regulatory domain
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'regulatory.0'
> (ffff8800d98bc820): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'regulatory.0'
> (ffff8800d98bc820): fill_kobj_path: path > '/devices/platform/regulatory.0'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
> (ffff8800d8c97888): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
> (ffff8800d8c97888): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '50': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c974d8): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c974d8): auto cleanup kobject_del
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c974d8): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c974d8): kset_release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
> (ffff8800d8c97ac8): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
> (ffff8800d8c97ac8): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '49': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c97b98): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c97b98): auto cleanup kobject_del
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c97b98): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d8c97b98): kset_release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
> driver on ring 5 use gpu addr 0x0000000000177118 and cpu addr
> 0xffffc90004ab2118
> Jul 14 12:51:31 kerolasa-home kernel: PM: freeze of devices complete
> after 631.979 msecs
> Jul 14 12:51:31 kerolasa-home kernel: hibernation debug: Waiting for 5 seconds.
> Jul 14 12:51:31 kerolasa-home kernel: usb usb1: root hub lost power or was reset
> Jul 14 12:51:31 kerolasa-home kernel: usb usb2: root hub lost power or was reset
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
> (ffff880106a39dc8): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
> (ffff880106a39dc8): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '43': free name
> Jul 14 12:51:31 kerolasa-home kernel: usb usb4: root hub lost power or was reset
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
> (ffff880106a39d08): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
> (ffff880106a39d08): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '44': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
> (ffff880106a39c48): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
> (ffff880106a39c48): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '45': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39b98): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39b98): auto cleanup kobject_del
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39b98): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39b98): kset_release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
> Jul 14 12:51:31 kerolasa-home kernel: usb usb5: root hub lost power or was reset
> Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 43
> for MSI/MSI-X
> Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 44
> for MSI/MSI-X
> Jul 14 12:51:31 kerolasa-home kernel: rtlwifi: wireless switch is on
> Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 45
> for MSI/MSI-X
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d9012118): kobject_add_internal: parent: '0000:00:10.0', set:
> '<NULL>'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d9012118): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d9012118): kobject_uevent_env: filter function caused the
> event to drop!
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
> (ffff8800d90121c8): kobject_add_internal: parent: 'msi_irqs', set:
> 'msi_irqs'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
> (ffff8800d9012e88): kobject_add_internal: parent: 'msi_irqs', set:
> 'msi_irqs'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
> (ffff8800d9012c48): kobject_add_internal: parent: 'msi_irqs', set:
> 'msi_irqs'
> Jul 14 12:51:31 kerolasa-home kernel: [drm] PCIE GART of 512M enabled
> (table at 0x0000000000145000).
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: WB enabled
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
> driver on ring 0 use gpu addr 0x0000000018000c00 and cpu addr
> 0xffff8800d98a2c00
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
> driver on ring 3 use gpu addr 0x0000000018000c0c and cpu addr
> 0xffff8800d98a2c0c
> Jul 14 12:51:31 kerolasa-home kernel: snd_hda_intel 0000:00:14.2: irq
> 49 for MSI/MSI-X
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d92b5718): kobject_add_internal: parent: '0000:00:14.2', set:
> '<NULL>'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d92b5718): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff8800d92b5718): kobject_uevent_env: filter function caused the
> event to drop!
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
> (ffff8800d92b5648): kobject_add_internal: parent: 'msi_irqs', set:
> 'msi_irqs'
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
> driver on ring 5 use gpu addr 0x00000000007ca118 and cpu addr
> 0xffffc90005432118
> Jul 14 12:51:31 kerolasa-home kernel: snd_hda_intel 0000:00:01.1: irq
> 50 for MSI/MSI-X
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39658): kobject_add_internal: parent: '0000:00:01.1', set:
> '<NULL>'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39658): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
> (ffff880106a39658): kobject_uevent_env: filter function caused the
> event to drop!
> Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
> (ffff8800d9012a08): kobject_add_internal: parent: 'msi_irqs', set:
> 'msi_irqs'
> Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 0 succeeded in 1 usecs
> Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 3 succeeded in 1 usecs
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
> (ffff8800da197198): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
> (ffff8800da197198): fill_kobj_path: path > '/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0'
> Jul 14 12:51:31 kerolasa-home kernel: ACPI: \_SB_.PCI0:
> ACPI_NOTIFY_BUS_CHECK event: unsupported
> Jul 14 12:51:31 kerolasa-home kernel: ACPI: \_SB_.PCI0: Bus check
> notify on _handle_hotplug_event_root
> Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 5 succeeded in 1 usecs
> Jul 14 12:51:31 kerolasa-home kernel: [drm] UVD initialized successfully.
> Jul 14 12:51:31 kerolasa-home kernel: [drm] ib test on ring 0
> succeeded in 0 usecs
> Jul 14 12:51:31 kerolasa-home kernel: [drm] ib test on ring 3
> succeeded in 1 usecs
> Jul 14 12:51:31 kerolasa-home kernel: usb 5-4: reset high-speed USB
> device number 3 using ehci-pci
> Jul 14 12:51:31 kerolasa-home kernel: ata1: SATA link up 3.0 Gbps
> (SStatus 123 SControl 300)
> Jul 14 12:51:31 kerolasa-home kernel: ata2: SATA link up 1.5 Gbps
> (SStatus 113 SControl 300)
> Jul 14 12:51:31 kerolasa-home kernel: ata2.00: configured for UDMA/100
> Jul 14 12:51:31 kerolasa-home kernel: ata1.00: configured for UDMA/100
> Jul 14 12:51:31 kerolasa-home kernel: sd 0:0:0:0: [sda] Starting disk
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
> CP stall for more than 10000msec
> Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
> (waiting for 0x0000000000000004 last fence id 0x0000000000000002)
> Jul 14 12:51:31 kerolasa-home kernel: [drm:r600_uvd_ib_test] *ERROR*
> radeon: fence wait failed (-35).
> Jul 14 12:51:31 kerolasa-home kernel: [drm:radeon_ib_ring_tests]
> *ERROR* radeon: failed testing IB on ring 5 (-35).
> Jul 14 12:51:31 kerolasa-home kernel: PM: restore of devices complete
> after 11949.096 msecs
> Jul 14 12:51:31 kerolasa-home kernel: PM: Image restored successfully.
> Jul 14 12:51:31 kerolasa-home kernel: Restarting tasks ... done.
> Jul 14 12:51:31 kerolasa-home kernel: PM: Basic memory bitmaps freed
> Jul 14 12:51:31 kerolasa-home kernel: video LNXVIDEO:00: Restoring
> backlight state
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
> (ffff8800da197198): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
> (ffff8800da197198): fill_kobj_path: path > '/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800db3b6010): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800db3b6010): fill_kobj_path: path > '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
> (ffff880106aba8a0): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
> (ffff880106aba8a0): auto cleanup kobject_del
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
> (ffff880106aba8a0): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800db3b6010): kobject_cleanup
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800db3b6010): calling ktype release
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0': free name
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
> (ffff8800d924d180): kobject_add_internal: parent: 'PNP0C0A:00', set:
> '(null)'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800d2c0e010): kobject_add_internal: parent: 'power_supply', set:
> 'devices'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800d2c0e010): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800d2c0e010): fill_kobj_path: path > '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800d2c0e010): kobject_uevent_env
> Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
> (ffff8800d2c0e010): fill_kobj_path: path > '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
> Jul 14 12:51:31 kerolasa-home kernel: PM: Hibernation mode set to 'platform'
> Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0x0009f000-0x000fffff]
> Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0xdf6bf000-0xdfbfefff]
> Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
> 0xdfc00000-0xffffffff]
> Jul 14 12:51:31 kerolasa-home kernel: PM: Basic memory bitmaps created
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: authenticate with 20:f3:a3:39:74:56
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: send auth to
> 20:f3:a3:39:74:56 (try 1/3)
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: authenticated
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: associate with
> 20:f3:a3:39:74:56 (try 1/3)
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: RX AssocResp from
> 20:f3:a3:39:74:56 (capab=0x411 status=0 aid=1)
> Jul 14 12:51:32 kerolasa-home kernel: wlan0: associated
> Jul 14 12:51:32 kerolasa-home dhcpcd[451]: wlan0: carrier acquired
> 
> Let me know if more debug information or output is needed.
> 
> --
> Sami Kerola
> http://www.iki.fi/kerolasa/
> --
> 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

* [BUG] radeon: suspend resume
From: Sami Kerola @ 2013-07-14 12:26 UTC (permalink / raw)
  To: linux-fbdev

Hello,

I build from Linus's tree from point

commit 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e

a kernel which has a power management suspend/resume problem.  In short I
do not get video back at resume, and my laptop becomes completely
unresponsive.  I have hunch the NO_HZ has something to do with issue.

# zgrep ^CONFIG_NO_HZ /proc/config.gz
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_FULL=y
CONFIG_NO_HZ=y

The NO_HZ combined with this piece of hardware results seems to be the
issue.

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc.
[AMD/ATI] Wrestler [Radeon HD 7310] (prog-if 00 [VGA controller])
        Subsystem: Toshiba America Info Systems Device fb33
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSELúst >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 49
        Region 0: Memory at e0000000 (32-bit, prefetchable) [size%6M]
        Region 1: I/O ports at 5000 [size%6]
        Region 2: Memory at f0400000 (32-bit, non-prefetchable) [size%6K]
        Expansion ROM at <unassigned> [disabled]
        Capabilities: [50] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [58] Express (v2) Root Complex Integrated Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s
<4us, L1 unlimited
                        ExtTag+ RBE+ FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+
AuxPwr- TransPend-
                LnkCap: Port #0, Speed unknown, Width x0, ASPM
unknown, Latency L0 <64ns, L1 <1us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed unknown, Width x0, TrErr- Train-
SlotClk- DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported,
TimeoutDis-, LTR-, OBFF Not Supported
                DevCtl2: Completion Timeout: 50us to 50ms,
TimeoutDis-, LTR-, OBFF Disabled
                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
                         Compliance De-emphasis: -6dB
                LnkSta2: Current De-emphasis Level: -6dB,
EqualizationComplete-, EqualizationPhase1-
                         EqualizationPhase2-, EqualizationPhase3-,
LinkEqualizationRequest-
        Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee0300c  Data: 4152
        Capabilities: [100 v1] Vendor Specific Information: ID\001
Rev=1 Len\x010 <?>
        Kernel driver in use: radeon
        Kernel modules: radeon


Here are some message from journalctl from the time suspend begun, and
resume failed.  To me the two lines with '*ERROR* radeon' does not look
right.  The messages are result of 'echo devices > /sys/power/pm_test'.


Jul 14 12:51:12 kerolasa-home kernel: PM: Hibernation mode set to 'platform'
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
(ffff8800d2c09010): kobject_add_internal: parent: 'vc', set: 'devices'
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
(ffff8800d2c09010): kobject_uevent_env
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcs63'
(ffff8800d2c09010): fill_kobj_path: path = '/devices/virtual/vc/vcs63'
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
(ffff8800d2c08010): kobject_add_internal: parent: 'vc', set: 'devices'
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
(ffff8800d2c08010): kobject_uevent_env
Jul 14 12:51:12 kerolasa-home kernel: kobject: 'vcsa63'
(ffff8800d2c08010): fill_kobj_path: path '/devices/virtual/vc/vcsa63'
Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
0x0009f000-0x000fffff]
Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
0xdf6bf000-0xdfbfefff]
Jul 14 12:51:12 kerolasa-home kernel: PM: Marking nosave pages: [mem
0xdfc00000-0xffffffff]
Jul 14 12:51:12 kerolasa-home kernel: PM: Basic memory bitmaps created
Jul 14 12:51:31 kerolasa-home kernel: PM: Syncing filesystems ... done.
Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: carrier lost
Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting host route
to 192.168.1.2 via 127.0.0.1
Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting route to
192.168.1.0/24
Jul 14 12:51:31 kerolasa-home dhcpcd[451]: wlan0: deleting default
route via 192.168.1.1
Jul 14 12:51:31 kerolasa-home kernel: Freezing user space processes
... (elapsed 0.001 seconds) done.
Jul 14 12:51:31 kerolasa-home kernel: PM: Preallocating image
memory... done (allocated 187558 pages)
Jul 14 12:51:31 kerolasa-home kernel: PM: Allocated 750232 kbytes in
0.32 seconds (2344.47 MB/s)
Jul 14 12:51:31 kerolasa-home kernel: Freezing remaining freezable
tasks ... (elapsed 0.001 seconds) done.
Jul 14 12:51:31 kerolasa-home kernel: Suspending console(s) (use
no_console_suspend to debug)
Jul 14 12:51:31 kerolasa-home kernel: wlan0: deauthenticating from
20:f3:a3:39:74:56 by local choice (reason=3)
Jul 14 12:51:31 kerolasa-home kernel: cfg80211: Calling CRDA to update
world regulatory domain
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'regulatory.0'
(ffff8800d98bc820): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'regulatory.0'
(ffff8800d98bc820): fill_kobj_path: path '/devices/platform/regulatory.0'
Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
(ffff8800d8c97888): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
(ffff8800d8c97888): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: '50': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c974d8): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c974d8): auto cleanup kobject_del
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c974d8): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c974d8): kset_release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
(ffff8800d8c97ac8): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
(ffff8800d8c97ac8): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: '49': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c97b98): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c97b98): auto cleanup kobject_del
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c97b98): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d8c97b98): kset_release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
driver on ring 5 use gpu addr 0x0000000000177118 and cpu addr
0xffffc90004ab2118
Jul 14 12:51:31 kerolasa-home kernel: PM: freeze of devices complete
after 631.979 msecs
Jul 14 12:51:31 kerolasa-home kernel: hibernation debug: Waiting for 5 seconds.
Jul 14 12:51:31 kerolasa-home kernel: usb usb1: root hub lost power or was reset
Jul 14 12:51:31 kerolasa-home kernel: usb usb2: root hub lost power or was reset
Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
(ffff880106a39dc8): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
(ffff880106a39dc8): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: '43': free name
Jul 14 12:51:31 kerolasa-home kernel: usb usb4: root hub lost power or was reset
Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
(ffff880106a39d08): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
(ffff880106a39d08): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: '44': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
(ffff880106a39c48): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
(ffff880106a39c48): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: '45': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39b98): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39b98): auto cleanup kobject_del
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39b98): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39b98): kset_release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs': free name
Jul 14 12:51:31 kerolasa-home kernel: usb usb5: root hub lost power or was reset
Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 43
for MSI/MSI-X
Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 44
for MSI/MSI-X
Jul 14 12:51:31 kerolasa-home kernel: rtlwifi: wireless switch is on
Jul 14 12:51:31 kerolasa-home kernel: xhci_hcd 0000:00:10.0: irq 45
for MSI/MSI-X
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d9012118): kobject_add_internal: parent: '0000:00:10.0', set:
'<NULL>'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d9012118): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d9012118): kobject_uevent_env: filter function caused the
event to drop!
Jul 14 12:51:31 kerolasa-home kernel: kobject: '43'
(ffff8800d90121c8): kobject_add_internal: parent: 'msi_irqs', set:
'msi_irqs'
Jul 14 12:51:31 kerolasa-home kernel: kobject: '44'
(ffff8800d9012e88): kobject_add_internal: parent: 'msi_irqs', set:
'msi_irqs'
Jul 14 12:51:31 kerolasa-home kernel: kobject: '45'
(ffff8800d9012c48): kobject_add_internal: parent: 'msi_irqs', set:
'msi_irqs'
Jul 14 12:51:31 kerolasa-home kernel: [drm] PCIE GART of 512M enabled
(table at 0x0000000000145000).
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: WB enabled
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
driver on ring 0 use gpu addr 0x0000000018000c00 and cpu addr
0xffff8800d98a2c00
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
driver on ring 3 use gpu addr 0x0000000018000c0c and cpu addr
0xffff8800d98a2c0c
Jul 14 12:51:31 kerolasa-home kernel: snd_hda_intel 0000:00:14.2: irq
49 for MSI/MSI-X
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d92b5718): kobject_add_internal: parent: '0000:00:14.2', set:
'<NULL>'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d92b5718): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff8800d92b5718): kobject_uevent_env: filter function caused the
event to drop!
Jul 14 12:51:31 kerolasa-home kernel: kobject: '49'
(ffff8800d92b5648): kobject_add_internal: parent: 'msi_irqs', set:
'msi_irqs'
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: fence
driver on ring 5 use gpu addr 0x00000000007ca118 and cpu addr
0xffffc90005432118
Jul 14 12:51:31 kerolasa-home kernel: snd_hda_intel 0000:00:01.1: irq
50 for MSI/MSI-X
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39658): kobject_add_internal: parent: '0000:00:01.1', set:
'<NULL>'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39658): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'msi_irqs'
(ffff880106a39658): kobject_uevent_env: filter function caused the
event to drop!
Jul 14 12:51:31 kerolasa-home kernel: kobject: '50'
(ffff8800d9012a08): kobject_add_internal: parent: 'msi_irqs', set:
'msi_irqs'
Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 0 succeeded in 1 usecs
Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 3 succeeded in 1 usecs
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
(ffff8800da197198): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
(ffff8800da197198): fill_kobj_path: path '/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0'
Jul 14 12:51:31 kerolasa-home kernel: ACPI: \_SB_.PCI0:
ACPI_NOTIFY_BUS_CHECK event: unsupported
Jul 14 12:51:31 kerolasa-home kernel: ACPI: \_SB_.PCI0: Bus check
notify on _handle_hotplug_event_root
Jul 14 12:51:31 kerolasa-home kernel: [drm] ring test on 5 succeeded in 1 usecs
Jul 14 12:51:31 kerolasa-home kernel: [drm] UVD initialized successfully.
Jul 14 12:51:31 kerolasa-home kernel: [drm] ib test on ring 0
succeeded in 0 usecs
Jul 14 12:51:31 kerolasa-home kernel: [drm] ib test on ring 3
succeeded in 1 usecs
Jul 14 12:51:31 kerolasa-home kernel: usb 5-4: reset high-speed USB
device number 3 using ehci-pci
Jul 14 12:51:31 kerolasa-home kernel: ata1: SATA link up 3.0 Gbps
(SStatus 123 SControl 300)
Jul 14 12:51:31 kerolasa-home kernel: ata2: SATA link up 1.5 Gbps
(SStatus 113 SControl 300)
Jul 14 12:51:31 kerolasa-home kernel: ata2.00: configured for UDMA/100
Jul 14 12:51:31 kerolasa-home kernel: ata1.00: configured for UDMA/100
Jul 14 12:51:31 kerolasa-home kernel: sd 0:0:0:0: [sda] Starting disk
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
CP stall for more than 10000msec
Jul 14 12:51:31 kerolasa-home kernel: radeon 0000:00:01.0: GPU lockup
(waiting for 0x0000000000000004 last fence id 0x0000000000000002)
Jul 14 12:51:31 kerolasa-home kernel: [drm:r600_uvd_ib_test] *ERROR*
radeon: fence wait failed (-35).
Jul 14 12:51:31 kerolasa-home kernel: [drm:radeon_ib_ring_tests]
*ERROR* radeon: failed testing IB on ring 5 (-35).
Jul 14 12:51:31 kerolasa-home kernel: PM: restore of devices complete
after 11949.096 msecs
Jul 14 12:51:31 kerolasa-home kernel: PM: Image restored successfully.
Jul 14 12:51:31 kerolasa-home kernel: Restarting tasks ... done.
Jul 14 12:51:31 kerolasa-home kernel: PM: Basic memory bitmaps freed
Jul 14 12:51:31 kerolasa-home kernel: video LNXVIDEO:00: Restoring
backlight state
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
(ffff8800da197198): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'radeon_bl0'
(ffff8800da197198): fill_kobj_path: path '/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800db3b6010): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800db3b6010): fill_kobj_path: path '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
(ffff880106aba8a0): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
(ffff880106aba8a0): auto cleanup kobject_del
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
(ffff880106aba8a0): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800db3b6010): kobject_cleanup
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800db3b6010): calling ktype release
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0': free name
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'power_supply'
(ffff8800d924d180): kobject_add_internal: parent: 'PNP0C0A:00', set:
'(null)'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800d2c0e010): kobject_add_internal: parent: 'power_supply', set:
'devices'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800d2c0e010): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800d2c0e010): fill_kobj_path: path '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800d2c0e010): kobject_uevent_env
Jul 14 12:51:31 kerolasa-home kernel: kobject: 'BAT0'
(ffff8800d2c0e010): fill_kobj_path: path '/devices/LNXSYSTM:00/device:00/PNP0A08:00/PNP0C0A:00/power_supply/BAT0'
Jul 14 12:51:31 kerolasa-home kernel: PM: Hibernation mode set to 'platform'
Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
0x0009f000-0x000fffff]
Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
0xdf6bf000-0xdfbfefff]
Jul 14 12:51:31 kerolasa-home kernel: PM: Marking nosave pages: [mem
0xdfc00000-0xffffffff]
Jul 14 12:51:31 kerolasa-home kernel: PM: Basic memory bitmaps created
Jul 14 12:51:32 kerolasa-home kernel: wlan0: authenticate with 20:f3:a3:39:74:56
Jul 14 12:51:32 kerolasa-home kernel: wlan0: send auth to
20:f3:a3:39:74:56 (try 1/3)
Jul 14 12:51:32 kerolasa-home kernel: wlan0: authenticated
Jul 14 12:51:32 kerolasa-home kernel: wlan0: associate with
20:f3:a3:39:74:56 (try 1/3)
Jul 14 12:51:32 kerolasa-home kernel: wlan0: RX AssocResp from
20:f3:a3:39:74:56 (capab=0x411 status=0 aid=1)
Jul 14 12:51:32 kerolasa-home kernel: wlan0: associated
Jul 14 12:51:32 kerolasa-home dhcpcd[451]: wlan0: carrier acquired

Let me know if more debug information or output is needed.

--
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply

* Re: [V3 0/7] Enhance mmp display driver
From: jett zhou @ 2013-07-14  3:00 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <20130709133918.GC18477@ns203013.ovh.net>

Hi Jean
     As I checked the for-next branch, found patch4 and patch5 are
already applied.
     As checked on my side,  only apply patch1~patch3 and
patch6~patch7 is ok, so think you can apply them except for patch4/5.
     If there is still problem, please let me know, I will check it then.
Thanks

2013/7/9 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>:
> HI,
>
>         please rebase on the for-next branch as it does not apply
>
> Best Regards,
> J.
> On 19:27 Thu 27 Jun     , Jett.Zhou wrote:
>> Changelog:
>> 1 Add more comments for the mmp_display rbswap usage
>> according to Daniel's comments;
>> 2 Add fix patch for ttc_dkb on rbswap;
>> 3 Add more comments on the pitch usage and definition;
>> 4 Combine the modification on pitch of graphic and video layer
>> in one patch.
>>
>> Guoqing Li (2):
>>   video: mmp: rb swap setting update for mmp display
>>   video: mmp: optimize some register setting code
>>
>> Jett.Zhou (1):
>>   ARM: mmp: remove the legacy rbswap setting for ttc_dkb platform
>>
>> Jing Xiang (4):
>>   video: mmp: fix graphics/video layer enable/mask issue
>>   video: mmp: fix memcpy wrong size for mmp_addr issue
>>   video: mmp: calculate pitch value when fb set win
>>   video: mmp: add pitch info in mmp_win structure
>>
>>  arch/arm/mach-mmp/ttc_dkb.c     |    4 +-
>>  drivers/video/mmp/fb/mmpfb.c    |   34 +++++++++++------
>>  drivers/video/mmp/hw/mmp_ctrl.c |   79 ++++++++++++++++++++++-----------------
>>  drivers/video/mmp/hw/mmp_ctrl.h |    5 ++
>>  include/video/mmp_disp.h        |    6 +++
>>  5 files changed, 79 insertions(+), 49 deletions(-)
>>



--

----------------------------------
Best Regards
Jett Zhou

^ permalink raw reply


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