From patchwork Tue Sep 5 12:10:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars-Peter Clausen X-Patchwork-Id: 9938547 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2E61B6038C for ; Tue, 5 Sep 2017 12:28:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2036427E5A for ; Tue, 5 Sep 2017 12:28:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1544F28938; Tue, 5 Sep 2017 12:28:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 675AF28917 for ; Tue, 5 Sep 2017 12:28:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 914426E18B; Tue, 5 Sep 2017 12:28:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1065 seconds by postgrey-1.35 at gabe; Tue, 05 Sep 2017 12:28:12 UTC Received: from www381.your-server.de (www381.your-server.de [78.46.137.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8158B6E18B for ; Tue, 5 Sep 2017 12:28:12 +0000 (UTC) Received: from [78.47.166.52] (helo=sslproxy04.your-server.de) by www381.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dpCgS-0006Ql-1G; Tue, 05 Sep 2017 14:10:24 +0200 Received: from [2003:86:2c30:3400:8200:bff:fe9b:6612] (helo=lars-laptop.ad.analog.com) by sslproxy04.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-GCM-SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dpCgR-0001hA-PJ; Tue, 05 Sep 2017 14:10:23 +0200 From: Lars-Peter Clausen To: Archit Taneja , Andrzej Hajda , Laurent Pinchart Subject: [PATCH 1/4] drm/bridge: adv7511: Properly update EDID when no EDID was found Date: Tue, 5 Sep 2017 14:10:15 +0200 Message-Id: <20170905121018.11477-1-lars@metafoo.de> X-Mailer: git-send-email 2.11.0 X-Authenticated-Sender: lars@metafoo.de X-Virus-Scanned: Clear (ClamAV 0.99.2/23775/Tue Sep 5 10:37:03 2017) Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently adv7511_get_modes() bails out early when no EDID could be retrieved. This leaves the previous EDID in place, which is typically not the intended behavior and might confuse applications. Instead the EDID should be cleared when no EDID could be retrieved. All functions that are called after the EDID check handle the case where the EDID is NULL just fine and exhibit the expected behavior, so just drop the check. Signed-off-by: Lars-Peter Clausen Tested-by: John Stultz --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index b2431aee7887..fb8f4cd29e15 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -591,8 +591,6 @@ static int adv7511_get_modes(struct adv7511 *adv7511, kfree(adv7511->edid); adv7511->edid = edid; - if (!edid) - return 0; drm_mode_connector_update_edid_property(connector, edid); count = drm_add_edid_modes(connector, edid);