Message ID | 20230425070330.8520-1-jammy_huang@aspeedtech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3227434vqo; Tue, 25 Apr 2023 00:26:41 -0700 (PDT) X-Google-Smtp-Source: AKy350byM/SjAFSNxpoJNoatM9GhaTX6kCC2z1gySNlbkXhgVFgNYrIqyrdtnYVuisk3D0hXIjA/ X-Received: by 2002:a17:903:24e:b0:19d:778:ff5 with SMTP id j14-20020a170903024e00b0019d07780ff5mr20494943plh.15.1682407601418; Tue, 25 Apr 2023 00:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682407601; cv=none; d=google.com; s=arc-20160816; b=vc/D4Nizu28CmGXJO3uikBDJtmH8j2dV2Lejwv06w3zSBnoQXBrdtfagA9OcqvtVol zHq1IXYMONr63eIHns9vTI/2CvXJdo4qce50xzq6Nr4dINDwnIwSfn126hJ6BV/iXl3T XAXtX0ytoW+BYhnDrKUxr2LYrkFZsl+W0fEolomU7JvqzrAUz+b8JtNykkG9SDhRaZdk 66FLpaUVetkYnaCyZ+vYAbxywnUNJhnMfo83ryyLDiCxFWVbyn8p1b46/3k0aUKeEpI2 XgWvZO0jaJsdgPdHLuZdcvHTqITOZ3hbu0oOoTOSM2HTN/FXn/WpJ24eeh6+xGd3R9sp Fezw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QIX4jh2uJicd+VaKcUfqiyhQEOvv6IDgsC8khpM8efs=; b=fn8mSERBdbn0Sdk8aJTP4BFm66skk2cz2GE0cPsr9JEdUNJyBGtqXCIeyJbb59qEwB sZWTytJfvvsy+hkkAmqLjm8sHQTZ0syh0KxcDCjkxajrr0IX2UEKNpQUJw5iBrTJYCK6 9wU5GMO1QXJCZDQTdS6l0Pp/BA1AG5jPCFMpqZ4OukBKGicZCpzI/RKD8wJph71OTYVG 9ITmYQmocj/w3yoRvJ0RyjxMyOabNNQVnCinA0rhUaXk0oEc6K3L2j7qeQf5fF1PPZ4J 7S2nqcs8a4UZ8SV4CWqte0bppE5dV88VdXGqxyYKcCQAcD/JPU69pK1f7/51Ic5iLz4R 0YOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o2-20020a1709026b0200b0019a9f8bdba0si12326572plk.62.2023.04.25.00.26.26; Tue, 25 Apr 2023 00:26:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbjDYHEQ (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Tue, 25 Apr 2023 03:04:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233311AbjDYHEN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Apr 2023 03:04:13 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086B34ED5 for <linux-kernel@vger.kernel.org>; Tue, 25 Apr 2023 00:04:10 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 33P6kpTP054710; Tue, 25 Apr 2023 14:46:51 +0800 (GMT-8) (envelope-from jammy_huang@aspeedtech.com) Received: from JammyHuang-PC.aspeed.com (192.168.2.115) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 25 Apr 2023 15:03:32 +0800 From: Jammy Huang <jammy_huang@aspeedtech.com> To: <airlied@redhat.com>, <tzimmermann@suse.de> CC: <airlied@gmail.com>, <daniel@ffwll.ch>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH] drm/ast: Fix modeset failed on DisplayPort Date: Tue, 25 Apr 2023 15:03:30 +0800 Message-ID: <20230425070330.8520-1-jammy_huang@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.115] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 33P6kpTP054710 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764132233053534122?= X-GMAIL-MSGID: =?utf-8?q?1764132233053534122?= |
Series |
drm/ast: Fix modeset failed on DisplayPort
|
|
Commit Message
Jammy Huang
April 25, 2023, 7:03 a.m. UTC
If we switch display and update cursor together, it could lead to
modeset failed because of concurrent access to IO registers.
Add lock protection in DP's edid access to avoid this problem.
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
---
drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++
1 file changed, 11 insertions(+)
base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b
Comments
Hi Am 25.04.23 um 09:03 schrieb Jammy Huang: > If we switch display and update cursor together, it could lead to > modeset failed because of concurrent access to IO registers. > > Add lock protection in DP's edid access to avoid this problem. Thanks for the patch. I thought I fixed this issue already, but that apparently only happened for SIL164 and VGA. What about ast_dp501_connector_helper_get_modes()? Does it require the locking as well? > > Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> > --- > drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c > index 984ec590a7e7..fe5f1fd61361 100644 > --- a/drivers/gpu/drm/ast/ast_mode.c > +++ b/drivers/gpu/drm/ast/ast_mode.c > @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct ast_private *ast) > static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) > { > void *edid; > + struct drm_device *dev = connector->dev; > + struct ast_private *ast = to_ast_private(dev); We've meanwhile renamed ast_private to ast_device. Could you please provide an updated patch for the drm-misc-next tree? Best regards Thomas > > int succ; > int count; > @@ -1643,10 +1645,18 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) > if (!edid) > goto err_drm_connector_update_edid_property; > > + /* > + * Protect access to I/O registers from concurrent modesetting > + * by acquiring the I/O-register lock. > + */ > + mutex_lock(&ast->ioregs_lock); > + > succ = ast_astdp_read_edid(connector->dev, edid); > if (succ < 0) > goto err_kfree; > > + mutex_unlock(&ast->ioregs_lock); > + > drm_connector_update_edid_property(connector, edid); > count = drm_add_edid_modes(connector, edid); > kfree(edid); > @@ -1654,6 +1664,7 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) > return count; > > err_kfree: > + mutex_unlock(&ast->ioregs_lock); > kfree(edid); > err_drm_connector_update_edid_property: > drm_connector_update_edid_property(connector, NULL); > > base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi Thomas, I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: > Hi > > Am 25.04.23 um 09:03 schrieb Jammy Huang: >> If we switch display and update cursor together, it could lead to >> modeset failed because of concurrent access to IO registers. >> >> Add lock protection in DP's edid access to avoid this problem. > > Thanks for the patch. I thought I fixed this issue already, but that > apparently only happened for SIL164 and VGA. > > What about ast_dp501_connector_helper_get_modes()? Does it require the > locking as well? > >> >> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >> --- >> drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/gpu/drm/ast/ast_mode.c >> b/drivers/gpu/drm/ast/ast_mode.c >> index 984ec590a7e7..fe5f1fd61361 100644 >> --- a/drivers/gpu/drm/ast/ast_mode.c >> +++ b/drivers/gpu/drm/ast/ast_mode.c >> @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct >> ast_private *ast) >> static int ast_astdp_connector_helper_get_modes(struct >> drm_connector *connector) >> { >> void *edid; >> + struct drm_device *dev = connector->dev; >> + struct ast_private *ast = to_ast_private(dev); > > We've meanwhile renamed ast_private to ast_device. Could you please > provide an updated patch for the drm-misc-next tree? > > Best regards > Thomas > >> int succ; >> int count; >> @@ -1643,10 +1645,18 @@ static int >> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >> if (!edid) >> goto err_drm_connector_update_edid_property; >> + /* >> + * Protect access to I/O registers from concurrent modesetting >> + * by acquiring the I/O-register lock. >> + */ >> + mutex_lock(&ast->ioregs_lock); >> + >> succ = ast_astdp_read_edid(connector->dev, edid); >> if (succ < 0) >> goto err_kfree; >> + mutex_unlock(&ast->ioregs_lock); >> + >> drm_connector_update_edid_property(connector, edid); >> count = drm_add_edid_modes(connector, edid); >> kfree(edid); >> @@ -1654,6 +1664,7 @@ static int >> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >> return count; >> err_kfree: >> + mutex_unlock(&ast->ioregs_lock); >> kfree(edid); >> err_drm_connector_update_edid_property: >> drm_connector_update_edid_property(connector, NULL); >> >> base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b >
Hi Thomas, Do you have other suggestion for this patch?? Please kindly advise. On 2023/4/25 下午 03:39, Jammy Huang wrote: > Hi Thomas, > > I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). > > On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: >> Hi >> >> Am 25.04.23 um 09:03 schrieb Jammy Huang: >>> If we switch display and update cursor together, it could lead to >>> modeset failed because of concurrent access to IO registers. >>> >>> Add lock protection in DP's edid access to avoid this problem. >> >> Thanks for the patch. I thought I fixed this issue already, but that >> apparently only happened for SIL164 and VGA. >> >> What about ast_dp501_connector_helper_get_modes()? Does it require >> the locking as well? >> >>> >>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >>> --- >>> drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++ >>> 1 file changed, 11 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/ast/ast_mode.c >>> b/drivers/gpu/drm/ast/ast_mode.c >>> index 984ec590a7e7..fe5f1fd61361 100644 >>> --- a/drivers/gpu/drm/ast/ast_mode.c >>> +++ b/drivers/gpu/drm/ast/ast_mode.c >>> @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct >>> ast_private *ast) >>> static int ast_astdp_connector_helper_get_modes(struct >>> drm_connector *connector) >>> { >>> void *edid; >>> + struct drm_device *dev = connector->dev; >>> + struct ast_private *ast = to_ast_private(dev); >> >> We've meanwhile renamed ast_private to ast_device. Could you please >> provide an updated patch for the drm-misc-next tree? >> >> Best regards >> Thomas >> >>> int succ; >>> int count; >>> @@ -1643,10 +1645,18 @@ static int >>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>> if (!edid) >>> goto err_drm_connector_update_edid_property; >>> + /* >>> + * Protect access to I/O registers from concurrent modesetting >>> + * by acquiring the I/O-register lock. >>> + */ >>> + mutex_lock(&ast->ioregs_lock); >>> + >>> succ = ast_astdp_read_edid(connector->dev, edid); >>> if (succ < 0) >>> goto err_kfree; >>> + mutex_unlock(&ast->ioregs_lock); >>> + >>> drm_connector_update_edid_property(connector, edid); >>> count = drm_add_edid_modes(connector, edid); >>> kfree(edid); >>> @@ -1654,6 +1664,7 @@ static int >>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>> return count; >>> err_kfree: >>> + mutex_unlock(&ast->ioregs_lock); >>> kfree(edid); >>> err_drm_connector_update_edid_property: >>> drm_connector_update_edid_property(connector, NULL); >>> >>> base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b >>
Hi, this patch also fell through the cracks. Apologies. Am 24.05.23 um 04:29 schrieb Jammy Huang: > Hi Thomas, > > Do you have other suggestion for this patch?? The main issue was that struct ast_private is now called struct ast_device. So the current patch cannot be applied. > > Please kindly advise. > > On 2023/4/25 下午 03:39, Jammy Huang wrote: >> Hi Thomas, >> >> I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). >> >> On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: >>> Hi >>> >>> Am 25.04.23 um 09:03 schrieb Jammy Huang: >>>> If we switch display and update cursor together, it could lead to >>>> modeset failed because of concurrent access to IO registers. >>>> >>>> Add lock protection in DP's edid access to avoid this problem. >>> >>> Thanks for the patch. I thought I fixed this issue already, but that >>> apparently only happened for SIL164 and VGA. >>> >>> What about ast_dp501_connector_helper_get_modes()? Does it require >>> the locking as well? >>> >>>> >>>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >>>> --- >>>> drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++ >>>> 1 file changed, 11 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/ast/ast_mode.c >>>> b/drivers/gpu/drm/ast/ast_mode.c >>>> index 984ec590a7e7..fe5f1fd61361 100644 >>>> --- a/drivers/gpu/drm/ast/ast_mode.c >>>> +++ b/drivers/gpu/drm/ast/ast_mode.c >>>> @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct >>>> ast_private *ast) >>>> static int ast_astdp_connector_helper_get_modes(struct >>>> drm_connector *connector) >>>> { >>>> void *edid; >>>> + struct drm_device *dev = connector->dev; >>>> + struct ast_private *ast = to_ast_private(dev); >>> >>> We've meanwhile renamed ast_private to ast_device. Could you please >>> provide an updated patch for the drm-misc-next tree? >>> >>> Best regards >>> Thomas >>> >>>> int succ; >>>> int count; >>>> @@ -1643,10 +1645,18 @@ static int >>>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>>> if (!edid) >>>> goto err_drm_connector_update_edid_property; >>>> + /* >>>> + * Protect access to I/O registers from concurrent modesetting >>>> + * by acquiring the I/O-register lock. >>>> + */ >>>> + mutex_lock(&ast->ioregs_lock); >>>> + >>>> succ = ast_astdp_read_edid(connector->dev, edid); >>>> if (succ < 0) >>>> goto err_kfree; >>>> + mutex_unlock(&ast->ioregs_lock); >>>> + >>>> drm_connector_update_edid_property(connector, edid); >>>> count = drm_add_edid_modes(connector, edid); >>>> kfree(edid); >>>> @@ -1654,6 +1664,7 @@ static int >>>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>>> return count; >>>> err_kfree: Here's a minor issue that the goto label should now be called err_mutex_unlock. Best regards Thomas >>>> + mutex_unlock(&ast->ioregs_lock); >>>> kfree(edid); >>>> err_drm_connector_update_edid_property: >>>> drm_connector_update_edid_property(connector, NULL); >>>> >>>> base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b >>> -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)
Hi Thomas, Thanks, I will modify the patch accordingly. On 2023/5/24 下午 06:47, Thomas Zimmermann wrote: > Hi, > > this patch also fell through the cracks. Apologies. > > Am 24.05.23 um 04:29 schrieb Jammy Huang: >> Hi Thomas, >> >> Do you have other suggestion for this patch?? > > The main issue was that struct ast_private is now called struct > ast_device. So the current patch cannot be applied. > >> >> Please kindly advise. >> >> On 2023/4/25 下午 03:39, Jammy Huang wrote: >>> Hi Thomas, >>> >>> I think DP501 is OK. It doesn't use ioregs in ast_dp501_read_edid(). >>> >>> On 2023/4/25 下午 03:27, Thomas Zimmermann wrote: >>>> Hi >>>> >>>> Am 25.04.23 um 09:03 schrieb Jammy Huang: >>>>> If we switch display and update cursor together, it could lead to >>>>> modeset failed because of concurrent access to IO registers. >>>>> >>>>> Add lock protection in DP's edid access to avoid this problem. >>>> >>>> Thanks for the patch. I thought I fixed this issue already, but >>>> that apparently only happened for SIL164 and VGA. >>>> >>>> What about ast_dp501_connector_helper_get_modes()? Does it require >>>> the locking as well? >>>> >>>>> >>>>> Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com> >>>>> --- >>>>> drivers/gpu/drm/ast/ast_mode.c | 11 +++++++++++ >>>>> 1 file changed, 11 insertions(+) >>>>> >>>>> diff --git a/drivers/gpu/drm/ast/ast_mode.c >>>>> b/drivers/gpu/drm/ast/ast_mode.c >>>>> index 984ec590a7e7..fe5f1fd61361 100644 >>>>> --- a/drivers/gpu/drm/ast/ast_mode.c >>>>> +++ b/drivers/gpu/drm/ast/ast_mode.c >>>>> @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct >>>>> ast_private *ast) >>>>> static int ast_astdp_connector_helper_get_modes(struct >>>>> drm_connector *connector) >>>>> { >>>>> void *edid; >>>>> + struct drm_device *dev = connector->dev; >>>>> + struct ast_private *ast = to_ast_private(dev); >>>> >>>> We've meanwhile renamed ast_private to ast_device. Could you please >>>> provide an updated patch for the drm-misc-next tree? >>>> >>>> Best regards >>>> Thomas >>>> >>>>> int succ; >>>>> int count; >>>>> @@ -1643,10 +1645,18 @@ static int >>>>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>>>> if (!edid) >>>>> goto err_drm_connector_update_edid_property; >>>>> + /* >>>>> + * Protect access to I/O registers from concurrent modesetting >>>>> + * by acquiring the I/O-register lock. >>>>> + */ >>>>> + mutex_lock(&ast->ioregs_lock); >>>>> + >>>>> succ = ast_astdp_read_edid(connector->dev, edid); >>>>> if (succ < 0) >>>>> goto err_kfree; >>>>> + mutex_unlock(&ast->ioregs_lock); >>>>> + >>>>> drm_connector_update_edid_property(connector, edid); >>>>> count = drm_add_edid_modes(connector, edid); >>>>> kfree(edid); >>>>> @@ -1654,6 +1664,7 @@ static int >>>>> ast_astdp_connector_helper_get_modes(struct drm_connector *connector) >>>>> return count; >>>>> err_kfree: > > Here's a minor issue that the goto label should now be called > err_mutex_unlock. > > Best regards > Thomas > >>>>> + mutex_unlock(&ast->ioregs_lock); >>>>> kfree(edid); >>>>> err_drm_connector_update_edid_property: >>>>> drm_connector_update_edid_property(connector, NULL); >>>>> >>>>> base-commit: 61d325dcbc05d8fef88110d35ef7776f3ac3f68b >>>> >
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 984ec590a7e7..fe5f1fd61361 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct ast_private *ast) static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) { void *edid; + struct drm_device *dev = connector->dev; + struct ast_private *ast = to_ast_private(dev); int succ; int count; @@ -1643,10 +1645,18 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) if (!edid) goto err_drm_connector_update_edid_property; + /* + * Protect access to I/O registers from concurrent modesetting + * by acquiring the I/O-register lock. + */ + mutex_lock(&ast->ioregs_lock); + succ = ast_astdp_read_edid(connector->dev, edid); if (succ < 0) goto err_kfree; + mutex_unlock(&ast->ioregs_lock); + drm_connector_update_edid_property(connector, edid); count = drm_add_edid_modes(connector, edid); kfree(edid); @@ -1654,6 +1664,7 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector) return count; err_kfree: + mutex_unlock(&ast->ioregs_lock); kfree(edid); err_drm_connector_update_edid_property: drm_connector_update_edid_property(connector, NULL);