Skip to content

Commit

Permalink
msm8960: Remove unused variables & functions
Browse files Browse the repository at this point in the history
For build-system CFLAGS clean-up, remove unused variables and
functions.

Bug: 18632512
Change-Id: Ib9e5013bfd95b7f32f3574e6945aa7637fc59339
  • Loading branch information
agampe committed Dec 9, 2014
1 parent 44c848f commit 6d5467d
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 27 deletions.
1 change: 0 additions & 1 deletion msm8960/libexternal/external.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,6 @@ bool ExternalDisplay::isInterlacedMode(int ID) {

void ExternalDisplay::setResolution(int ID)
{
struct fb_var_screeninfo info;
int ret = 0;
ret = ioctl(mFd, FBIOGET_VSCREENINFO, &mVInfo);
if(ret < 0) {
Expand Down
13 changes: 9 additions & 4 deletions msm8960/libgenlock/genlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@

#define GENLOCK_DEVICE "/dev/genlock"



#ifdef USE_GENLOCK

namespace {
/* Internal function to map the userspace locks to the kernel lock types */
int get_kernel_lock_type(genlock_lock_type lockType)
{
int kLockType = 0;
#ifdef USE_GENLOCK
// If the user sets both a read and write lock, higher preference is
// given to the write lock.
if (lockType & GENLOCK_WRITE_LOCK) {
Expand All @@ -57,7 +60,6 @@ namespace {
__FUNCTION__, lockType);
return -1;
}
#endif
return kLockType;
}

Expand All @@ -66,7 +68,6 @@ namespace {
int lockType, int timeout,
int flags)
{
#ifdef USE_GENLOCK
if (private_handle_t::validate(buffer_handle)) {
ALOGE("%s: handle is invalid", __FUNCTION__);
return GENLOCK_FAILURE;
Expand Down Expand Up @@ -109,7 +110,6 @@ namespace {
}
#endif
}
#endif
return GENLOCK_NO_ERROR;
}

Expand All @@ -127,6 +127,11 @@ namespace {
}
}
}

#endif // USE_GENLOCK



/*
* Create a genlock lock. The genlock lock file descriptor and the lock
* handle are stored in the buffer_handle.
Expand Down
2 changes: 0 additions & 2 deletions msm8960/libgralloc/framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ static int fb_setSwapInterval(struct framebuffer_device_t* dev,
if (property_interval >= 0)
interval = property_interval;

fb_context_t* ctx = (fb_context_t*)dev;
private_module_t* m = reinterpret_cast<private_module_t*>(
dev->common.module);
if (interval < dev->minSwapInterval || interval > dev->maxSwapInterval)
Expand Down Expand Up @@ -309,7 +308,6 @@ int mapFrameBufferLocked(struct private_module_t* module)
* map the framebuffer
*/

int err;
module->numBuffers = info.yres_virtual / info.yres;
module->bufferMask = 0;
//adreno needs page aligned offsets. Align the fbsize to pagesize.
Expand Down
1 change: 0 additions & 1 deletion msm8960/libgralloc/ionalloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ int IonAlloc::clean_buffer(void *base, size_t size, int offset, int fd, int op)
struct ion_flush_data flush_data;
struct ion_fd_data fd_data;
struct ion_handle_data handle_data;
struct ion_handle* handle;
int err = 0;

err = open_device();
Expand Down
2 changes: 1 addition & 1 deletion msm8960/libgralloc/mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ int gralloc_perform(struct gralloc_module_t const* module,
int format = va_arg(args, int);

native_handle_t** handle = va_arg(args, native_handle_t**);
int memoryFlags = va_arg(args, int);
int memoryFlags __attribute__((__unused__)) = va_arg(args, int);
private_handle_t* hnd = (private_handle_t*)native_handle_create(
private_handle_t::sNumFds, private_handle_t::sNumInts);
hnd->magic = private_handle_t::sMagic;
Expand Down
1 change: 0 additions & 1 deletion msm8960/libhwcomposer/hwc_copybit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ bool CopyBit::draw(hwc_context_t *ctx, hwc_display_contents_1_t *list,
clear(renderBuffer, clearRegion);
// numAppLayers-1, as we iterate from 0th layer index with HWC_COPYBIT flag
for (int i = 0; i <= (ctx->listStats[dpy].numAppLayers-1); i++) {
hwc_layer_1_t *layer = &list->hwLayers[i];
if(!(layerProp[i].mFlags & HWC_COPYBIT)) {
ALOGD_IF(DEBUG_COPYBIT, "%s: Not Marked for copybit", __FUNCTION__);
continue;
Expand Down
5 changes: 0 additions & 5 deletions msm8960/libhwcomposer/hwc_mdpcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ void MDPComp::setMDPCompLayerFlags(hwc_context_t *ctx,
*/
bool MDPComp::setupBasePipe(hwc_context_t *ctx) {
const int dpy = HWC_DISPLAY_PRIMARY;
int fb_stride = ctx->dpyAttr[dpy].stride;
int fb_width = ctx->dpyAttr[dpy].xres;
int fb_height = ctx->dpyAttr[dpy].yres;
int fb_fd = ctx->dpyAttr[dpy].fd;
Expand Down Expand Up @@ -265,7 +264,6 @@ void MDPComp::LayerCache::updateCounts(const FrameInfo& curFrame) {
}

bool MDPComp::isValidDimension(hwc_context_t *ctx, hwc_layer_1_t *layer) {
const int dpy = HWC_DISPLAY_PRIMARY;
private_handle_t *hnd = (private_handle_t *)layer->handle;

if(!hnd) {
Expand Down Expand Up @@ -344,7 +342,6 @@ ovutils::eDest MDPComp::getMdpPipe(hwc_context_t *ctx, ePipeType type) {
}

bool MDPComp::isFrameDoable(hwc_context_t *ctx) {
int numAppLayers = ctx->listStats[mDpy].numAppLayers;
bool ret = true;

if(!isEnabled()) {
Expand Down Expand Up @@ -834,8 +831,6 @@ bool MDPCompLowRes::allocLayerPipes(hwc_context_t *ctx,
if(mCurrentFrame.isFBComposed[nYuvIndex])
continue;

hwc_layer_1_t* layer = &list->hwLayers[nYuvIndex];

int mdpIndex = mCurrentFrame.layerToMDP[nYuvIndex];

PipeLayerPair& info = mCurrentFrame.mdpToLayer[mdpIndex];
Expand Down
2 changes: 0 additions & 2 deletions msm8960/libhwcomposer/hwc_uevents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ static bool isHDMI(const char* str)

static void handle_uevent(hwc_context_t* ctx, const char* udata, int len)
{
int vsync = 0;
int64_t timestamp = 0;
const char *str = udata;
bool usecopybit = false;
int compositionType =
Expand Down
5 changes: 0 additions & 5 deletions msm8960/libhwcomposer/hwc_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ static int ppdComm(const char* cmd, hwc_context_t *ctx) {

static void connectPPDaemon(hwc_context_t *ctx)
{
int ret = -1;
char property[PROPERTY_VALUE_MAX];
if ((property_get("ro.qualcomm.cabl", property, NULL) > 0) &&
(atoi(property) == 1)) {
Expand Down Expand Up @@ -569,8 +568,6 @@ void calculate_crop_rects(hwc_rect_t& crop, hwc_rect_t& dst,
const int& sci_t = scissor.top;
const int& sci_r = scissor.right;
const int& sci_b = scissor.bottom;
int sci_w = abs(sci_r - sci_l);
int sci_h = abs(sci_b - sci_t);

float leftCutRatio = 0.0f, rightCutRatio = 0.0f, topCutRatio = 0.0f,
bottomCutRatio = 0.0f;
Expand Down Expand Up @@ -655,7 +652,6 @@ int hwc_sync(hwc_context_t *ctx, hwc_display_contents_1_t* list, int dpy,
int releaseFd = -1;
int retireFd = -1;
int fbFd = -1;
int rotFd = -1;
bool swapzero = false;
int mdpVersion = qdutils::MDPVersion::getInstance().getMDPVersion();

Expand Down Expand Up @@ -853,7 +849,6 @@ static inline int configRotator(Rotator *rot, const Whf& whf,
*/
bool setupBasePipe(hwc_context_t *ctx) {
const int dpy = HWC_DISPLAY_PRIMARY;
int fb_stride = ctx->dpyAttr[dpy].stride;
int fb_width = ctx->dpyAttr[dpy].xres;
int fb_height = ctx->dpyAttr[dpy].yres;
int fb_fd = ctx->dpyAttr[dpy].fd;
Expand Down
1 change: 0 additions & 1 deletion msm8960/libhwcomposer/hwc_vsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ static void *vsync_loop(void *param)
uint64_t cur_timestamp=0;
ssize_t len = -1;
int fd_timestamp = -1;
int ret = 0;
bool fb1_vsync = false;
bool logvsync = false;

Expand Down
3 changes: 1 addition & 2 deletions msm8960/liblight/lights.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ static int
set_speaker_light_locked(struct light_device_t* dev,
struct light_state_t const* state)
{
int len;
int alpha, rgb;
int rgb;
int blink, freq, pwm;
int onMS, offMS;
unsigned int colorRGB;
Expand Down
1 change: 0 additions & 1 deletion msm8960/libmemtrack/kgsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
size_t *num_records)
{
size_t allocated_records = min(*num_records, ARRAY_SIZE(record_templates));
int i;
FILE *fp;
char line[1024];
char tmp[128];
Expand Down
2 changes: 1 addition & 1 deletion msm8960/liboverlay/overlayMdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ void MdpCtrl3D::dump() const {
}

bool MdpCtrl::setVisualParams(const MetaData_t& data) {
bool needUpdate = false;
#ifdef USES_POST_PROCESSING
bool needUpdate = false;
/* calculate the data */
if (data.operation & PP_PARAM_HSIC) {
if (mParams.params.pa_params.hue != data.hsicData.hue) {
Expand Down

0 comments on commit 6d5467d

Please sign in to comment.