void mdss_dsi_error(struct mdss_dsi_ctrl_pdata *ctrl) { /* disable dsi error interrupt */ mdss_dsi_err_intr_ctrl(ctrl, DSI_INTR_ERROR_MASK, 0); /* DSI_ERR_INT_MASK0 */ mdss_dsi_clk_status(ctrl); /* Mask0, 0x10000000 */ mdss_dsi_fifo_status(ctrl); /* mask0, 0x133d00 */ mdss_dsi_ack_err_status(ctrl); /* mask0, 0x01f */ mdss_dsi_timeout_status(ctrl); /* mask0, 0x0e0 */ mdss_dsi_status(ctrl); /* mask0, 0xc0100 */ mdss_dsi_dln0_phy_err(ctrl); /* mask0, 0x3e00000 */ dsi_send_events(ctrl, DSI_EV_MDP_BUSY_RELEASE); #if defined(CONFIG_F_SKYDISP_EF63_SS) //ejkim77_debug dump #ifdef F_WA_WATCHDOG_DURING_BOOTUP if(ctrl->octa_blck_set && !ctrl->manufacture_id) #endif { dumpreg(); BUG_ON(1); } #endif }
void mdss_dsi_fifo_status(struct mdss_dsi_ctrl_pdata *ctrl) { u32 status; unsigned char *base; base = ctrl->ctrl_base; status = MIPI_INP(base + 0x000c);/* DSI_FIFO_STATUS */ /* fifo underflow, overflow */ if (status & 0xcccc4489) { MIPI_OUTP(base + 0x000c, status); pr_err("%s: status=%x\n", __func__, status); if (status & 0x0080) /* CMD_DMA_FIFO_UNDERFLOW */ dsi_send_events(ctrl, DSI_EV_MDP_FIFO_UNDERFLOW); #if defined (CONFIG_FB_MSM_MIPI_SAMSUNG_OCTA_CMD_WQHD_PT_PANEL) if (status == 0x99991080) { dumpreg(); mdp5_dump_regs(); mdss_dsi_dump_power_clk(&ctrl->panel_data, 0); mdss_mdp_dump_power_clk(); mdss_mdp_debug_bus(); xlog_dump(); panic("mdss_dsi_fifo err"); } #endif } }
void mdss_dsi_cmd_mdp_busy(struct mdss_dsi_ctrl_pdata *ctrl) { unsigned long flags; int need_wait = 0; static int busy_timeout_cnt; pr_debug("%s: start pid=%d\n", __func__, current->pid); spin_lock_irqsave(&ctrl->mdp_lock, flags); if (ctrl->mdp_busy == true) need_wait++; #if defined (CONFIG_FB_MSM_MDSS_DSI_DBG) xlog(__func__,ctrl->ndx, ctrl->mdp_busy, 0, 0, 0, 0); #endif spin_unlock_irqrestore(&ctrl->mdp_lock, flags); if (need_wait) { /* wait until DMA finishes the current job */ pr_debug("%s: pending pid=%d\n", __func__, current->pid); if (!wait_for_completion_timeout(&ctrl->mdp_comp,\ msecs_to_jiffies(1000))) { pr_info("%s: wait_for_completion_timeout (count : %d)", __func__, ++busy_timeout_cnt); /*WARN(1, "mdss_dsi_cmd_mdp_busy timeout");*/ #if defined (CONFIG_FB_MSM_MIPI_SAMSUNG_OCTA_CMD_WQHD_PT_PANEL) dumpreg(); mdp5_dump_regs(); mdss_dsi_dump_power_clk(&ctrl->panel_data, 0); mdss_mdp_dump_power_clk(); mdss_mdp_debug_bus(); xlog_dump(); #if 0 pr_info("run recovery function instead of force panic\n"); dsi_send_events(ctrl, DSI_EV_MDP_BUSY_RELEASE); #else panic("mdss_dsi_cmd_mdp_busy timeout"); #endif #endif } } pr_debug("%s: done pid=%d\n", __func__, current->pid); }
void Ssyscall(ulong inst) { int call; USED(inst); call = reg.r[REGRET]; if(call < 0 || call > PWRITE || systab[call] == nil) { Bprint(bioout, "Bad system call\n"); dumpreg(); } if(trace) itrace("sysc\t%s", sysctab[call]); (*systab[call])(); Bflush(bioout); }
void Ssyscall(uint32_t) { int call; call = reg.r[REGARG]; if(call < 0 || call >= nelem(systab) || systab[call] == nil) { Bprint(bioout, "bad system call %d (%#ux)\n", call, call); dumpreg(); Bflush(bioout); return; } if(trace) itrace("SWI\t%s", sysctab[call]); (*systab[call])(); Bflush(bioout); }
int main( int argc, char **argv ) { char buffer[4096]; int port; int rval; int sd; struct sockaddr_in socketaddr; struct hostent *hostaddr; struct protoent *protocol; gdbwrap_t *desc = NULL; if ( argc < 3 ) { printf( "usage: client server port \n" ); return (EINVAL); /* Invalid argument */ } /* quick sanity check */ port = atoi( argv[2] ); if ( port < 1 || port > 65535 ) { printf( "client: invalid port number\n" ); return (EINVAL); } /* * Build our socket */ protocol = getprotobyname( "tcp" ); if ( !protocol ) { perror( "getprotobyname()" ); return (errno); } sd = socket( PF_INET, SOCK_STREAM, protocol->p_proto ); if ( sd == -1 ) { perror( "socket()" ); return (errno); } /* * Setup info about the remote host */ memset( &socketaddr, 0, sizeof(socketaddr) ); socketaddr.sin_family = AF_INET; socketaddr.sin_port = htons( port ); hostaddr = gethostbyname( argv[1] ); if ( !hostaddr ) { fprintf( stderr, "gethostbyname(): %s\n", hstrerror(h_errno) ); return (h_errno); } /* copy address from hostaddr to socketaddr */ memcpy( &socketaddr.sin_addr, hostaddr->h_addr, hostaddr->h_length ); /* * Connect to the host */ rval = connect( sd, (struct sockaddr *) &socketaddr, sizeof(socketaddr) ); if ( rval == -1 ) { perror( "connect()" ); return (errno); } /* Now that we're connected, we can send and receive all we want. * I've decided to use this example as a means of simply grabbing * whatever banner the server sends us and sending it to stdout. */ // 28 registers of 4 bytes for sh4 desc = gdbwrap_init(sd,28,4); do { char * ret; ret = fgets(buffer, sizeof(buffer) - 1, stdin); assert(ret != NULL); if(!strncmp("hello", buffer, 5)) gdbwrap_hello(desc); else if(!strncmp("disconnect", buffer, 5)) { gdbwrap_bye(desc); exit(0); } else if(!strncmp("why", buffer, 3)) gdbwrap_reason_halted(desc); /* else if(!strncmp("test", buffer, 4)) */ /* gdbwrap_test(desc); */ else if(!strncmp("gpr", buffer, 3)) gdbwrap_readgenreg(desc); else if(!strncmp("cont", buffer, 4)) gdbwrap_continue(desc); else if(!strncmp("dump", buffer, 4)) dumpreg(desc); else if(!strncmp("stepi", buffer, 5)) gdbwrap_stepi(desc); else if(!strncmp("signal", buffer, 5)) gdbwrap_signal(desc, 0x1); else if(!strncmp("ship", buffer, 4)) gdbwrap_shipallreg(desc); else if(!strncmp("cr0", buffer, 4)) printf("Value: %s\n", gdbwrap_remotecmd(desc, "r cr0")); else if(!strncmp("mem", buffer, 3)) { char *c; char u = 0xff; // c = gdbwrap_writemem(desc, 0xb7fe49a0, &u, 0x1); printf("Returned from memorycontent: %s\n", c); fflush(stdout); } /* else if(!strncmp("own", buffer, 3)) */ /* { */ /* while (strncmp("quitown", buffer, 7)) */ /* { */ /* printf("\nCommand: "); */ /* ret = gdbwrap_own_command(fgets(buffer, sizeof(buffer) - 1, stdin), */ /* desc); */ /* printf("\n%s - size: %d", ret, strlen(ret)); */ /* } */ /* } */ else printf("not supported yet\n"); } while (strncmp("bye", buffer, 3)); close(sd); return (0); }
void dollar(char *cp) { cp = nextc(cp); switch(*cp) { default: Bprint(bioout, "?\n"); break; case 'c': case 'C': stktrace(*cp); break; case 'b': dobplist(); break; case 'r': dumpreg(); break; case 'R': dumpreg(); /* fall through */ case 'f': dumpfreg(); break; case 'F': dumpdreg(); break; case 'q': exits(0); break; case 'Q': isum(); segsum(); break; case 't': cp++; switch(*cp) { default: Bprint(bioout, ":t[0sic]\n"); break; case '\0': trace = 1; break; case '0': trace = 0; sysdbg = 0; calltree = 0; break; case 's': sysdbg = 1; break; case 'i': trace = 1; break; case 'c': calltree = 1; break; } break; case 'i': cp++; switch(*cp) { default: Bprint(bioout, "$i[isa]\n"); break; case 'i': isum(); break; case 's': segsum(); break; case 'a': isum(); segsum(); iprofile(); break; case 'p': iprofile(); break; } } }
static int mdss_dsi_cmd_dma_tx(struct mdss_dsi_ctrl_pdata *ctrl, struct dsi_buf *tp) { int len, ret = 0; int domain = MDSS_IOMMU_DOMAIN_UNSECURE; char *bp; unsigned long size, addr; #ifdef DEBUG_CMD int i; bp = tp->data; pr_info("%s: ", __func__); for (i = 0; i < tp->len; i++) printk("%x ", *bp++); pr_info("\n"); #endif bp = tp->data; len = ALIGN(tp->len, 4); size = ALIGN(tp->len, SZ_4K); tp->dmap = dma_map_single(&dsi_dev, tp->data, size, DMA_TO_DEVICE); if (dma_mapping_error(&dsi_dev, tp->dmap)) { pr_err("%s: dmap mapp failed\n", __func__); return -ENOMEM; } if (is_mdss_iommu_attached()) { int ret = msm_iommu_map_contig_buffer(tp->dmap, mdss_get_iommu_domain(domain), 0, size, SZ_4K, 0, &(addr)); if (IS_ERR_VALUE(ret)) { pr_err("unable to map dma memory to iommu(%d)\n", ret); return -ENOMEM; } } else { addr = tp->dmap; } INIT_COMPLETION(ctrl->dma_comp); if (ctrl->shared_pdata.broadcast_enable) if ((ctrl->ndx == DSI_CTRL_1) && (left_ctrl_pdata != NULL)) { MIPI_OUTP(left_ctrl_pdata->ctrl_base + 0x048, addr); MIPI_OUTP(left_ctrl_pdata->ctrl_base + 0x04c, len); } MIPI_OUTP((ctrl->ctrl_base) + 0x048, addr); MIPI_OUTP((ctrl->ctrl_base) + 0x04c, len); wmb(); if (ctrl->shared_pdata.broadcast_enable) if ((ctrl->ndx == DSI_CTRL_1) && (left_ctrl_pdata != NULL)) { MIPI_OUTP(left_ctrl_pdata->ctrl_base + 0x090, 0x01); } MIPI_OUTP((ctrl->ctrl_base) + 0x090, 0x01); /* trigger */ wmb(); ret = wait_for_completion_timeout(&ctrl->dma_comp, msecs_to_jiffies(DMA_TX_TIMEOUT)); if (ret == 0) { #if defined (CONFIG_FB_MSM_MDSS_DSI_DBG) dumpreg(); mdp5_dump_regs(); mdss_dsi_dump_power_clk(&ctrl->panel_data, 0); mdss_mdp_dump_power_clk(); mdss_mdp_debug_bus(); xlog_dump(); #endif pr_err("dma tx timeout!!\n"); ret = -ETIMEDOUT; } else ret = tp->len; if (is_mdss_iommu_attached()) msm_iommu_unmap_contig_buffer(addr, mdss_get_iommu_domain(domain), 0, size); return ret; }
static int mipi_samsung_disp_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; struct mipi_panel_info *mipi; static int boot_on; #ifdef __DEBUG__ static int test=0 ; #endif mfd = platform_get_drvdata(pdev); if (unlikely(!mfd)) return -ENODEV; if (unlikely(mfd->key != MFD_KEY)) return -EINVAL; mipi = &mfd->panel_info.mipi; #ifdef USE_READ_ID if (unlikely(!boot_on)) { msd.mpd->manufacture_id = mipi_samsung_manufacture_id(mfd); /*Display was initialized in bootloader,same settings are carried when splash is enabled*/ } #endif #if defined(CONFIG_FB_MDP4_ENHANCE) is_negativeMode_on(); #endif #ifdef __DEBUG__ if(test==0) if(0) dumpreg(1); test++; #endif mipi_samsung_disp_send_cmd(mfd, PANEL_READY_TO_ON, false); if(!boot_on) boot_on = 1; else msleep(100); #if defined(CONFIG_ESD_ERR_FG_RECOVERY) enable_irq(err_fg_gpio); #endif #ifndef CONFIG_MACH_CANE_EUR_3G pr_info("%s: DISP_BL_CONT_GPIO High\n", __func__); gpio_set_value(DISP_BL_CONT_GPIO, 1); #endif #if !defined(CONFIG_HAS_EARLYSUSPEND) mipi_samsung_disp_send_cmd(mfd, PANEL_LATE_ON, false); #endif #if defined(CONFIG_MACH_CANE_EUR_3G) mfd->resume_state = MIPI_RESUME_STATE; #endif return 0; }