2011-07-09 10:18:59     PPI no display

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-07-09 10:18:59     PPI no display

Aneesh Peterson (INDIA)

Message: 102312   

 

I'm working with 2010R1 toolchain and distribution in BF527 custom board.

 

 

 

I'm trying to display an itu-r 656 NTSC image through ppi in TV.

 

I've pasted the coding i've done in which the DMA config is 0x1091 and PPI_CONTROL=0x43

 

 

 

X_count=1716

 

Y_count=525

 

X_modify=1

 

Y_modify=1

 

PPI_frame=525

 

 

 

The image i'm trying to display is in a binary file which is in ntsc format and it is kept in a buffer and i'm passing the start address using write  sys call to the driver.

 

First, the interrupt is occuring continuously where i've put some printk's,but there is no image in TV

 

Second, when i'm connecting the board in VDSP in donot disturb mode using jtag and halt the processor the image is coming perfectly,and when running it ,then the TV is blank.

 

 

 

Please can anyone tell whether i've missed out anything in driver.

 

I've also pasted the output from console....

 

Advance thanks for the help......

 

 

 

 

 

 

 

 

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/errno.h>

#include <linux/string.h>

#include <linux/gfp.h>

#include <linux/fb.h>

#include <linux/init.h>

#include <linux/types.h>

#include <linux/interrupt.h>

#include <linux/device.h>

#include <linux/backlight.h>

#include <linux/dma-mapping.h>

#include <linux/platform_device.h>

#include <asm/blackfin.h>

#include <asm/irq.h>

#include <asm/dma.h>

#include <asm/portmux.h>

#include <asm/gptimers.h>

#include <linux/sched.h>

#include <linux/wait.h>

#include <linux/poll.h>

#include <linux/errno.h>

#include <linux/fs.h>

#include <linux/spinlock.h>

#include <linux/delay.h>

#include <linux/cdev.h>

#include <linux/slab.h>

#include <asm/io.h>

#include <asm/cacheflush.h>

 

#include "ppi_driver.h"

 

 

#define PPI_MAJOR 241

#define PPI_MINOR 0

#define PPI_DEVNAME "ppi0"

 

char g8_PPI_FrameBuf[900900];

 

__attribute((section(".l1.data"))) unsigned int wait = 0;

 

 

void System_DelayInMilliSec(UINT32 u32_Delay);

static char driver_name[] = PPI_DEVNAME;

 

static DEFINE_SPINLOCK(ppi_lock);

int PPI_Status;

static int intr;

static int intt=0;

 

 

 

/*

*     ppi_reset

*    Resets PPI registers to 0

*     Input:  

*         void

*     Modify:  

*

*     Output:

*         void        

*/

static struct semaphore ppi_7541;

void ppi_reset(void)

{

   bfin_write_PPI_CONTROL(0x0000);

  bfin_read_PPI_STATUS();

   bfin_write_PPI_COUNT(0x0000);

   bfin_write_PPI_FRAME(0x0000);

   bfin_write_PPI_DELAY(0x0000);

}

 

/*

*      dma_reset

*      Resets DMA registers to 0

*      Input:

*             void

*      Modify:

*

*      Output:

*              void

*/

 

 

void dma_reset(void)

{

  disable_dma(CH_PPI);

  set_dma_config(CH_PPI,0x0);

  free_dma(CH_PPI);

}

 

 

/*

*    ppi_dma_irq

*      ISR of PPI DMA

*      Input:

*             irq - Interrupt vector number

*      Modify:

*

*      Output:

*              void

*/

 

    irqreturn_t __attribute__((l1_text))

  ppi_dma_irq(int irq)

{

    

       clear_dma_irqstat(CH_PPI);

       printk(KERN_INFO PPI_DEVNAME ": DMA PPI ISR ENTERED\n");

 

  

    return IRQ_HANDLED;

}

 

 

 

/*

*      PPI_OPEN

*        Opens PPI driver for txfer and requests DMA IRQ and GPIO for PPI functionality.

*      Input:

*             inode - Description of openned file

 

*      Modify:

*

*      Output:

*              -EFAULT if failed

*              0 if success

*/

 

static int PPI_OPEN(struct inode *inode, struct file *filp)

