Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: freedreno@lists.freedesktop.org, sean@poorly.run,
	quic_abhinavk@quicinc.com, dri-devel@lists.freedesktop.org,
	javierm@redhat.com, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 1/6] drm/msm: Clear aperture ownership outside of fbdev code
Date: Mon, 3 Apr 2023 13:19:20 +0200	[thread overview]
Message-ID: <74792856-b906-4085-64a2-ec7d32c16508@suse.de> (raw)
In-Reply-To: <CAA8EJpov+D5VjWWKWCEjp_C1Rt2B6=2j8rBc8JUPtjEcYYRzYQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3142 bytes --]

Hi

Am 30.03.23 um 11:51 schrieb Dmitry Baryshkov:
> On Thu, 30 Mar 2023 at 10:41, Thomas Zimmermann <tzimmermann@suse.de> wrote:
>>
>> Move aperture management out of the fbdev code. It is unrelated
>> and needs to run even if fbdev support has been disabled. Call
>> the helper at the top of msm_drm_init() to take over hardware
>> from other drivers.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>   drivers/gpu/drm/msm/msm_drv.c   | 6 ++++++
>>   drivers/gpu/drm/msm/msm_fbdev.c | 6 ------
>>   2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
>> index aca48c868c14..5211140ec50b 100644
>> --- a/drivers/gpu/drm/msm/msm_drv.c
>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>> @@ -12,6 +12,7 @@
>>   #include <linux/uaccess.h>
>>   #include <uapi/linux/sched/types.h>
>>
>> +#include <drm/drm_aperture.h>
>>   #include <drm/drm_bridge.h>
>>   #include <drm/drm_drv.h>
>>   #include <drm/drm_file.h>
>> @@ -411,6 +412,11 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
>>          if (drm_firmware_drivers_only())
>>                  return -ENODEV;
>>
>> +       /* the fw fb could be anywhere in memory */
>> +       ret = drm_aperture_remove_framebuffers(false, drv);
>> +       if (ret)
>> +               return ret;
>> +
> 
> I think it is not a good place to remove framebuffers. EFIFB might be
> still alive and if we kick it out, it might be very hard to debug what
> went wrong.
> Could you please move it after component bind? Then we can be sure at
> least that all subdevices are bound. I see that armada and sun4i call
> it as late as possible, when no calls can fail.

Ok. I briefly looked over the code to make sure that no code touches HW 
settings before msm acquires the device.

Best regards
Thomas

> 
>>          ddev = drm_dev_alloc(drv, dev);
>>          if (IS_ERR(ddev)) {
>>                  DRM_DEV_ERROR(dev, "failed to allocate drm_device\n");
>> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
>> index d26aa52217ce..fc7d0406a9f9 100644
>> --- a/drivers/gpu/drm/msm/msm_fbdev.c
>> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
>> @@ -4,7 +4,6 @@
>>    * Author: Rob Clark <robdclark@gmail.com>
>>    */
>>
>> -#include <drm/drm_aperture.h>
>>   #include <drm/drm_crtc.h>
>>   #include <drm/drm_fb_helper.h>
>>   #include <drm/drm_fourcc.h>
>> @@ -154,11 +153,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
>>                  goto fail;
>>          }
>>
>> -       /* the fw fb could be anywhere in memory */
>> -       ret = drm_aperture_remove_framebuffers(false, dev->driver);
>> -       if (ret)
>> -               goto fini;
>> -
>>          ret = drm_fb_helper_initial_config(helper);
>>          if (ret)
>>                  goto fini;
>> --
>> 2.40.0
>>
> 
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-04-03 11:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  7:41 [PATCH 0/6] drm/msm: Convert fbdev to DRM client Thomas Zimmermann
2023-03-30  7:41 ` [PATCH 1/6] drm/msm: Clear aperture ownership outside of fbdev code Thomas Zimmermann
2023-03-30  9:51   ` Dmitry Baryshkov
2023-04-03 11:19     ` Thomas Zimmermann [this message]
2023-03-30  7:41 ` [PATCH 2/6] drm/msm: Remove fb from struct msm_fbdev Thomas Zimmermann
2023-03-30  9:56   ` Dmitry Baryshkov
2023-03-30  7:41 ` [PATCH 3/6] drm/msm: Remove " Thomas Zimmermann
2023-03-30  9:57   ` Dmitry Baryshkov
2023-03-30  7:41 ` [PATCH 4/6] drm/msm: Remove fbdev from struct msm_drm_private Thomas Zimmermann
2023-03-30 10:01   ` Dmitry Baryshkov
2023-03-30  7:41 ` [PATCH 5/6] drm/msm: Initialize fbdev DRM client Thomas Zimmermann
2023-03-30 10:05   ` Dmitry Baryshkov
2023-03-30  7:41 ` [PATCH 6/6] drm/msm: Implement fbdev emulation as in-kernel client Thomas Zimmermann
2023-03-30 10:22   ` kernel test robot
2023-03-30 10:33   ` kernel test robot
2023-03-30  9:46 ` [PATCH 0/6] drm/msm: Convert fbdev to DRM client Dmitry Baryshkov

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=74792856-b906-4085-64a2-ec7d32c16508@suse.de \
    --to=tzimmermann@suse.de \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=sean@poorly.run \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox