[Touch Diamond, MDA Compact IV ROM Development] touch of jobo:
I updated them (because I said I would, not because it is particularly useful, as I have come a bit further in the mean time). Same links as before:

zImage-444-jobo

zImage-565-jobo

Right .. so I was trying...

..something like that. :)

I got there by playing with:

/* 666 18BPP */
dma2_cfg |= DMA_DSTC0G_6BITS | DMA_DSTC1B_6BITS | DMA_DSTC2R_6BITS;

..in mdp.c~235. So this may be what we need to adjust according to the raph800 lcd.

In order to have different flags for different panels, I did some small (but probably considered ugly and dirty) modifications to mddi_client_toshiba.c, msm_fb.h and mdp.c

First I applied the 'cdma patch' to register the raph800 panel, as netripper pointed out.

- Changed the prototype of mdp_dma_to_mddi() to have an argument that holds extra flags. These get ORred to dma_cfg2.

- Added a member to the mddi_panel_info struct to hold those flags per panel

- Added an enable function for the raph100 panel, so that they now both have one. In here, each panel sets the extra mdp dma flags it needs. msmfb_start_dma() passes these to mdp_dma_to_mddi()

- Flags that should be controlled on a per panel basis removed from mdp_dma_to_mddi() #ifdef CONFIG_MACH_HTCRAPHAEL

In mddi_client_toshiba.c:

static void toshiba_enable_panel_raph800(struct mddi_panel_info *panel)
{
panel->width = 480;
panel->height = 640;
/* Jobo: See which combination works, it does seem to matter */
panel->mdpdmacfgdstflgs = DMA_DSTC0G_5BITS | DMA_DSTC1B_5BITS | DMA_DSTC2R_5BITS;
panel->mdpdmacfgdstflgs |= DMA_PACK_TIGHT; // or DMA_PACK_LOOSE
panel->mdpdmacfgdstflgs |= DMA_DITHER_EN; // or not
}

static void toshiba_enable_panel_raph100(struct mddi_panel_info *panel)
{
/* Jobo: Set values to what use to be fixed, width/height already OK or not needed */
panel->mdpdmacfgdstflgs = DMA_DSTC0G_6BITS | DMA_DSTC1B_6BITS | DMA_DSTC2R_6BITS;
panel->mdpdmacfgdstflgs |= DMA_PACK_TIGHT | DMA_DITHER_EN;
}

In mdp:c~235:

#ifdef CONFIG_MACH_HTCRAPHAEL
/* Jobo: add flags from mddi_panel_info */
dma2_cfg |= dmacfgdst;
#else
dma2_cfg |= DMA_PACK_TIGHT | DMA_DITHER_EN;
/* 666 18BPP */
dma2_cfg |= DMA_DSTC0G_6BITS | DMA_DSTC1B_6BITS | DMA_DSTC2R_6BITS;
#endif

This way different panels can use different dma flags in mdp while keeping mdp itself panel agnostic.

You can find a kernel image here that has these changes. It has the pixel bit packing in msm_fb.c set to the original rgb565 values.

All 3 kernels linked to from this post have the msmfb_start_dma() hack in place, so this should not be the cause of stuff not getting drawn. All 3 have the patch applied that I forgot earlier, so raph800 panels should get recognized.

The raph800 sets different mdp dma dst flags. I would be very interested to know what it looks like. If for some reason my kernels dont run on CDMA phones, I would still be interested what the effect is of different combinations of DMA_DSTCXX_XBITS in dma2_cfg in mdp_dma_to_mddi() mdp.c~235 and maybe also loose or tight packing, lsb or msb aligned, dither enabled or not.

I should probably update to the latest git in order to produce clean diffs. How easy and/or safe is it to merge more recent commits into an older set with modifications?

-Jobo

EDIT: I updated the mdptest image on 12/14 00:45. please boot it.