From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3AD6C433E6 for ; Tue, 1 Sep 2020 09:46:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AEF22087D for ; Tue, 1 Sep 2020 09:46:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="Q98wE3cD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AEF22087D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF00389C6B; Tue, 1 Sep 2020 09:46:10 +0000 (UTC) Received: from mail29.static.mailgun.info (mail29.static.mailgun.info [104.130.122.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id E39D689C55 for ; Tue, 1 Sep 2020 09:46:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1598953569; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=b2eZhuFSLo8S06dwvehEezfz44wgJ9E7gdBWdQThQNc=; b=Q98wE3cDVWHDyMim2ykccKi0fVTIWvbW+q3A80BJYx4AIbALUchgP0hC2Q2TuYcSEXllm0BY +dmzhyWTcKyTn5j2M5DJf7fys6ixy6Uz9OZMEq/bw1JrJl8vQkXn49IpgQM8C6WaA7hoibUZ 1ZGo1i962F3iNKCQbLvd0+X6/P8= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyJkOTU5ZSIsICJkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5f4e184673afa3417e732cb1 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 01 Sep 2020 09:45:42 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 33D4BC433AF; Tue, 1 Sep 2020 09:45:41 +0000 (UTC) Received: from [192.168.1.16] (unknown [61.1.231.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak) by smtp.codeaurora.org (Postfix) with ESMTPSA id 42FFAC433CB; Tue, 1 Sep 2020 09:45:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 42FFAC433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=rnayak@codeaurora.org Subject: Re: [PATCH V2 3/8] drm/msm: Unconditionally call dev_pm_opp_of_remove_table() To: Viresh Kumar References: <6e4110032f8711e8bb0acbeccfe66dec3b09d5c1.1598594714.git.viresh.kumar@linaro.org> <20200901083806.a2wz7idmfce2aj3a@vireshk-i7> From: Rajendra Nayak Message-ID: Date: Tue, 1 Sep 2020 15:15:33 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200901083806.a2wz7idmfce2aj3a@vireshk-i7> Content-Language: en-US X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , freedreno@lists.freedesktop.org, saiprakash.ranjan@codeaurora.org, Vincent Guittot , linux-pm@vger.kernel.org, Stephen Boyd , linux-arm-msm@vger.kernel.org, Naresh Kamboju , Rafael Wysocki , Douglas Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sean Paul Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 9/1/2020 2:08 PM, Viresh Kumar wrote: > On 01-09-20, 13:01, Rajendra Nayak wrote: >> So FWIU, dpu_unbind() gets called even when dpu_bind() fails for some reason. > > Ahh, I see. > >> I tried to address that earlier [1] which I realized did not land. > > I don't think that patch was required, as you can call > dev_pm_opp_put_clkname() multiple times and it will return without any > errors/crash. We did see a crash (Sai had reported it), perhaps with dsi [1] and not this driver. But it was the same scenario that was possible here as well, which is dev_pm_opp_put_clkname() getting called without dev_pm_opp_set_clkname() being done. I think we ended up passing a NULL as opp_table in that case and the function tries de-referencing it. > >> But with these changes >> it will be even more broken unless we identify if we failed dpu_bind() before >> adding the OPP table, while adding it, or all went well with opps and handle things >> accordingly in dpu_unbind. > > Maybe not as dev_pm_opp_of_remove_table() can be called multiple times > as well without any errors or crash. Can it be called without the driver ever doing a dev_pm_opp_of_add_table()? [1] https://lore.kernel.org/patchwork/patch/1275628/ -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel