Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp645532rdb; Wed, 17 Jan 2024 12:50:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEb3aNC4ZqIYgLUnC7LjvSDA8aNUk/wufmNirUbUedtpETU1lfzMCgIT6NYjJPSqYp0Zequ X-Received: by 2002:a05:600c:2282:b0:40e:4ab2:cd75 with SMTP id 2-20020a05600c228200b0040e4ab2cd75mr4920732wmf.74.1705524610907; Wed, 17 Jan 2024 12:50:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705524610; cv=pass; d=google.com; s=arc-20160816; b=WnN2KQxTam/treJB5bNh3MS1RbUqutyPrG8jgTfoNd9nsF6/tHZEXbQOBkI8bb019m WDEoiWBn48+M6RhqcFtOJJBRd+3eS+AKGFK4PlVbYl1/DOVIGjg9Sw7XMMzL2M10+Kva Yt4yjm5sb6+7bSQBnbvVwdpZhNJUkAlznLIS4zL/vcK/S1A0w3dE46LHd/JVPxBMiqgY Eami2nXWr4aMQLBdiXuAESALKM+jkShI41UcOJGjGDBU1UHKnvQTrwyE15A4hqRRtXvL xyEJUGC1PfZb/NTl3rqv1bgRrqdDOt2tBbPsVCIk4UYFYKhU5rfK0k8exkxCuetWqNdv RBEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=oOgLjW6oMidNjG/VSGLYhyD5eLZJxjjB9wMU1cNUdUY=; fh=8aOobWCyRxqDhMJTU5GxuR+eSdfJehe/KBaaxMffuBw=; b=Ljqvya/ol6LH15oyBK1HeqL+k8D8AjeImW7GqS1IrmSOab00BZoiAIv9/lfujWeGeJ P0JFmz9OxhYbhJrxQ6fhnvzOqS9fMxd90iYESu3U9krNnqH73Tv22BJ4jjmcaOt9MhRs Oc7kMGF2cKNwmTQYNr0X6S7HJgOJ2ZOGimlQoaUbY1UhrIpAeaSlBVq8qzteZAue0thf 9jF5yQCHPnJlSj1t0DaWvCho/vMqveebYHRlagcEB7JlB5JPnoIH3HeEUGKY3qcxvPy6 BNlx5bbCZkkcMtTaFCTWo0fCG9qXTawE4pzMN12QWP74Ecazuj6eoyyedhPwucD3c+t3 FCCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y2SQHTgP; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-29435-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fi27-20020a056402551b00b005597fd1b883si2059498edb.692.2024.01.17.12.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 12:50:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29435-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y2SQHTgP; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-29435-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29435-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8F82D1F23387 for ; Wed, 17 Jan 2024 20:50:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD41A25108; Wed, 17 Jan 2024 20:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="y2SQHTgP" Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com [209.85.219.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85FEB250F0 for ; Wed, 17 Jan 2024 20:50:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705524601; cv=none; b=rqliAm6eDCo0uI51GXBVlw+FzEudnmYHOPPZEW9hmvPpmQay0XVtBZHcg/Ekti3g4pOeYq7IiL69bqt4n6oHyB4Pw6ewZmt8eUthw+T3BbYUhqtM81Kz9a323inIUaN1ccqb6lvGc4ZsUZjZFnSYr0Exa8pw650wofBzw9ALkp0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705524601; c=relaxed/simple; bh=20iD6OBjlb6cJ7O/ya75A9onZtg0SMq1KOfKJJTL9zU=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version: References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc: Content-Type; b=rKpSFXsc8UFCxzlATCDHj5U8SzdSerWnbID4mvdMiRXzjEsdkc0KPBT3x7cCeuE46GxOBfxJN1mqbT72LP9CMItMnrR3Snu9qSbaFJrCrA7KM8kgKdITbystBh4eeZXylZ35tdZYOt2BvjhyycpZtEVksAKxHKLIDC5oIgW2foo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=y2SQHTgP; arc=none smtp.client-ip=209.85.219.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f182.google.com with SMTP id 3f1490d57ef6-dc239f84ba4so1277995276.3 for ; Wed, 17 Jan 2024 12:50:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705524599; x=1706129399; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oOgLjW6oMidNjG/VSGLYhyD5eLZJxjjB9wMU1cNUdUY=; b=y2SQHTgPPueV+bhIQv98unXOrXpsQhQazJd0GmJeAtJY3shDfvbxqOfpRZ14vF11hI FT6R7DtCPKVEzyFldQFAtDRap11y9nl/g8ra8oQqVLETQ1SP5ak3RstOb5gIKCh8CPeO w8oUeqH8I8Z53SsD4G7b9kM90xRdoWFUIkMScJn2GhSWeTh8d+jcjVHbgiCVyA0AUs4D bC+BlTqdJu1E14zHH6EGH0riI3by/7QpYC6Wsob0tfFL2MAZs4keyXrsuGP1nbXU8wjK YyGraG9cjbf0JhsGYcxaAa54R0sskVQ9msaY4OI7mODIiOSKihcHIvGbqE4o8yK4+dsj Rblw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705524599; x=1706129399; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oOgLjW6oMidNjG/VSGLYhyD5eLZJxjjB9wMU1cNUdUY=; b=mg6/jcuGnLzg/2RJBZTl6sJEh4GHt3iNztZQgYQI+NE4HUpJ8myuiAm7VQM8lPUGr1 Qnd9jaKhm6prXocsqaEeH9tGiKxEXr/FbwosJOxw6AwMeiwuIrU8lgN8oaFJ+/qM1dt3 /0GcXN0z2djqRnB1IHGNgibZSfFbxji9BQz/LQ0gApNu1gJKBfuCmNXe3d4PqANenHKp WMQXa7CAkEuDL4P9EDFIneRZRCtrCSVH57QW9+mtzAYXSM2BfFTP7iyUYnuZOKw2t8DK mmfbu+FLYAkYd7zdDo7ZLgum2zO/EVNYrDl/qKlIXgVM3oR5D7eYRDFzjViwRFJNAKCo nU7Q== X-Gm-Message-State: AOJu0Yz8HJp+Nszrv/KSVnJ5RI5OvJqzTxMqhP2B+vPKnLkalE/vlwZM C+QX+ss7NH/jCuQ8L18hpwR/aasgzcP7Dj6zvHMjUCwckmYLyA== X-Received: by 2002:a25:b187:0:b0:dc2:4cf5:abf7 with SMTP id h7-20020a25b187000000b00dc24cf5abf7mr743558ybj.101.1705524599463; Wed, 17 Jan 2024 12:49:59 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240117194109.21609-1-quic_abhinavk@quicinc.com> In-Reply-To: <20240117194109.21609-1-quic_abhinavk@quicinc.com> From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 22:49:48 +0200 Message-ID: Subject: Re: [PATCH] drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup To: Abhinav Kumar Cc: freedreno@lists.freedesktop.org, Rob Clark , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, seanpaul@chromium.org, quic_jesszhan@quicinc.com, dan.carpenter@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Wed, 17 Jan 2024 at 21:41, Abhinav Kumar wrote: > > The commit 8b45a26f2ba9 ("drm/msm/dpu: reserve cdm blocks for writeback > in case of YUV output") introduced a smatch warning about another > conditional block in dpu_encoder_helper_phys_cleanup() which had assumed > hw_pp will always be valid which may not necessarily be true. > > Lets fix the other conditional block by making sure hw_pp is valid > before dereferencing it. > > Reported-by: Dan Carpenter > Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to reset the encoder related hw blocks") > Signed-off-by: Abhinav Kumar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry