Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > On 14.10.2011 21:30, mmlr@xxxxxxxx wrote: > > + bool isSNB = gInfo->shared_info->device_type. > > InGroup(INTEL_TYPE_SNB); > > + write32((isSNB ? PCH_DISPLAY_A_PALETTE : > > INTEL_DISPLAY_A_PALETTE) > > Maybe it would be nice to have a class that does just that? Ie. return > the correct register depending on the head, and the chipset? Yes, I'm planning exactly that. I just wanted to get everything more or less working so that the SandyBridge changes are more obvious before reworking everything. I was thinking about making the whole device a class that then knows about its registers and possibly add further objects abstracting the planes, pipes and transcoders if it makes sense. Since we're now looking at analog, HDMI, LVDS, DP and embedded DP, some form of abstraction will be necessary to support even my setup correctly. Right now it basically sets the mode using the analog code path even though it's actually an eDP or LVDS panel that just happens to be on transcoder A... Regards Michael