Is it a bug of the ipu driver?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it a bug of the ipu driver?

840 Views
senixsenix
Contributor I

During the initialization,the imx6 ipu linux diver will write the dc registers. but I can't find writing address in the rm?  where does the config write to?  :

void ipu_init_dc_mappings(void)

{

  /* IPU_PIX_FMT_RGB24 */

...

  ipu_dc_map_config(0, 0, 7, 0xFF);

  ipu_dc_map_config(0, 1, 15, 0xFF);

...

}

static void _ipu_dc_map_config(struct ipu_soc *ipu,

  int map, int byte_num, int offset, int mask)

{

  ...

  ipu_dc_write(ipu, reg, DC_MAP_CONF_VAL(ptr));

  // I log the reg offset addr like this:

  printk("_ipu_dc_map_config1 %d %d %d %x,%x %x\n",map,byte_num,offset,mask,reg,DC_MAP_CONF_VAL(ptr));

   ...

}


the log shows the offset addr are  0x51 0x52 0x55 ...

arroding the ipu writing func,the offset addres above don't exist!


static inline void ipu_dc_write(struct ipu_soc *ipu,

  u32 value, unsigned offset)

{

  writel(value, ipu->dc_reg + offset);

}

#define DC_MAP_CONF_PTR(n)(0x0108/4 + n/2)
#define DC_MAP_CONF_VAL(n)

(0x0144/4 + n/2)

Tags (4)
0 Kudos
2 Replies

572 Views
senixsenix
Contributor I

the ipu driver is right. i'am wrong. soorry

0 Kudos

572 Views
senixsenix
Contributor I

sorry ,I am wrong.

the ipu->dc_reg is define in this way: u32 *dc_reg;

so ,ipu->dc_reg + offset : means it's a u32 array index, the adddr is:  (unsigned int)ipu->dc_reg + offset*4

0 Kudos