{

      char s8_intname[20]="";

    unsigned long flags=0;

    int u32_ret=0 ;

    unsigned int regdat,regdat1,regdat2;

    int minor = MINOR(inode->i_rdev);

    if (minor != PPI_MINOR)

    {

    

    printk(KERN_ERR PPI_DEVNAME ":ppi_minor failed \n");

    return -ENXIO;

    }

    intr=1;

    spin_lock_irqsave(&ppi_lock, flags);

    PPI_Status = 1;

    strcpy(s8_intname, PPI_DEVNAME);

 

    ppi_reset();  

    spin_unlock_irqrestore(&ppi_lock, flags);

  

  

    if (peripheral_request(P_PPI0_D0,PPI_DEVNAME)) {

      printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

      return -EBUSY;

    }

    if (peripheral_request(P_PPI0_D1,PPI_DEVNAME)) {

      printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

      return -EBUSY;

    }

    if (peripheral_request(P_PPI0_D2,PPI_DEVNAME)) {

       printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

       return -EBUSY;

    }

    if(peripheral_request(P_PPI0_D3,PPI_DEVNAME)) {

      printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

      return -EBUSY;

    }

        if (peripheral_request(P_PPI0_D4,PPI_DEVNAME)) {

        printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

        return -EBUSY;

    }

    if (peripheral_request(P_PPI0_D5,PPI_DEVNAME)) {

        printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

            return -EBUSY;

    }

    if (peripheral_request(P_PPI0_D6,PPI_DEVNAME)) {

        printk(KERN_ERR PPI_DEVNAME ": Requesting Peripherals failed\n");

      return -EBUSY;

    }

    if (peripheral_request(P_PPI0_D7,PPI_DEVNAME)) {

        printk(KERN_ERR PPI_DEVNAME": Requesting Peripherals failed\n");

          return -EBUSY;

    }

  

    if (request_dma(CH_PPI, "BF527_PPI_DMA") < 0) {

     printk( KERN_ERR PPI_DEVNAME ":Unable to attach BlackFin PPI DMA channel\n");

      return -EFAULT;

    }

    if(request_irq(IRQ_PPI, (void *)ppi_dma_irq, IRQF_DISABLED, "PPI_IRQ",NULL)<0){

      printk( KERN_ERR PPI_DEVNAME ":Unable to attach PPI IRQ \n");

      return -EFAULT;

    }

      

    return 0;

}

 

 

/*

*     Config_PPI

*      Configure PPI registers.

*      Input:

*             void

*      Modify:

*

*      Output:

*              void

*/

void Config_PPI(void)

{

  unsigned short regdata;

  regdata = PORT_DIR | FLD_SEL;

  bfin_write_PPI_CONTROL(regdata);

  __builtin_bfin_ssync();

  bfin_write_PPI_FRAME(525);

  __builtin_bfin_ssync();

  bfin_write_PPI_DELAY(1);

  __builtin_bfin_ssync();

}

 

 

/*

*      setup_dma

*      Configure DMA registers.

*      Input:

*             void

*      Modify:

*

*      Output:

*              void

*/

void setup_dma(void)

{

  UINT16 u16_dma_config;

  u16_dma_config =  DMA2D | DI_EN | DMAFLOW_AUTO ;

  set_dma_x_count(CH_PPI,858 * 2);

  set_dma_x_modify(CH_PPI,1);

  set_dma_y_modify(CH_PPI,1);

  set_dma_y_count(CH_PPI,525);

  set_dma_config(CH_PPI,u16_dma_config);

 

}

 

/*

*      PPI_IOCTL

*      Perform Specific tasks througgh ioctl sys calls from userspace.

*      Input:

*            inode - Description of openned file

*            filp  - Description of openned file

*            cmd   - Command from user space appln

*            arg   - value from user space appln

*      Modify:

*

*      Output:

*            0 if success

*      -EINVAL if failed

*/

static int PPI_IOCTL(struct inode *inode, struct file *filp, uint cmd, unsigned long arg)

