Re: [PATCH v2 1/3] drm/mgag200: Only set VIDRST bits in CRTC modesetting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux