From 923959c743af81c38b2266e882d7e9734e70fda4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 Jul 2014 10:50:31 -0700 Subject: [PATCH] 3.4-stable patches added patches: drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch --- ...-pll-flags-when-encoder-mode-is-hdmi.patch | 82 +++++++++++++++++++ ...he-driver-work-on-big-endian-systems.patch | 49 +++++++++++ queue-3.4/series | 2 + 3 files changed, 133 insertions(+) create mode 100644 queue-3.4/drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch create mode 100644 queue-3.4/mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch diff --git a/queue-3.4/drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch b/queue-3.4/drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch new file mode 100644 index 00000000000..13caa2e3627 --- /dev/null +++ b/queue-3.4/drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch @@ -0,0 +1,82 @@ +From 7d5ab3009a8ca777174f6f469277b3922d56fd4b Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 21 Apr 2014 21:45:09 -0400 +Subject: drm/radeon: only apply hdmi bpc pll flags when encoder mode is hdmi + +From: Alex Deucher + +commit 7d5ab3009a8ca777174f6f469277b3922d56fd4b upstream. + +May fix display issues with non-HDMI displays. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atombios_crtc.c | 48 +++++++++++++++++---------------- + 1 file changed, 26 insertions(+), 22 deletions(-) + +--- a/drivers/gpu/drm/radeon/atombios_crtc.c ++++ b/drivers/gpu/drm/radeon/atombios_crtc.c +@@ -863,14 +863,16 @@ static void atombios_crtc_program_pll(st + args.v5.ucMiscInfo = 0; /* HDMI depth, etc. */ + if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK)) + args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_REF_DIV_SRC; +- switch (bpc) { +- case 8: +- default: +- args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_24BPP; +- break; +- case 10: +- args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_30BPP; +- break; ++ if (encoder_mode == ATOM_ENCODER_MODE_HDMI) { ++ switch (bpc) { ++ case 8: ++ default: ++ args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_24BPP; ++ break; ++ case 10: ++ args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_30BPP; ++ break; ++ } + } + args.v5.ucTransmitterID = encoder_id; + args.v5.ucEncoderMode = encoder_mode; +@@ -885,20 +887,22 @@ static void atombios_crtc_program_pll(st + args.v6.ucMiscInfo = 0; /* HDMI depth, etc. */ + if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK)) + args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_REF_DIV_SRC; +- switch (bpc) { +- case 8: +- default: +- args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_24BPP; +- break; +- case 10: +- args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_30BPP; +- break; +- case 12: +- args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_36BPP; +- break; +- case 16: +- args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_48BPP; +- break; ++ if (encoder_mode == ATOM_ENCODER_MODE_HDMI) { ++ switch (bpc) { ++ case 8: ++ default: ++ args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_24BPP; ++ break; ++ case 10: ++ args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_30BPP; ++ break; ++ case 12: ++ args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_36BPP; ++ break; ++ case 16: ++ args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_48BPP; ++ break; ++ } + } + args.v6.ucTransmitterID = encoder_id; + args.v6.ucEncoderMode = encoder_mode; diff --git a/queue-3.4/mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch b/queue-3.4/mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch new file mode 100644 index 00000000000..6eda747111d --- /dev/null +++ b/queue-3.4/mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch @@ -0,0 +1,49 @@ +From b7e460624f0f3c31150f3b09e75b0d009e22ba5f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 22 May 2014 14:56:52 +0200 +Subject: mtd: pxa3xx_nand: make the driver work on big-endian systems + +From: Thomas Petazzoni + +commit b7e460624f0f3c31150f3b09e75b0d009e22ba5f upstream. + +The pxa3xx_nand driver currently uses __raw_writel() and __raw_readl() +to access I/O registers. However, those functions do not do any +endianness swapping, which means that they won't work when the CPU +runs in big-endian but the I/O registers are little endian, which is +the common situation for ARM systems running big endian. + +Since __raw_writel() and __raw_readl() do not include any memory +barriers and the pxa3xx_nand driver can only be compiled for ARM +platforms, the closest I/o accessors functions that do endianess +swapping are writel_relaxed() and readl_relaxed(). + +This patch has been verified to work on Armada XP GP: without the +patch, the NAND is not detected when the kernel runs big endian while +it is properly detected when the kernel runs little endian. With the +patch applied, the NAND is properly detected in both situations +(little and big endian). + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Brian Norris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/nand/pxa3xx_nand.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/mtd/nand/pxa3xx_nand.c ++++ b/drivers/mtd/nand/pxa3xx_nand.c +@@ -93,10 +93,10 @@ + + /* macros for registers read/write */ + #define nand_writel(info, off, val) \ +- __raw_writel((val), (info)->mmio_base + (off)) ++ writel_relaxed((val), (info)->mmio_base + (off)) + + #define nand_readl(info, off) \ +- __raw_readl((info)->mmio_base + (off)) ++ readl_relaxed((info)->mmio_base + (off)) + + /* error code and state */ + enum { diff --git a/queue-3.4/series b/queue-3.4/series index 13a7f9493c7..aad2429b0a8 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -8,3 +8,5 @@ usb-ftdi_sio-fix-null-deref-at-port-probe.patch usb-gadget-f_fs-fix-null-pointer-dereference-when-there-are-no-strings.patch rt2x00-disable-tkip-on-usb.patch rt2x00-fix-rfkill-regression-on-rt2500pci.patch +mtd-pxa3xx_nand-make-the-driver-work-on-big-endian-systems.patch +drm-radeon-only-apply-hdmi-bpc-pll-flags-when-encoder-mode-is-hdmi.patch -- 2.47.3