{

  unsigned long regdata;

  unsigned int ret;

  unsigned long flags;

 

  ppi_debug(KERN_INFO PPI_DEVNAME ":DRIVER IOCTL start of ioctl\n");

  spin_lock_irqsave(&ppi_lock, flags);

  switch(cmd)

  {

    ppi_debug(KERN_INFO PPI_DEVNAME ":DRIVER IOCTL start of switch\n");

      case XFER_TYPE:

    {

      if (arg < 0 || arg > 3)

    goto ERROR;

      regdata =  bfin_read_PPI_CONTROL();

      regdata &=~XFR_TYPE;

      regdata |= ((unsigned short)arg <<2);

      bfin_write_PPI_CONTROL(regdata);

      __builtin_bfin_ssync();

      break;

    }

      case CONFIG_TYPE:

    {

      if (arg < 0 || arg > 3)

      goto ERROR;

    regdata =  bfin_read_PPI_CONTROL();

    regdata &=~PORT_CFG;

    regdata |= ((unsigned short)arg <<4);

    bfin_write_PPI_CONTROL(regdata);

    __builtin_bfin_ssync();    

    break;

    }

    case DATALEN:

    {

      if (arg < 0 || arg > 7){

      printk(KERN_ERR PPI_DEVNAME ": PPI supports upto 8 bits, ARGUMENT exceeds PPI Limit\n");

       goto ERROR;

      }

    regdata =  bfin_read_PPI_CONTROL();

    regdata &=~DLENGTH;

    regdata |= ( arg << 11);

    bfin_write_PPI_CONTROL(regdata);

    __builtin_bfin_ssync();

      break;

    }

    case PACK:

    {

      regdata = bfin_read_PPI_CONTROL();

    

      if (arg)

      {

    if (((regdata>>11)& 0xFFF) > CFG_PPI_DATALEN_8)

    {

      printk(KERN_ERR PPI_DEVNAME "ppi_ioctl: CMD_PPI_PACKING" "PACKING can't work while PPI port width isn't 8\n");

      goto ERROR;

    }

    regdata |= PACK_EN;

      } else

    regdata &= ~PACK_EN;

       bfin_write_PPI_CONTROL(regdata);

       __builtin_bfin_ssync();

      break;

    }

    case PORT_DIRECTION:

    {

      regdata =  bfin_read_PPI_CONTROL();

      regdata |= 0x2;

      bfin_write_PPI_CONTROL(regdata);

      __builtin_bfin_ssync();

    break;

    }

    case CONFIG_PPI:

    {

 

        Config_PPI();//bfin_write_PPI_CONTROL((unsigned short)arg);

      break;

    }

    case CONFIG_DMA:

    {// request_dma(CH_PPI,PPI_DEVNAME);

      set_dma_config(CH_PPI,(unsigned short)arg);

      break;

    }

    case XMOD:

    {

    set_dma_x_modify(CH_PPI,(unsigned short)arg);

    }

    break;

    case YMOD:

    {

    set_dma_y_modify(CH_PPI,(unsigned short)arg);

    }

    break;

    case DMA_X_COUNT:

    {

      set_dma_x_count(CH_PPI,(unsigned short)arg);

      break;

    }

    case DMA_Y_COUNT:

    {

      set_dma_y_count(CH_PPI,(unsigned short)arg);

      break;

    }

    case READ_CONTROL:

    {

        ppi_debug(KERN_INFO PPI_DEVNAME ":PPI_CONTROL REG READ START\n");

          ret=bfin_read_PPI_CONTROL();

    printk(KERN_INFO PPI_DEVNAME ":PPI_CONTROL REG=0x%x\n",ret);

    ret=bfin_read_DMA0_CONFIG();

    printk(KERN_INFO PPI_DEVNAME ":DMA_CONTROL REG=0x%x\n",ret);

    break;

    }

    case RESET:

    {

        ppi_reset();

    dma_reset();

    break;

    }

 

    default:

    {

        printk(KERN_ERR PPI_DEVNAME ": UNMATCHED IOCTL COMMAND\n");

      goto ERROR;

    }

  }

  spin_unlock_irqrestore(&ppi_lock, flags);

  ppi_debug(KERN_INFO PPI_DEVNAME ":END of SWITCH\n");

  return 0;

ERROR:

    printk(KERN_ERR PPI_DEVNAME ":Error in ioctl command\n");

      spin_unlock_irqrestore(&ppi_lock, flags);

        return -EINVAL;

}

 

 

