Skip to content

Commit

Permalink
Revert "radeon, kdb, kms: Save and restore the LUT on atomic KMS ente…
Browse files Browse the repository at this point in the history
…r/exit"

This reverts commit ff77371.

A generic solution is needed to save and retore the LUT information.

CC: Jesse Barnes <[email protected]>
CC: [email protected]
Signed-off-by: Jason Wessel <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
jwessel authored and airlied committed Oct 19, 2010
1 parent f608613 commit 38ed0fc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
32 changes: 0 additions & 32 deletions drivers/gpu/drm/radeon/radeon_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,38 +138,6 @@ void radeon_crtc_load_lut(struct drm_crtc *crtc)
legacy_crtc_load_lut(crtc);
}

void radeon_crtc_save_lut(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
int i;

if (!crtc->enabled)
return;

for (i = 0; i < 256; i++) {
radeon_crtc->lut_r_copy[i] = radeon_crtc->lut_r[i];
radeon_crtc->lut_g_copy[i] = radeon_crtc->lut_g[i];
radeon_crtc->lut_b_copy[i] = radeon_crtc->lut_b[i];
}
}

void radeon_crtc_restore_lut(struct drm_crtc *crtc)
{
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
int i;

if (!crtc->enabled)
return;

for (i = 0; i < 256; i++) {
radeon_crtc->lut_r[i] = radeon_crtc->lut_r_copy[i];
radeon_crtc->lut_g[i] = radeon_crtc->lut_g_copy[i];
radeon_crtc->lut_b[i] = radeon_crtc->lut_b_copy[i];
}

radeon_crtc_load_lut(crtc);
}

/** Sets the color ramps on behalf of fbcon */
void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
u16 blue, int regno)
Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/drm/radeon/radeon_legacy_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ int radeon_crtc_set_base_atomic(struct drm_crtc *crtc,
struct drm_framebuffer *fb,
int x, int y, int enter)
{
if (enter)
radeon_crtc_save_lut(crtc);
else
radeon_crtc_restore_lut(crtc);

return radeon_crtc_do_set_base(crtc, fb, x, y, 1);
}

Expand Down
3 changes: 0 additions & 3 deletions drivers/gpu/drm/radeon/radeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ struct radeon_crtc {
struct drm_crtc base;
int crtc_id;
u16 lut_r[256], lut_g[256], lut_b[256];
u16 lut_r_copy[256], lut_g_copy[256], lut_b_copy[256];
bool enabled;
bool can_tile;
uint32_t crtc_offset;
Expand Down Expand Up @@ -523,8 +522,6 @@ extern int atombios_get_encoder_mode(struct drm_encoder *encoder);
extern void radeon_encoder_set_active_device(struct drm_encoder *encoder);

extern void radeon_crtc_load_lut(struct drm_crtc *crtc);
extern void radeon_crtc_save_lut(struct drm_crtc *crtc);
extern void radeon_crtc_restore_lut(struct drm_crtc *crtc);
extern int atombios_crtc_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb);
extern int atombios_crtc_set_base_atomic(struct drm_crtc *crtc,
Expand Down

0 comments on commit 38ed0fc

Please sign in to comment.