drm/radeon/kms: fix vline register for second head.
authorDave Airlie <airlied@redhat.com>
Thu, 8 Oct 2009 01:32:49 +0000 (11:32 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 8 Oct 2009 01:39:16 +0000 (11:39 +1000)
Both r100/r600 had this wrong, use the macro to extract the register
to relocate.

Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r600_cs.c

index 5fe12c02d2dd4d9800db50a8ba57cbba5a2248fb..374ecacc6183704344e00ce152b1bbdade5c0c71 100644 (file)
@@ -829,7 +829,7 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
 
        header = radeon_get_ib_value(p, h_idx);
        crtc_id = radeon_get_ib_value(p, h_idx + 5);
-       reg = header >> 2;
+       reg = CP_PACKET0_GET_REG(header);
        mutex_lock(&p->rdev->ddev->mode_config.mutex);
        obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
        if (!obj) {
index d28970db6a2d1538eeed0c998e78952c77c0b494..17e42195c632eab62ddef0db40aaf713c9fc067f 100644 (file)
@@ -252,7 +252,7 @@ static int r600_cs_packet_parse_vline(struct radeon_cs_parser *p)
 
        header = radeon_get_ib_value(p, h_idx);
        crtc_id = radeon_get_ib_value(p, h_idx + 2 + 7 + 1);
-       reg = header >> 2;
+       reg = CP_PACKET0_GET_REG(header);
        mutex_lock(&p->rdev->ddev->mode_config.mutex);
        obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
        if (!obj) {