/*

*      PPI_WRITE

*      Points to the Buffer containg the data to be txed through ppi

*      Input:

*             filp - Description of openned file.

*             buf  - Buffer base address.

*             count- Count size of buf

*             f_pos - Description of openned file.

*      Modify:

*

*      Output:

*              Always 0

*/

 

 

static ssize_t PPI_WRITE(struct file *filp, const char *buf, size_t count, loff_t *f_pos)

{

  unsigned short regdata,semup=1;

  printk(KERN_INFO PPI_DEVNAME ":WRITE entered from main\n");

  memset(g8_PPI_FrameBuf,0,900900);

  memcpy(g8_PPI_FrameBuf,buf,900900);

 

  printk(KERN_INFO PPI_DEVNAME ":WRITE\ng8_PPI_FrameBuf==0x%x,buf==0x%x\n",g8_PPI_FrameBuf,buf);

  printk(KERN_INFO PPI_DEVNAME ":WRITE\ng8_PPI_FrameBuf[359744]==0x%x,buf[359744]==0x%x\n",g8_PPI_FrameBuf[359744],buf[359744]);

  set_dma_start_addr(CH_PPI,tempbuf);

  enable_dma(CH_PPI);

  regdata = bfin_read_PPI_CONTROL();

  regdata |= 0x1;

  bfin_write_PPI_CONTROL(regdata);

  __builtin_bfin_ssync();

  disable_irq(IRQ_PPI);

  enable_irq(IRQ_PPI);

 

return 0;

}

 

 

 

/*

*      PPI_CLOSE

*      It is invoked when user call 'close' system call to close device. Free the DMA ,PPI & IRQ

*      Input:

*            in_inode - Description of openned file.

*            in_filp - Description of openned file.

*      Modify:

*

*      Output:

*              Always 0

*/

 

static int PPI_CLOSE(struct inode *inode, struct file *filp)

 

{

  

      ppi_debug(KERN_INFO PPI_DEVNAME ":PPI_RELEASE close()\n");

        ppi_reset();  

      free_dma(CH_PPI);

    disable_irq(IRQ_PPI);

    free_irq(IRQ_PPI,NULL);

    peripheral_free(P_PPI0_D0);

    peripheral_free(P_PPI0_D1);

    peripheral_free(P_PPI0_D2);

    peripheral_free(P_PPI0_D3);

    peripheral_free(P_PPI0_D4);

    peripheral_free(P_PPI0_D5);

    peripheral_free(P_PPI0_D6);

    peripheral_free(P_PPI0_D7);

  

    PPI_Status = 0;

    printk(KERN_INFO PPI_DEVNAME ":ppi_release: close() return\n");

      

    return 0;

}

static struct file_operations ppi_fops = {

    .owner    = THIS_MODULE,  

         .open    = PPI_OPEN,

    .write    = PPI_WRITE,

    .ioctl    = PPI_IOCTL,

          .release= PPI_CLOSE,

};

 

 

 

/*

*     PPI_init

*      It will be invoked when using 'insmod' command if added as module.

*      or, invoke it directly when Kernel boots .

*    

*      Input:

*             void

*      Modify:

*

*      Output:

*              int

*/

static struct class *ppi_class;

 

int __init PPI_init(void)

{

    int RetVal = -1,err=0;

 

    init_MUTEX_LOCKED(&ppi_sem);

 

    RetVal = register_chrdev(PPI_MAJOR, PPI_DEVNAME, &ppi_fops);

    if (RetVal < 0)

    {

        printk(KERN_ERR  PPI_DEVNAME ": can't get major %d\n", PPI_MAJOR);

        return RetVal;

    }

 

    ppi_class = class_create(THIS_MODULE,PPI_DEVNAME);

    if(IS_ERR(ppi_class))

        {

                printk(KERN_ERR  PPI_DEVNAME ":No device support\n");

        unregister_chrdev(PPI_MAJOR, PPI_DEVNAME);

                err = PTR_ERR(ppi_class);

                return err;

        }

 

    device_create(ppi_class, NULL, MKDEV(PPI_MAJOR, PPI_MINOR),NULL,PPI_DEVNAME );

    init_MUTEX_LOCKED(&ppi_7541);

    printk(KERN_INFO PPI_DEVNAME":#PPI INIT# \n");

    return 0;

}

 

