Skip to content

Commit

Permalink
Merge "hwc2: Add validation for display Id for DSI clock binder APIs"
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux Build Service Account authored and Gerrit - the friendly Code Review server committed Dec 13, 2018
2 parents fac6a66 + 3fe36a7 commit ed80787
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdm/libs/hwc2/hwc_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ void HWCSession::SetFrameDumpConfig(const android::Parcel *input_parcel) {
android::status_t HWCSession::SetDsiClk(const android::Parcel *input_parcel) {
int disp_id = input_parcel->readInt32();
uint64_t clk = UINT32(input_parcel->readInt64());
if (disp_id < 0 || !hwc_display_[disp_id]) {
if (disp_id != HWC_DISPLAY_PRIMARY || !hwc_display_[disp_id]) {
return -EINVAL;
}

Expand All @@ -1239,7 +1239,7 @@ android::status_t HWCSession::SetDsiClk(const android::Parcel *input_parcel) {
android::status_t HWCSession::GetDsiClk(const android::Parcel *input_parcel,
android::Parcel *output_parcel) {
int disp_id = input_parcel->readInt32();
if (disp_id < 0 || !hwc_display_[disp_id]) {
if (disp_id != HWC_DISPLAY_PRIMARY || !hwc_display_[disp_id]) {
return -EINVAL;
}

Expand All @@ -1252,7 +1252,7 @@ android::status_t HWCSession::GetDsiClk(const android::Parcel *input_parcel,
android::status_t HWCSession::GetSupportedDsiClk(const android::Parcel *input_parcel,
android::Parcel *output_parcel) {
int disp_id = input_parcel->readInt32();
if (disp_id < 0 || !hwc_display_[disp_id]) {
if (disp_id != HWC_DISPLAY_PRIMARY || !hwc_display_[disp_id]) {
return -EINVAL;
}

Expand Down

0 comments on commit ed80787

Please sign in to comment.