From patchwork Tue Nov 22 00:37:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 83319 Delivered-To: patches@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1848626qge; Mon, 21 Nov 2016 16:37:37 -0800 (PST) X-Received: by 10.98.9.91 with SMTP id e88mr22114255pfd.72.1479775057788; Mon, 21 Nov 2016 16:37:37 -0800 (PST) Return-Path: Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com. [2607:f8b0:400e:c05::232]) by mx.google.com with ESMTPS id f17si25239886pgg.308.2016.11.21.16.37.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Nov 2016 16:37:37 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::232 as permitted sender) client-ip=2607:f8b0:400e:c05::232; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::232 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x232.google.com with SMTP id p66so988783pga.2 for ; Mon, 21 Nov 2016 16:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WVkdChIw70eoeSmSU8dtvEBruuPy4TycBBuBG9CYWXM=; b=ZVB2q3dLwHY/KJ8pW3tOujKjaq1QlN8pY7XRS1dEzt06bni/eaOR5QuKvc10AsG6A9 r3yg3NT7YO7+Yb0pDGmTPj4+bss0xa+NFdVVEzA5RI5pflLzJ20P3PrVvV/uIjAE7/XI LlFF1o9UgBjrpwQzdiJpHX3JlKVIGjGOCZpTI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WVkdChIw70eoeSmSU8dtvEBruuPy4TycBBuBG9CYWXM=; b=UR7MSv8xk0CCpKibfWaxWmx3PVCiqPIpS7YwSnBUXT5IDfhbnIXMft/EAMjOVF2sL6 J2JR8lAd2mqQqJ6T/Z7+mNxLh3EeLsO3XKCEST7DYUNa6GVq6+1NIo6wq0/MhIvuqvVb BTKqQM3k72GVXv9qabuxlA7DjTemnhJEg9r1X3Vz/Cmf8u/GbToh5bCfxkiUUo9r6Ueh mwlGGdvklFdKwaLKQkkgId876iOMuc6ko2T0XS051GktnbseXRBa5RLDU7Eh+OADLmMt c2qhaTW9pzcU131UO0eC7qrxA9HUUgyXILjrMKTCezT65B19MYG1Fp2YVu+/yGWGmagg 3o1A== X-Gm-Message-State: AKaTC03Di2hd85+I3NtZu0z3goxHTUY9nu9I44miziwXsfSiCjiCMegQGzD/M4JVw8Qa8sL99dw= X-Received: by 10.98.68.84 with SMTP id r81mr21791438pfa.174.1479775057269; Mon, 21 Nov 2016 16:37:37 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id u78sm38514933pfa.53.2016.11.21.16.37.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Nov 2016 16:37:36 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org Subject: [RFC][PATCH 2/3] drm/bridge: adv7511: Add 200ms delay on power-on Date: Mon, 21 Nov 2016 16:37:31 -0800 Message-Id: <1479775052-28194-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479775052-28194-1-git-send-email-john.stultz@linaro.org> References: <1479775052-28194-1-git-send-email-john.stultz@linaro.org> Secton 4.1 of the adv7511 programming guide advises one waits 200ms after powering on the chip before trying to communicate with it via i2c. Not doing so can cause reliability issues when probing the EDID. See: http://www.analog.com/media/en/technical-documentation/user-guides/ADV7511_Programming_Guide.pdf So this patch simply adds a 200ms sleep at the end of the power_on path. This greatly improves EDID probing reliabilty on hotplug with the HiKey device. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.7.4 diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index b240e05..2114a4c 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -361,6 +361,8 @@ static void __adv7511_power_on(struct adv7511 *adv7511) */ regcache_sync(adv7511->regmap); + msleep(200); + if (adv7511->type == ADV7533) adv7533_dsi_power_on(adv7511); }