pl111.cc (9179:666bc9df1e49) | pl111.cc (9180:ee8d7a51651d) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 461 unchanged lines hidden (view full) --- 470 0, Request::UNCACHEABLE); 471 curAddr += dmaSize; 472 } 473} 474 475void 476Pl111::dmaDone() 477{ | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 461 unchanged lines hidden (view full) --- 470 0, Request::UNCACHEABLE); 471 curAddr += dmaSize; 472 } 473} 474 475void 476Pl111::dmaDone() 477{ |
478 Tick maxFrameTime = lcdTiming2.cpl * height; | 478 Cycles maxFrameTime(lcdTiming2.cpl * height); |
479 480 --dmaPendingNum; 481 482 if (maxAddr == curAddr && !dmaPendingNum) { 483 if ((curCycle() - startTime) > maxFrameTime) { 484 warn("CLCD controller buffer underrun, took %d cycles when should" 485 " have taken %d\n", curTick() - startTime, maxFrameTime); 486 lcdRis.underflow = 1; --- 11 unchanged lines hidden (view full) --- 498 pic->seekp(0); 499 bmp->write(pic); 500 501 // schedule the next read based on when the last frame started 502 // and the desired fps (i.e. maxFrameTime), we turn the 503 // argument into a relative number of cycles in the future by 504 // subtracting curCycle() 505 if (lcdControl.lcden) | 479 480 --dmaPendingNum; 481 482 if (maxAddr == curAddr && !dmaPendingNum) { 483 if ((curCycle() - startTime) > maxFrameTime) { 484 warn("CLCD controller buffer underrun, took %d cycles when should" 485 " have taken %d\n", curTick() - startTime, maxFrameTime); 486 lcdRis.underflow = 1; --- 11 unchanged lines hidden (view full) --- 498 pic->seekp(0); 499 bmp->write(pic); 500 501 // schedule the next read based on when the last frame started 502 // and the desired fps (i.e. maxFrameTime), we turn the 503 // argument into a relative number of cycles in the future by 504 // subtracting curCycle() 505 if (lcdControl.lcden) |
506 schedule(readEvent, clockEdge(startTime + maxFrameTime - 507 curCycle())); | 506 // @todo: This is a terrible way of doing the time 507 // keeping, make it all relative 508 schedule(readEvent, 509 clockEdge(Cycles(startTime - curCycle() + 510 maxFrameTime))); |
508 } 509 510 if (dmaPendingNum > (maxOutstandingDma - waterMark)) 511 return; 512 513 if (!fillFifoEvent.scheduled()) 514 schedule(fillFifoEvent, nextCycle()); 515} --- 227 unchanged lines hidden --- | 511 } 512 513 if (dmaPendingNum > (maxOutstandingDma - waterMark)) 514 return; 515 516 if (!fillFifoEvent.scheduled()) 517 schedule(fillFifoEvent, nextCycle()); 518} --- 227 unchanged lines hidden --- |