dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Jocelyn Falempe <jfalempe@redhat.com>,
	airlied@redhat.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, airlied@gmail.com, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/3] drm/mgag200: Only set VIDRST bits in CRTC modesetting
Date: Wed, 10 Jul 2024 16:45:35 +0200	[thread overview]
Message-ID: <04f80b99-e551-4fb5-a370-e4d94295b20e@suse.de> (raw)
In-Reply-To: <29ed1a04-ceb7-4619-9b91-2ea35e53c9f2@redhat.com>

Hi

Am 10.07.24 um 16:25 schrieb Jocelyn Falempe:
>
>
>> +    if (set_vidrst)
>>           crtcext1 |= MGAREG_CRTCEXT1_VRSTEN |
>>                   MGAREG_CRTCEXT1_HRSTEN;
>> +    else
>> +        crtcext1 &= ~(MGAREG_CRTCEXT1_VRSTEN | MGAREG_CRTCEXT1_HRSTEN);
>
> The else case is useless, as crtcext1 has already this bits set to 0 
> unconditionnaly.

Indeed. Will be fixed.

Best regards
Thomas

>
>>         crtcext2 = ((vtotal & 0xc00) >> 10) |
>>              ((vdisplay & 0x400) >> 8) |
>> @@ -597,6 +599,7 @@ int mgag200_crtc_helper_atomic_check(struct 
>> drm_crtc *crtc, struct drm_atomic_st
>>       struct mga_device *mdev = to_mga_device(dev);
>>       const struct mgag200_device_funcs *funcs = mdev->funcs;
>>       struct drm_crtc_state *new_crtc_state = 
>> drm_atomic_get_new_crtc_state(new_state, crtc);
>> +    struct mgag200_crtc_state *new_mgag200_crtc_state = 
>> to_mgag200_crtc_state(new_crtc_state);
>>       struct drm_property_blob *new_gamma_lut = 
>> new_crtc_state->gamma_lut;
>>       int ret;
>>   @@ -607,6 +610,8 @@ int mgag200_crtc_helper_atomic_check(struct 
>> drm_crtc *crtc, struct drm_atomic_st
>>       if (ret)
>>           return ret;
>>   +    new_mgag200_crtc_state->set_vidrst = mdev->info->has_vidrst;
>> +
>>       if (new_crtc_state->mode_changed) {
>>           if (funcs->pixpllc_atomic_check) {
>>               ret = funcs->pixpllc_atomic_check(crtc, new_state);
>> @@ -656,7 +661,7 @@ void mgag200_crtc_helper_atomic_enable(struct 
>> drm_crtc *crtc, struct drm_atomic_
>>           funcs->disable_vidrst(mdev);
>>         mgag200_set_format_regs(mdev, format);
>> -    mgag200_set_mode_regs(mdev, adjusted_mode);
>> +    mgag200_set_mode_regs(mdev, adjusted_mode, 
>> mgag200_crtc_state->set_vidrst);
>>         if (funcs->pixpllc_atomic_update)
>>           funcs->pixpllc_atomic_update(crtc, old_state);
>> @@ -717,6 +722,7 @@ struct drm_crtc_state 
>> *mgag200_crtc_atomic_duplicate_state(struct drm_crtc *crtc
>>       new_mgag200_crtc_state->format = mgag200_crtc_state->format;
>>       memcpy(&new_mgag200_crtc_state->pixpllc, 
>> &mgag200_crtc_state->pixpllc,
>>              sizeof(new_mgag200_crtc_state->pixpllc));
>> +    new_mgag200_crtc_state->set_vidrst = 
>> mgag200_crtc_state->set_vidrst;
>>         return &new_mgag200_crtc_state->base;
>>   }
>

-- 
--
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)


  reply	other threads:[~2024-07-10 14:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10  8:42 [PATCH v2 0/3] drm/mgag200: Control VIDRST and BMC from CRTC Thomas Zimmermann
2024-07-10  8:42 ` [PATCH v2 1/3] drm/mgag200: Only set VIDRST bits in CRTC modesetting Thomas Zimmermann
2024-07-10 14:25   ` Jocelyn Falempe
2024-07-10 14:45     ` Thomas Zimmermann [this message]
2024-07-10  8:42 ` [PATCH v2 2/3] drm/mgag200: Remove vidrst callbacks from struct mgag200_device_funcs Thomas Zimmermann
2024-07-10 14:26   ` Jocelyn Falempe
2024-07-10  8:42 ` [PATCH v2 3/3] drm/mgag200: Rename BMC vidrst names Thomas Zimmermann
2024-07-10 14:27   ` Jocelyn Falempe

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=04f80b99-e551-4fb5-a370-e4d94295b20e@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /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