Skip to content

Commit

Permalink
drm/radeon/kms: fix use of index before proper initialisation.
Browse files Browse the repository at this point in the history
With the adjust table introduction, we need to fill out index
before getting the table version.

Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Oct 12, 2009
1 parent ceeb502 commit 39deb2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/atombios_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
radeon_compute_pll(pll, adjusted_clock, &pll_clock, &fb_div, &frac_fb_div,
&ref_div, &post_div, pll_flags);

index = GetIndexIntoMasterTable(COMMAND, SetPixelClock);
atom_parse_cmd_header(rdev->mode_info.atom_context, index, &frev,
&crev);

Expand Down Expand Up @@ -513,7 +514,6 @@ void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
}

printk("executing set pll\n");
index = GetIndexIntoMasterTable(COMMAND, SetPixelClock);
atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args);
}

Expand Down

0 comments on commit 39deb2d

Please sign in to comment.