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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_SANE_2 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 0C2ECC3B197 for ; Fri, 14 Feb 2020 08:35:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 8F3A624650 for ; Fri, 14 Feb 2020 08:35:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="slslcnUg"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MwkIo877" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F3A624650 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C36B4165F; Fri, 14 Feb 2020 09:34:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C36B4165F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581669308; bh=YVIhQ12c+UbvI9zfOZkY7H3zz6zQxsD3ebSbHPjSUH8=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=slslcnUg1tPFuZ9rDGuZNXJNV/B2ZWezZCPBHDw1sml2ADIIdsyt1izpFcjsqW+0R EKlXoxwlBcFmic1zNwYq3jh4nkNzlMNRcwe7Eq2TKwdB7dY3gCqdBDikTW0zpgtKKD R7p2j+swAVXrQ/Qxh5jfLQybjUpquBOJnNSs4MFw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3DEA5F80086; Fri, 14 Feb 2020 09:34:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CE09F8014F; Fri, 14 Feb 2020 09:34:16 +0100 (CET) Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by alsa1.perex.cz (Postfix) with ESMTP id 5AA9FF800F0 for ; Fri, 14 Feb 2020 09:34:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5AA9FF800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MwkIo877" X-UUID: 100062a256fe42a9903d11c14f3fc318-20200214 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=o2bK0SZqMI85CjEk1N9bVcxZhc8pa2z/qRl3UsDcAX4=; b=MwkIo877uq5osuuY4vE5I56SN405iwpxerDFPZQj8b7xxan1QkfejKJ77wFjLWYaL+4A23N6ENoePZGvaPu/DflRrI81NR4MkU/OYXIf9vbcaA3TfIPt0a3wlgRgryTy5RifST2UYbXHFBranzKvm/VqpgCokT3UuuyYrTDrSFw=; X-UUID: 100062a256fe42a9903d11c14f3fc318-20200214 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 167469310; Fri, 14 Feb 2020 16:34:05 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 16:34:03 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 14 Feb 2020 16:32:12 +0800 Message-ID: <1581669243.29925.13.camel@mtksdaap41> From: CK Hu To: Tzung-Bi Shih Date: Fri, 14 Feb 2020 16:34:03 +0800 In-Reply-To: References: <20200213153226.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid> <1581664042.20487.4.camel@mtksdaap41> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E4F804774C418372C14AAF9660D005786F5B43F8F573AC6B89DAE76E13F0C79D2000:8 X-MTK: N Cc: ALSA development , p.zabel@pengutronix.de, David Airlie , dri-devel@lists.freedesktop.org, Mark Brown , linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger , Dylan Reid , linux-arm-kernel@lists.infradead.org, Jimmy Cheng-Yi Chiang Subject: Re: [alsa-devel] [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi, Tzung-Bi: On Fri, 2020-02-14 at 15:35 +0800, Tzung-Bi Shih wrote: > On Fri, Feb 14, 2020 at 3:07 PM CK Hu wrote: > > I think sound driver could be removed for some reason, and fn should be > > set to NULL before sound driver removed. In this case, codec_dev != NULL > > and fn == NULL. > > No..if you see sound/soc/codecs/hdmi-codec.c, plugged_cb is statically > allocated. It looks like that even though sound driver is removed, hdmi driver would still callback to sound core. This is so weird. After sound driver is removed, hdmi driver would callback with codec_dev which is invalid. I think this may cause some problem. Regards, CK _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel 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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 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 1BD2BC2BA83 for ; Fri, 14 Feb 2020 08:45:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DFFE72187F for ; Fri, 14 Feb 2020 08:45:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nCgV7RIy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MwkIo877" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFFE72187F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A+rw2x2xbuwIg8e2SJPIjDAgLDn9hSencTCS6t5jFrc=; b=nCgV7RIyWUEp6H dZ2kTlevpCUThwjNgtYmh2qQM+WZzdSt766qMIDTv+D9gJr1JJFSeeIlLCpjCAxFFMrxuNQcsBDdM 9ShoGt3X7zdsRGt4Dkh2ihyS6tqWOYxH9qVIqr0MkTz7+z+1tLQH+nVq+xPdsO2p6OxTlxn//KJB4 JtitKtvuXuCjMhHL5Z78WrureXIPoQh2GMCDdKPprxXPpAURhatrAidSftUDjpOPQz/qgcJO6Rmm8 tgIFae/muuVF6jRtAhkzRHTwjGhxvYqa06LkH1PrgKlr5oCNdKIauGffm+0nnsx5D+ObTC1kJBFy4 dBkp9h51CwBtLKApW26w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2Wag-0007JV-Uy; Fri, 14 Feb 2020 08:44:50 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2Wa4-0006XA-08; Fri, 14 Feb 2020 08:44:13 +0000 X-UUID: 67a1e62cd7a1428f858d80b00c1b2bea-20200214 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=o2bK0SZqMI85CjEk1N9bVcxZhc8pa2z/qRl3UsDcAX4=; b=MwkIo877uq5osuuY4vE5I56SN405iwpxerDFPZQj8b7xxan1QkfejKJ77wFjLWYaL+4A23N6ENoePZGvaPu/DflRrI81NR4MkU/OYXIf9vbcaA3TfIPt0a3wlgRgryTy5RifST2UYbXHFBranzKvm/VqpgCokT3UuuyYrTDrSFw=; X-UUID: 67a1e62cd7a1428f858d80b00c1b2bea-20200214 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 696231823; Fri, 14 Feb 2020 00:44:07 -0800 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 00:34:19 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 16:34:03 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 14 Feb 2020 16:32:12 +0800 Message-ID: <1581669243.29925.13.camel@mtksdaap41> Subject: Re: [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting From: CK Hu To: Tzung-Bi Shih Date: Fri, 14 Feb 2020 16:34:03 +0800 In-Reply-To: References: <20200213153226.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid> <1581664042.20487.4.camel@mtksdaap41> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E4F804774C418372C14AAF9660D005786F5B43F8F573AC6B89DAE76E13F0C79D2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200214_004412_085462_2CBCF95C X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ALSA development , p.zabel@pengutronix.de, David Airlie , dri-devel@lists.freedesktop.org, Mark Brown , linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger , Dylan Reid , linux-arm-kernel@lists.infradead.org, Jimmy Cheng-Yi Chiang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, Tzung-Bi: On Fri, 2020-02-14 at 15:35 +0800, Tzung-Bi Shih wrote: > On Fri, Feb 14, 2020 at 3:07 PM CK Hu wrote: > > I think sound driver could be removed for some reason, and fn should be > > set to NULL before sound driver removed. In this case, codec_dev != NULL > > and fn == NULL. > > No..if you see sound/soc/codecs/hdmi-codec.c, plugged_cb is statically > allocated. It looks like that even though sound driver is removed, hdmi driver would still callback to sound core. This is so weird. After sound driver is removed, hdmi driver would callback with codec_dev which is invalid. I think this may cause some problem. Regards, CK _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 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 04009C2BA83 for ; Fri, 14 Feb 2020 08:44:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B9AF62187F for ; Fri, 14 Feb 2020 08:44:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mDZwdpd3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MwkIo877" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9AF62187F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rYzpNYeVvkU4JkXeWcp19ahpnArTnpE0FAVURyYdVQ4=; b=mDZwdpd3/9L+7w xuleE83ULn7cn+GUyVOLg0ys56wcmCxg96AO37MSRNtVBpbvV8LabjZal2ansEQ+MCg56RqgE7BKg admIoeoj1Ay/J7imIyC7XD9rQnk39yLeEa2zngNFq8UJ7BCqjeycMXOnq+XEHCqlVjN1UlVGOlrnQ hjsjvO6VIRXWITIsvy03zHS5H7rtNA/xJcC0XuDS+jlxCmEeKz82/PQ4+4R1cO7MoY6fPxUD/zJqv n9bbYjbzn0RhocazOjj/wmtvmSCIrelR60BSuDAuUPdk2ex/v55W1hbs6YD/mAgZKA80Iu9jtPqCO rghJ2hEbc9WYLzELAkvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2WaW-00076g-Eg; Fri, 14 Feb 2020 08:44:40 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2Wa4-0006XA-08; Fri, 14 Feb 2020 08:44:13 +0000 X-UUID: 67a1e62cd7a1428f858d80b00c1b2bea-20200214 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=o2bK0SZqMI85CjEk1N9bVcxZhc8pa2z/qRl3UsDcAX4=; b=MwkIo877uq5osuuY4vE5I56SN405iwpxerDFPZQj8b7xxan1QkfejKJ77wFjLWYaL+4A23N6ENoePZGvaPu/DflRrI81NR4MkU/OYXIf9vbcaA3TfIPt0a3wlgRgryTy5RifST2UYbXHFBranzKvm/VqpgCokT3UuuyYrTDrSFw=; X-UUID: 67a1e62cd7a1428f858d80b00c1b2bea-20200214 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 696231823; Fri, 14 Feb 2020 00:44:07 -0800 Received: from MTKMBS06N2.mediatek.inc (172.21.101.130) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 00:34:19 -0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 16:34:03 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 14 Feb 2020 16:32:12 +0800 Message-ID: <1581669243.29925.13.camel@mtksdaap41> Subject: Re: [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting From: CK Hu To: Tzung-Bi Shih Date: Fri, 14 Feb 2020 16:34:03 +0800 In-Reply-To: References: <20200213153226.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid> <1581664042.20487.4.camel@mtksdaap41> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E4F804774C418372C14AAF9660D005786F5B43F8F573AC6B89DAE76E13F0C79D2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200214_004412_085462_2CBCF95C X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ALSA development , p.zabel@pengutronix.de, David Airlie , dri-devel@lists.freedesktop.org, Mark Brown , linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger , Dylan Reid , linux-arm-kernel@lists.infradead.org, Jimmy Cheng-Yi Chiang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Tzung-Bi: On Fri, 2020-02-14 at 15:35 +0800, Tzung-Bi Shih wrote: > On Fri, Feb 14, 2020 at 3:07 PM CK Hu wrote: > > I think sound driver could be removed for some reason, and fn should be > > set to NULL before sound driver removed. In this case, codec_dev != NULL > > and fn == NULL. > > No..if you see sound/soc/codecs/hdmi-codec.c, plugged_cb is statically > allocated. It looks like that even though sound driver is removed, hdmi driver would still callback to sound core. This is so weird. After sound driver is removed, hdmi driver would callback with codec_dev which is invalid. I think this may cause some problem. Regards, CK _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_SANE_2 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 0F6B0C2BA83 for ; Fri, 14 Feb 2020 08:34:12 +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 D07C520873 for ; Fri, 14 Feb 2020 08:34:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="MwkIo877" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D07C520873 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com 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 2C1C66F8BB; Fri, 14 Feb 2020 08:34:11 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by gabe.freedesktop.org (Postfix) with ESMTP id AB5056F8B2 for ; Fri, 14 Feb 2020 08:34:09 +0000 (UTC) X-UUID: 100062a256fe42a9903d11c14f3fc318-20200214 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=o2bK0SZqMI85CjEk1N9bVcxZhc8pa2z/qRl3UsDcAX4=; b=MwkIo877uq5osuuY4vE5I56SN405iwpxerDFPZQj8b7xxan1QkfejKJ77wFjLWYaL+4A23N6ENoePZGvaPu/DflRrI81NR4MkU/OYXIf9vbcaA3TfIPt0a3wlgRgryTy5RifST2UYbXHFBranzKvm/VqpgCokT3UuuyYrTDrSFw=; X-UUID: 100062a256fe42a9903d11c14f3fc318-20200214 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 167469310; Fri, 14 Feb 2020 16:34:05 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 14 Feb 2020 16:34:03 +0800 Received: from [172.21.77.4] (172.21.77.4) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 14 Feb 2020 16:32:12 +0800 Message-ID: <1581669243.29925.13.camel@mtksdaap41> Subject: Re: [PATCH] drm/mediatek: fix race condition for HDMI jack status reporting From: CK Hu To: Tzung-Bi Shih Date: Fri, 14 Feb 2020 16:34:03 +0800 In-Reply-To: References: <20200213153226.I477092c2f104fd589133436c3ae4590e6fc6323b@changeid> <1581664042.20487.4.camel@mtksdaap41> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E4F804774C418372C14AAF9660D005786F5B43F8F573AC6B89DAE76E13F0C79D2000:8 X-MTK: N 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: ALSA development , David Airlie , dri-devel@lists.freedesktop.org, Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Dylan Reid , linux-arm-kernel@lists.infradead.org, Jimmy Cheng-Yi Chiang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Tzung-Bi: On Fri, 2020-02-14 at 15:35 +0800, Tzung-Bi Shih wrote: > On Fri, Feb 14, 2020 at 3:07 PM CK Hu wrote: > > I think sound driver could be removed for some reason, and fn should be > > set to NULL before sound driver removed. In this case, codec_dev != NULL > > and fn == NULL. > > No..if you see sound/soc/codecs/hdmi-codec.c, plugged_cb is statically > allocated. It looks like that even though sound driver is removed, hdmi driver would still callback to sound core. This is so weird. After sound driver is removed, hdmi driver would callback with codec_dev which is invalid. I think this may cause some problem. Regards, CK _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel