hwc: Add scalar tag to dynamic debug

Expand dynamic debug function to allow scalar logging.

Change-Id: Ib1fb19788902dbcc0179856e139d3e3146ae8e52
CRs-Fixed: 2063587
This commit is contained in:
Rohit Kulkarni
2017-06-13 10:26:39 -07:00
committed by Gerrit - the friendly Code Review server
parent 5fcddafbf3
commit aa5111ba22
4 changed files with 18 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 The Android Open Source Project
* Copyright (C) 2012-2014, 2016 The Linux Foundation. All rights reserved.
* Copyright (C) 2012-2014, 2016-2017 The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are
* retained for attribution purposes only.
@@ -93,6 +93,7 @@ public:
DEBUG_DRIVER_CONFIG,
DEBUG_ROTATOR,
DEBUG_QDCM,
DEBUG_SCALAR,
};
enum {

View File

@@ -98,6 +98,16 @@ void HWCDebugHandler::DebugRotator(bool enable, int verbose_level) {
}
}
void HWCDebugHandler::DebugScalar(bool enable, int verbose_level) {
if (enable) {
debug_flags_[kTagScalar] = 1;
verbose_level_ = verbose_level;
} else {
debug_flags_[kTagScalar] = 0;
verbose_level_ = 0;
}
}
void HWCDebugHandler::DebugQdcm(bool enable, int verbose_level) {
if (enable) {
debug_flags_[kTagQDCM] = 1;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -50,6 +50,7 @@ class HWCDebugHandler : public DebugHandler {
static void DebugCompManager(bool enable, int verbose_level);
static void DebugDriverConfig(bool enable, int verbose_level);
static void DebugRotator(bool enable, int verbose_level);
static void DebugScalar(bool enable, int verbose_level);
static void DebugQdcm(bool enable, int verbose_level);
static int GetIdleTimeoutMs();

View File

@@ -1293,6 +1293,10 @@ void HWCSession::DynamicDebug(const android::Parcel *input_parcel) {
HWCDebugHandler::DebugQdcm(enable, verbose_level);
break;
case qService::IQService::DEBUG_SCALAR:
HWCDebugHandler::DebugScalar(enable, verbose_level);
break;
default:
DLOGW("type = %d is not supported", type);
}