module_init(PPI_init);

 

/*

*     PPI_exit

*       It will be invoked when using 'rmmod' command.

*       or, you invoke it directly when it needs remove

*       ppi module.

*      Input:

*             void

*      Modify:

*

*      Output:

*              void

*/

 

void __exit PPI_exit(void)

{

    device_destroy(ppi_class,MKDEV(PPI_MAJOR, PPI_MINOR));

       class_destroy(ppi_class);

    unregister_chrdev(PPI_MAJOR, PPI_DEVNAME);

    printk(KERN_ERR  PPI_DEVNAME ":PPI EXIT\n");

}

 

module_exit(PPI_exit);

 

 

*****************************************************************************************************************

 

console:

 

 

 

 

 

U-Boot 2010.06 (ADI-2010R1-RC2) (Jun 24 2011 - 19:03:09)

 

CPU:   ADSP bf527-0.0 (Detected Rev: 0.2) (parallel flash boot)

Board: ADI BF527 EZ-Kit board

       Support:   blackfin.uclinux.org/

Clock: VCO: 600 MHz, Core: 600 MHz, System: 120 MHz

RAM:   128 MiB

Flash: 16 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   bfin_mac

Hit any key to stop autoboot:  0

bfin> boot

Using bfin_mac device

TFTP from server

Filename 'uImage'.

Load address: 0x1200000

Loading: #################################################################

         #################################################################

         #################################################################

         #################################################################

         ############################################

done

Bytes transferred = 4462013 (4415bd hex)

## Booting kernel from Legacy Image at 01200000 ...

   Image Name:   bf527-2.6.34.7-ADI-2010R1

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4461949 Bytes = 4.3 MiB

   Load Address: 00005000

   Entry Point:  0029e670

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0029e670

console [ttyBF1] enabled, bootconsole disabled

Calibrating delay loop... 1159.16 BogoMIPS (lpj=2318336)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 32 KB (31 KB free)

Blackfin L1 Data B SRAM: 32 KB (32 KB free)

