All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, David Airlie <airlied@linux.ie>,
	Archit Taneja <architt@codeaurora.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org,
	John Stultz <john.stultz@linaro.org>,
	Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Subject: [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
Date: Mon, 13 Nov 2017 13:56:37 +0100	[thread overview]
Message-ID: <20171113125622.429092050@linuxfoundation.org> (raw)
In-Reply-To: <20171113125615.304035578@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John Stultz <john.stultz@linaro.org>

commit 4226d9b127cf4758ba0e07931b3f0d59f1b1a50c upstream.

Thus this patch changes the EDID probing logic so that we
re-use the __adv7511_power_on/off() calls instead of duplciating
logic.

This does change behavior slightly as it adds the HPD signal
pulse to the EDID probe path, but Archit has had a patch to
add HPD signal pulse to the EDID probe path before, so this
should address the cases where that helped. Another difference
is that regcache_mark_dirty() is also called in the power off
path once EDID is probed.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-6-git-send-email-john.stultz@linaro.org
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -573,24 +573,13 @@ static int adv7511_get_modes(struct adv7
 	unsigned int count;
 
 	/* Reading the EDID only works if the device is powered */
-	if (!adv7511->powered) {
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN, 0);
-		if (adv7511->i2c_main->irq) {
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
-				     ADV7511_INT0_EDID_READY);
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
-				     ADV7511_INT1_DDC_ERROR);
-		}
-		adv7511->current_edid_segment = -1;
-	}
+	if (!adv7511->powered)
+		__adv7511_power_on(adv7511);
 
 	edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);
 
 	if (!adv7511->powered)
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN,
-				   ADV7511_POWER_POWER_DOWN);
+		__adv7511_power_off(adv7511);
 
 	kfree(adv7511->edid);
 	adv7511->edid = edid;

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Nhan Nguyen <nhan.nguyen.yb@renesas.com>,
	David Airlie <airlied@linux.ie>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	dri-devel@lists.freedesktop.org, stable@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
Date: Mon, 13 Nov 2017 13:56:37 +0100	[thread overview]
Message-ID: <20171113125622.429092050@linuxfoundation.org> (raw)
In-Reply-To: <20171113125615.304035578@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John Stultz <john.stultz@linaro.org>

commit 4226d9b127cf4758ba0e07931b3f0d59f1b1a50c upstream.

Thus this patch changes the EDID probing logic so that we
re-use the __adv7511_power_on/off() calls instead of duplciating
logic.

This does change behavior slightly as it adds the HPD signal
pulse to the EDID probe path, but Archit has had a patch to
add HPD signal pulse to the EDID probe path before, so this
should address the cases where that helped. Another difference
is that regcache_mark_dirty() is also called in the power off
path once EDID is probed.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-6-git-send-email-john.stultz@linaro.org
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -573,24 +573,13 @@ static int adv7511_get_modes(struct adv7
 	unsigned int count;
 
 	/* Reading the EDID only works if the device is powered */
-	if (!adv7511->powered) {
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN, 0);
-		if (adv7511->i2c_main->irq) {
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
-				     ADV7511_INT0_EDID_READY);
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
-				     ADV7511_INT1_DDC_ERROR);
-		}
-		adv7511->current_edid_segment = -1;
-	}
+	if (!adv7511->powered)
+		__adv7511_power_on(adv7511);
 
 	edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);
 
 	if (!adv7511->powered)
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN,
-				   ADV7511_POWER_POWER_DOWN);
+		__adv7511_power_off(adv7511);
 
 	kfree(adv7511->edid);
 	adv7511->edid = edid;


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-11-13 13:03 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
2017-11-16  4:09   ` Patrick Brünn
2017-11-16 13:35     ` Greg Kroah-Hartman
2017-11-16 13:35       ` Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init Greg Kroah-Hartman
2017-11-13 12:55   ` [4.9,08/87] " Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 29/87] libertas: fix improper return value Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance() Greg Kroah-Hartman
2017-11-13 12:55   ` [4.9,36/87] " Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 39/87] Input: mpr121 - set missing event capability Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 59/87] crypto: x86/sha256-mb " Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 66/87] MIPS: Fix CM region target definitions Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Greg Kroah-Hartman
2017-11-13 12:56   ` Greg Kroah-Hartman
2017-11-13 12:56 ` Greg Kroah-Hartman [this message]
2017-11-13 12:56   ` [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Greg Kroah-Hartman
2017-11-13 12:56   ` Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
2017-11-14 15:54   ` Pablo Neira Ayuso
2017-11-14 15:55     ` Pablo Neira Ayuso
2017-11-13 12:56 ` [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
2017-11-13 21:51 ` [PATCH 4.9 00/87] 4.9.62-stable review Shuah Khan
2017-11-13 22:28 ` Guenter Roeck
2017-11-14  6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
2017-11-14  7:41   ` Greg Kroah-Hartman
2017-11-14  7:41     ` Greg Kroah-Hartman
2017-11-14  7:46     ` Sebastian Gottschall
2017-11-14  8:01       ` Greg Kroah-Hartman
2017-11-14  8:01         ` Greg Kroah-Hartman
2017-11-14 22:20 ` [PATCH 4.9 00/87] 4.9.62-stable review Tom Gall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171113125622.429092050@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=john.stultz@linaro.org \
    --cc=lars@metafoo.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhan.nguyen.yb@renesas.com \
    --cc=stable@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.