All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu CHARETTE <matthieu.charette@gmail.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/edid/firmware: stop using throwaway platform device
Date: Tue, 11 Oct 2022 08:27:16 +0200	[thread overview]
Message-ID: <GLSKJR.CU4DWLJQSTHT2@gmail.com> (raw)
In-Reply-To: <20221006222146.2375217-1-jani.nikula@intel.com>

It should fix the issue. Meanwhile, the system will still crash if a 
new monitor is plugged while the machine is suspended. We might need to 
precache the EDID to prevent that.

Matthieu

On Fri, Oct 7 2022 at 01:21:46 AM +0300, Jani Nikula 
<jani.nikula@intel.com> wrote:
> We've used a temporary platform device for firmware EDID loading since
> it was introduced in commit da0df92b5731 ("drm: allow loading an EDID 
> as
> firmware to override broken monitor"), but there's no explanation why.
> 
> Do we need to?
> 
> Maybe this fixes the suspend/resume issue?
> 
> (Yes, I'll rewrite the commit message if this is the way to go ;)
> 
> References: 
> https://lore.kernel.org/r/20220727074152.43059-1-matthieu.charette@gmail.com
> Cc: Matthieu CHARETTE <matthieu.charette@gmail.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/drm_edid_load.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid_load.c 
> b/drivers/gpu/drm/drm_edid_load.c
> index 37d8ba3ddb46..fbae12130234 100644
> --- a/drivers/gpu/drm/drm_edid_load.c
> +++ b/drivers/gpu/drm/drm_edid_load.c
> @@ -182,18 +182,9 @@ static void *edid_load(struct drm_connector 
> *connector, const char *name,
>  		fwdata = generic_edid[builtin];
>  		fwsize = sizeof(generic_edid[builtin]);
>  	} else {
> -		struct platform_device *pdev;
>  		int err;
> 
> -		pdev = platform_device_register_simple(connector_name, -1, NULL, 
> 0);
> -		if (IS_ERR(pdev)) {
> -			DRM_ERROR("Failed to register EDID firmware platform device "
> -				  "for connector \"%s\"\n", connector_name);
> -			return ERR_CAST(pdev);
> -		}
> -
> -		err = request_firmware(&fw, name, &pdev->dev);
> -		platform_device_unregister(pdev);
> +		err = request_firmware(&fw, name, connector->dev->dev);
>  		if (err) {
>  			DRM_ERROR("Requesting EDID firmware \"%s\" failed (err=%d)\n",
>  				  name, err);
> --
> 2.34.1
> 



WARNING: multiple messages have this Message-ID (diff)
From: Matthieu CHARETTE <matthieu.charette@gmail.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/edid/firmware: stop using throwaway platform device
Date: Tue, 11 Oct 2022 08:27:16 +0200	[thread overview]
Message-ID: <GLSKJR.CU4DWLJQSTHT2@gmail.com> (raw)
In-Reply-To: <20221006222146.2375217-1-jani.nikula@intel.com>

It should fix the issue. Meanwhile, the system will still crash if a 
new monitor is plugged while the machine is suspended. We might need to 
precache the EDID to prevent that.

Matthieu

On Fri, Oct 7 2022 at 01:21:46 AM +0300, Jani Nikula 
<jani.nikula@intel.com> wrote:
> We've used a temporary platform device for firmware EDID loading since
> it was introduced in commit da0df92b5731 ("drm: allow loading an EDID 
> as
> firmware to override broken monitor"), but there's no explanation why.
> 
> Do we need to?
> 
> Maybe this fixes the suspend/resume issue?
> 
> (Yes, I'll rewrite the commit message if this is the way to go ;)
> 
> References: 
> https://lore.kernel.org/r/20220727074152.43059-1-matthieu.charette@gmail.com
> Cc: Matthieu CHARETTE <matthieu.charette@gmail.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/drm_edid_load.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid_load.c 
> b/drivers/gpu/drm/drm_edid_load.c
> index 37d8ba3ddb46..fbae12130234 100644
> --- a/drivers/gpu/drm/drm_edid_load.c
> +++ b/drivers/gpu/drm/drm_edid_load.c
> @@ -182,18 +182,9 @@ static void *edid_load(struct drm_connector 
> *connector, const char *name,
>  		fwdata = generic_edid[builtin];
>  		fwsize = sizeof(generic_edid[builtin]);
>  	} else {
> -		struct platform_device *pdev;
>  		int err;
> 
> -		pdev = platform_device_register_simple(connector_name, -1, NULL, 
> 0);
> -		if (IS_ERR(pdev)) {
> -			DRM_ERROR("Failed to register EDID firmware platform device "
> -				  "for connector \"%s\"\n", connector_name);
> -			return ERR_CAST(pdev);
> -		}
> -
> -		err = request_firmware(&fw, name, &pdev->dev);
> -		platform_device_unregister(pdev);
> +		err = request_firmware(&fw, name, connector->dev->dev);
>  		if (err) {
>  			DRM_ERROR("Requesting EDID firmware \"%s\" failed (err=%d)\n",
>  				  name, err);
> --
> 2.34.1
> 



  parent reply	other threads:[~2022-10-17 19:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-06 22:21 [Intel-gfx] [PATCH] drm/edid/firmware: stop using throwaway platform device Jani Nikula
2022-10-06 22:21 ` Jani Nikula
2022-10-06 23:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-10-06 23:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-07  9:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-10-11  6:27 ` Matthieu CHARETTE [this message]
2022-10-11  6:27   ` [PATCH] " Matthieu CHARETTE
2022-10-11  7:20   ` [Intel-gfx] " Jani Nikula
2022-10-11  7:20     ` Jani Nikula
2022-10-11 20:45     ` [Intel-gfx] " Matthieu CHARETTE
2022-10-11 20:45       ` Matthieu CHARETTE
2022-10-12  8:25       ` [Intel-gfx] " Jani Nikula
2022-10-12  8:25         ` Jani Nikula
2022-10-12 17:16         ` [Intel-gfx] " Matthieu CHARETTE
2022-10-12 17:16           ` Matthieu CHARETTE
2022-11-06 15:03           ` [Intel-gfx] " Matthieu CHARETTE
2022-11-06 15:03             ` Matthieu CHARETTE
2022-11-08 11:27             ` [Intel-gfx] " Jani Nikula
2022-11-08 11:27               ` Jani Nikula
2022-11-08 15:40               ` [Intel-gfx] " Matthieu CHARETTE
2022-11-08 15:40                 ` Matthieu CHARETTE
2022-11-13 19:26                 ` [Intel-gfx] " Matthieu CHARETTE
2022-11-13 19:26                   ` Matthieu CHARETTE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=GLSKJR.CU4DWLJQSTHT2@gmail.com \
    --to=matthieu.charette@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.