From patchwork Thu Jun 4 18:04:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 6550821 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 98684C0020 for ; Fri, 5 Jun 2015 04:16:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94E93206D6 for ; Fri, 5 Jun 2015 04:16:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 16384206EC for ; Fri, 5 Jun 2015 04:16:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC6AD6EBFF; Thu, 4 Jun 2015 21:16:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by gabe.freedesktop.org (Postfix) with ESMTP id A7ED16EB80 for ; Thu, 4 Jun 2015 11:04:50 -0700 (PDT) Received: by igbzc4 with SMTP id zc4so14850726igb.0 for ; Thu, 04 Jun 2015 11:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=yW64Y5tILpdJgBjsqVUbE0ZcrCcYZ0pgmTztnXqgtvY=; b=QcLLeUvNqbp28iwl7OLt0cekA5Xyx02HLvwUfNYiYo9UvjBja0Wor3I1dnd7fdMwzU jKGdfO65Ok5AI0kHTSGXNQnm989C4pQdIkHkwGG4HwtTKEqy8qR+4+bCR5bPrV02pNbP bAo5aV74Mf8vgxWPhmRZI7ShzbxzOCTIFQjRw= 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; bh=yW64Y5tILpdJgBjsqVUbE0ZcrCcYZ0pgmTztnXqgtvY=; b=hycQhzLkv8KsVcNTJdBtzMLjyJ7zclBuDRBY9KLV6mtNa3Pa1BUcjvzb5+lk9AKdUZ 7KbwIfp9eNysfv3KZg5XFVvkd6vruwxVRCwbJS8f1sA9PzNfiJwTgB9Ccw5dNdxXBdMd YFylbROh3mak6FXCb43q2WvffEXrL+VGLpwLu3QG2vuMizThKApbYWsq+FMt8nyYjEwO qTufP48gIZnDGVTfnvJQ3EHs1Pmz9rjY8Cj8qFE2gUlgxetu7TS1OHQoTHsW5jkZfKo5 mqNW8LjY4OY0yvYD0GWXa8aBNtqRl58d+6uzPnuHnDL3yey6r5cdEnUOwecxh8tWDRZZ MrKg== X-Gm-Message-State: ALoCoQnFGIpRcPo/daV2e/Hum1IROh1ON52EX8Ipnvp3jAgsAgwrb6I8JZdHBsFAXe1pY9rSjLCT X-Received: by 10.43.56.146 with SMTP id wc18mr5884326icb.24.1433441090287; Thu, 04 Jun 2015 11:04:50 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id p196sm1649502iop.15.2015.06.04.11.04.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jun 2015 11:04:49 -0700 (PDT) From: Doug Anderson To: Philipp Zabel , Russell King , Thierry Reding Subject: [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes Date: Thu, 4 Jun 2015 11:04:36 -0700 Message-Id: <1433441076-20049-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-Mailman-Approved-At: Thu, 04 Jun 2015 21:16:06 -0700 Cc: fabio.estevam@freescale.com, Doug Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ykk@rock-chips.com, andy.yan@rock-chips.com 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The dw_hdmi_connector_get_modes() function accidentally forgets to return the number of modes it added, although it has this information stored in a local variable. Let's fix that. Without this fix, drm_helper_probe_single_connector_modes_merge_bits() could get confused and always call drm_add_modes_noedid(). That's not right. Signed-off-by: Doug Anderson --- drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 594f84c..816d104 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); struct edid *edid; - int ret; + int ret = 0; if (!hdmi->ddc) return 0; @@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector) dev_dbg(hdmi->dev, "failed to get edid\n"); } - return 0; + return ret; } static enum drm_mode_status