Blackfin L1 Instruction SRAM: 48 KB (41 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

request_dma() : BEGIN

request_dma() : END

request_dma() : BEGIN

request_dma() : END

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

msgmni has been set to 232

io scheduler noop registered

io scheduler cfq registered (default)

bfin-otp: initialized

bfin-uart: Blackfin serial driver

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

:BFIN-GPIO 25, 30

:BFIN-GPIO 27, 30

:BFIN-GPIO 23, 30

:BFIN-GPIO 26, 30

:BFIN-GPIO 28, 30

:BFIN-GPIO 21, 30

:BFIN-GPIO 24, 30

:BFIN-GPIO 1f, 30

:BFIN-GPIO 20, 30

:BFIN-GPIO 1e, 30

:BFIN-GPIO 22, 30

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

ppi0:#PPI INIT#

TCP cubic registered

NET: Registered protocol family 17

request_dma() : BEGIN

request_dma() : END

request_dma() : BEGIN

request_dma() : END

dma_alloc_init: dma_page @ 0x0484d000 - 256 pages at 0x07f00000

Freeing unused kernel memory: 6988k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/

/     \.___.d|    .'           -   www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin

 

Have a lot of fun...

i2c /dev entries driver

 

 

BusyBox v1.16.2 (2011-07-09 17:50:27 IST) hush - the humble shell

 

 

passthrough Started:BFIN-GPIO 0, 30

 

:BFIN-GPIO 1, 30

:BFIN-GPIO 2, 30

:BFIN-GPIO 3, 30

:BFIN-GPIO 4, 30

:BFIN-GPIO 5, 30

:BFIN-GPIO 6, 30

:BFIN-GPIO 7, 30

request_dma() : BEGIN

request_dma() : END

 

 

PPI_Frame==0x4e04c78,

ppi0:WRITE entered from main

PPI_Frame[359744]==0x7e

ppi0:WRITE

g8_PPI_FrameBuf==0x1a16c4,buf==0x4e04c78

ppi0:WRITE

g8_PPI_FrameBuf[359744]==0x7e,buf[359744]==0x7e

ppi0: DMA PPI ISR ENTERED

ppi0:PPI_CONTROL REG=0x43

ppi0:DMA_CONTROL REG=0x10d1

 

 

passthrough in Progress

QuoteReplyEditDelete

 

 

2011-07-11 05:42:18     Re: PPI no display

Scott Jiang (CHINA)

Message: 102316   

 

1. what is your encoder? have you configured it correctly?

 

2. Is control codes embedded in the buffer?

 

3. don't set FLD_SEL bit in ppi control, neither ppi delay when in TX syncless mode

 

4. set sync bit in dma config

QuoteReplyEditDelete

 

 

2011-07-11 06:04:56     Re: PPI no display

Scott Jiang (CHINA)

Message: 102317   

 

you forgot to program ppi count

QuoteReplyEditDelete

 

 

2011-07-11 10:12:30     Re: PPI no display

Aneesh Peterson (INDIA)

Message: 102318   

 

Thank you for your reply.......

 

 

 

1. what is your encoder? have you configured it correctly?

 

We are trying to pass the image through HDMI transmitter. Yes it is configured correctly.

 

2. Is control codes embedded in the buffer?

 

Actually the buffer has EAV,SAV,horizontal blanking,vertical blanking and active video in the prescribed itu-r 656(NTSC) frame format.

 

3. don't set FLD_SEL bit in ppi control, neither ppi delay when in TX syncless mode

 

4. set sync bit in dma config

 

i've made FLD_SEL=0 and removed ppi delay. Also i've set the sync bit in dma but still no output when running it , but when halting in VDSP (for debugging & viewing the buffer) image comes in TV.

 

(the configuration worked well in VDSP even when running it..)

 

 

 

I've also configured PPI_count value ,yet the same result. I read in the BF52x reference manual that for Tx mode with zero frame sync ppi count is not required that is why i left it .

 

 

 

Is there any additional changes to be made in the ISR . The image is displaying while halting the processor so i presume that ppi is transmitting the image , but i'm clueless why its not displaying while running it.

 

 

 

Please provide guidance for this....

 

 

 

With many Thanks,

 

Aneesh Peterson.

QuoteReplyEditDelete

 

 

2011-07-11 22:57:14     Re: PPI no display

Scott Jiang (CHINA)

Message: 102332   

 

you set dma in autobuffer mode, that means data is sent continuously. when you halt, the image is displayed, so you can try set dma to stop mode and display one frame. I guess there is a mismatch between ppi and hdmi. Perhaps bf527 can't support ntsc 30 fps, so try to limit the frame rate to 15fps first.

QuoteReplyEditDelete

 

 

2011-07-18 03:13:19     Re: PPI no display

Aneesh Peterson (INDIA)

Message: 102455   

 

HI.

 

    Thank you for your reply

 

     I tried to transfer 1 frame in stop mode, but transfer seems too fast, a blank screen on the TV for a second  and  then when dma stops alternative lines of green and a single line of the image stays on the TV . This is same as when closing the ppi driver when dma is in autobuffer mode.

 

 

 

Also when I tried to put a delay in the ISR (ppi_dma_irq)  , the image appears and vanishes.

 

The delay is made to occur only once,since i don't want disturb the system interrupts.

 

What could be the problem here ? Is there anyother configurations in kernel to be taken careof  for PPI to transmit to TV,apart from configuring DMA,PPI and tramnsmitter.

 

 

 

 

 

With Many Thanks,

 

Aneesh Peterson.

QuoteReplyEditDelete

 

 

2011-07-23 02:41:38     Re: PPI no display

Aneesh Peterson (INDIA)

Message: 102619   

 

HI,

 

Thanks for your replies....

 

The image got displayed when I enabled Packing in PPI and used 16 bit transfers in DMA.

 

I also used dma_alloc_coherent(); to allocate the memory for dma buffer.

 

Is it ok to use GFP_ATOMIC flag in the API dma_alloc_coherent()?

 

 

 

 

 

With many thanks,

 

Aneesh Peterson.

QuoteReplyEditDelete

 

 

2011-07-24 23:33:33     Re: PPI no display

Scott Jiang (CHINA)

Message: 102654   

 

I don't think you need GFP_ATOMIC flag. You shouldn't alloc dma buffer in the interrupt context.

Attachments

    Outcomes