Hi Stefan, > > How did you actually test that? I have a hard time to get anything useable with > this code. > > The display looks completely borked (colors are way off, and at random either > too dark or too bright). > > I then also added Gamma 1.0 (and different values) to the Monitor section of > xorg.conf, but still not really usable. > I just did few more test using libdrm which had been modified for testing gamma. And I find you are right. It's my negligence that just tested one case for gamma using all 0xff; ..... > > drm_crtc_send_vblank_event(crtc, event); > > spin_unlock_irq(&crtc->dev->event_lock); > > } > > + > > + if (crtc->state->color_mgmt_changed && crtc->state->gamma_lut) > > + fsl_crtc_gamma_set(crtc, (struct drm_color_lut *) > > + crtc->state->gamma_lut->data, 256); > > So this is called while the CRTC is enabled. Others do it there too, but I think in > our case we should not. The reference manual says: > > "The gamma table can only be read or written when the 2D-ACE is not enabled > or during the vertical blanking period." > Yes, now gamma correction function behavior weird. When setting gamma table within crtc enable during initializing, it works correctly. And not right during runtime so far. Thanks, Meng _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel