2009/12/18 Rafał Miłecki <zaj...@gmail.com>:
> V2: reorganize functions, fix modesetting calls
> V3: rebase patch, use radeon's workqueue
> V4: enable on tested chipsets only, request VBLANK IRQs
> V5: enable PM on older hardware (IRQs, mode_fixup, dpms)
> V6: use separate dynpm module parameter
> V7: drop RADEON_ prefix, set minimum mode for dpms off
>
> You may need to apply patch for AtomBIOS's mutex locking:
> http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg45666.html
> (I suggest doing that).
>
> Please test this patch for dpms off:
> sleep 1s; xset dpms force off; sleep 1s; cat /debugfs/dri/0/radeon_pm_info
>
> Also make sure PM is still working when you come back from dpms off.

This is looking good.  two minor things:

--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -399,10 +399,16 @@ int rs600_irq_process(struct radeon_device *rdev)
                if (G_000040_SW_INT_EN(status))
                        radeon_fence_process(rdev);
                /* Vertical blank interrupts */
-               if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int))
+               if (G_007EDC_LB_D1_VBLANK_INTERRUPT(r500_disp_int)) {
                        drm_handle_vblank(rdev->ddev, 0);
-               if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int))
+                       if (rdev->pm.vblank_callback)
+                               queue_work(rdev->wq, &rdev->pm.reclock_work);
+               }
+               if (G_007EDC_LB_D2_VBLANK_INTERRUPT(r500_disp_int)) {
+                       if (rdev->pm.vblank_callback)
+                               queue_work(rdev->wq, &rdev->pm.reclock_work);
                        drm_handle_vblank(rdev->ddev, 1);
+               }
                if (G_007EDC_DC_HOT_PLUG_DETECT1_INTERRUPT(r500_disp_int)) {
                        queue_hotplug = true;
                        DRM_DEBUG("HPD1\n");

Make the order the same for both vblank handlers. I.e.:
drm_handle_vblank(rdev->ddev, 1);
if (rdev->pm.vblank_callback)
        queue_work(rdev->wq, &rdev->pm.reclock_work);


@@ -1025,6 +1028,9 @@ radeon_atom_encoder_dpms(struct drm_encoder
*encoder, int mode)
                atom_execute_table(rdev->mode_info.atom_context, index, 
(uint32_t *)&args);
        }
        radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode ==
DRM_MODE_DPMS_ON) ? true : false);
+       
+       /* adjust pm to dpms change */
+       radeon_pm_compute_clocks(rdev);
 }

@@ -96,6 +96,10 @@ static void radeon_legacy_lvds_dpms(struct
drm_encoder *encoder, int mode)
                radeon_atombios_encoder_dpms_scratch_regs(encoder, (mode ==
DRM_MODE_DPMS_ON) ? true : false);
        else
                radeon_combios_encoder_dpms_scratch_regs(encoder, (mode ==
DRM_MODE_DPMS_ON) ? true : false);
+
+       /* adjust pm to mode change */
+       if (mode == DRM_MODE_DPMS_OFF)
+               radeon_pm_compute_clocks(rdev);
 }

You check for DPMS_OFF in the legacy code, but not atom.  It should be
consistent.

Alex

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to