Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4217198pxb; Tue, 10 Nov 2020 10:37:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwF3uUGqFtAH8F1SCiZB4Xe70LPThCK3+mjM2W8sQBxnh5BxNJTTbh9wS2UhfD3uxIeYp7n X-Received: by 2002:a05:6402:143:: with SMTP id s3mr710729edu.267.1605033467774; Tue, 10 Nov 2020 10:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605033467; cv=none; d=google.com; s=arc-20160816; b=agKfFuwDSYWjlQvc6GKNo2NVqXB1wd2uc0J24cpuD+Ya0S5D//U6wxtLnGPYhvNTgY C+TLo6fp9SWoYWBvnud8D1hS4um8hRUoJao8kIU3N10Fr85pvqjnDJxKNkKqM1Aqpa7c 3ti2yWt11GgvjZS2tzbXLMTjKufO6UbxQmX282KGaRLFee1oLD806kzoO6mHia5PoICA lVKiwsaNGRvoy5jY30B1ZVPDSJohenMvLebK2qP3HPKWUNqiwWXp/XCQ3Y1OyVDcneeO LGmP/cRKMqIUKJc5eW3Z8GX7pHtlKwDgTzNVetiUbuHVJjGaHjgaIE9zz+TKCBlBXzyQ DA5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fkc0ycbUoUtG+FjZeVMynAGeVGfFXsGCK1nH0SmgLw8=; b=mwGnPvjLHkD0elQpiqdScTulHl21q2jEdXbRGWBlfl2FfBI/JmXuc7YFidApl+A6PL CqaTswP7qnrzS6LMIEThHPOPi3GGvR1wMLie2Nx2ZD5/SN5Yd3Ne5racBHr3IlbP8nO9 iwLiR2fDD0z3LYCT1axXU1bKW/iMOdMjhAL0b/zQqLA+xtgXfSPgrittETuRQktFl4ER W/a3rTQvqRcHkIY8DyLjCknD5SsVVCHwekN/AKwDmjb9SxUJ0/g/Xhq8MBRtjS2LMqz6 IB2C/rM6+dFMzdWgfj4HQjWOSSAEU7YYQCOvSaOtqgNYfBdQWw5+e410AOHpYmxSS6cf LViw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GnGrGl8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n2si7266368ejr.580.2020.11.10.10.37.23; Tue, 10 Nov 2020 10:37:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GnGrGl8n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730859AbgKJSft (ORCPT + 99 others); Tue, 10 Nov 2020 13:35:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730705AbgKJSfs (ORCPT ); Tue, 10 Nov 2020 13:35:48 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3028DC0613D1 for ; Tue, 10 Nov 2020 10:35:48 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id 10so4200444wml.2 for ; Tue, 10 Nov 2020 10:35:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fkc0ycbUoUtG+FjZeVMynAGeVGfFXsGCK1nH0SmgLw8=; b=GnGrGl8ndYX01vNQKIrlc8zSj69FGGJXTLXD7M3TAAt8RH+ROZUTNu+3vHZsgC59Tn BRRCF0o+A3dsav5WV3VHNRsqFwNyRkKL6rqcYYgg0bOlDdiL4KMs4o7DwxGN0lufrMZV 1NWEJcTF3zCLZ/oSPDMqbsBV/RsZg6xLh2h3xj4oZHd/rTwmUfWHfIUGRF/E82cwW6+c XTUuPzPb3L12eXh3yT1X2sg56SXh5Jb12PgZKq5NStypmLmDIlEQyT6UoQJfEdYYp1Lf LEXkIWBxfxECp++Fyyr3o9j3BomLmLdNs7DCpG4qsHaJyA6P8ENyZuAl/1BR2h8zua1n elKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fkc0ycbUoUtG+FjZeVMynAGeVGfFXsGCK1nH0SmgLw8=; b=hybznwVexb7tyK0s9hT5DREO3gQ55zuE9IaNJAa/iQYhoNgQOfXc38o0wcgadYXafB ud2Pw8fGeJBqfmhYqLsSPXF6D/1iPGEMnQt+WV1/hkdT2iKfLT1hiMAgeaMy95HQYFWF Zu0hS09RfMOMEyjwYwtED7ivjrC5CtO7ir9LXtZomMaKT6ui4jc/6uoQ31kyEL0s7aEK 2kDz4tA9/yzoDS41mRNXsDuzSZUHxFcoLjciuae4L3Hwt2SkQD/DJD8WoJ5y6jeVk+xl RGpZTPG58VcRpO9nIBO6FQRxWbou5jr+JJIa1VG/TKbP3DhBMbypckz3SIzdvgsYSm5T baXg== X-Gm-Message-State: AOAM530ofQjFcAx6HCmvzM8Cabgn0ZiOJh1SHLvgRO43Zb00xZO3tpSK 8kQwgeSet5sk/j39B+WH3qxkQxnsbSNYDfUD0Wc= X-Received: by 2002:a1c:46c6:: with SMTP id t189mr463104wma.79.1605033346841; Tue, 10 Nov 2020 10:35:46 -0800 (PST) MIME-Version: 1.0 References: <20201110080318.36305-1-bernard@vivo.com> <2fcfe666-3c83-17ad-f287-6a1801268285@amd.com> In-Reply-To: <2fcfe666-3c83-17ad-f287-6a1801268285@amd.com> From: Alex Deucher Date: Tue, 10 Nov 2020 13:35:35 -0500 Message-ID: Subject: Re: [PATCH] amd/display/amdgpu_dm: delete same check in if condition To: Harry Wentland Cc: Bernard Zhao , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , Nicholas Kazlauskas , Rodrigo Siqueira , Mikita Lipski , Stylon Wang , Bhawanpreet Lakha , Roman Li , hersen wu , Aurabindo Pillai , Alexander Monakov , amd-gfx list , Maling list - DRI developers , LKML , opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Tue, Nov 10, 2020 at 9:13 AM Harry Wentland wrote: > > On 2020-11-10 3:03 a.m., Bernard Zhao wrote: > > In function amdgpu_dm_connector_get_modes, drm_edid_is_valid > > will check weather (!edid), no need to check again in the if > > branch. > > > > Signed-off-by: Bernard Zhao > > Reviewed-by: Harry Wentland > > Harry > > > --- > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > > index e93e18c06c0e..0a283d07fe10 100644 > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > > @@ -6352,7 +6352,7 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector) > > > > encoder = amdgpu_dm_connector_to_encoder(connector); > > > > - if (!edid || !drm_edid_is_valid(edid)) { > > + if (!drm_edid_is_valid(edid)) { > > amdgpu_dm_connector->num_modes = > > drm_add_modes_noedid(connector, 640, 480); > > } else { > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx