Skip to content

Commit

Permalink
Update device.hdr() response (#598)
Browse files Browse the repository at this point in the history
* update device.hdr() response

* exclude Technicolor from device.hdr respose to align with update Firebolt Spec
  • Loading branch information
maggie98choy authored Aug 22, 2024
1 parent 5a91963 commit 7f3ebb7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 4 additions & 1 deletion core/main/src/firebolt/handlers/device_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,10 @@ impl DeviceServer for DeviceImpl {

match resp {
Ok(response) => match response.payload.extract().unwrap() {
DeviceResponse::HdrResponse(value) => Ok(value),
DeviceResponse::HdrResponse(value) => Ok(value
.into_iter()
.filter(|&(p, _)| p != HdrProfile::Technicolor)
.collect()),
_ => Err(jsonrpsee::core::Error::Custom(String::from(
"Hdr capabilities error response TBD",
))),
Expand Down
10 changes: 5 additions & 5 deletions core/sdk/src/api/device/device_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ pub enum HdcpProfile {

#[derive(Hash, Eq, PartialEq, Debug, Serialize, Deserialize, Clone, Copy)]
pub enum HdrProfile {
#[serde(rename = "HDR10")]
#[serde(rename = "hdr10")]
Hdr10,
#[serde(rename = "HDR10+")]
#[serde(rename = "hdr10Plus")]
Hdr10plus,
#[serde(rename = "HLG")]
#[serde(rename = "hlg")]
Hlg,
#[serde(rename = "Dolby Vision")]
#[serde(rename = "dolbyVision")]
DolbyVision,
#[serde(rename = "Technicolor")]
#[serde(rename = "technicolor")]
Technicolor,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pub mod hdr_flags {
pub const HDRSTANDARD_HLG: u32 = 0x02;
pub const HDRSTANDARD_DOLBY_VISION: u32 = 0x04;
pub const HDRSTANDARD_TECHNICOLOR_PRIME: u32 = 0x08;
pub const HDRSTANDARD_HDR10PLUS: u32 = 0x10;
}

#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down Expand Up @@ -798,6 +799,10 @@ impl ThunderDeviceInfoRequestProcessor {
HdrProfile::Technicolor,
0 != (supported_cap & hdr_flags::HDRSTANDARD_TECHNICOLOR_PRIME),
);
hm.insert(
HdrProfile::Hdr10plus,
0 != (supported_cap & hdr_flags::HDRSTANDARD_HDR10PLUS),
);
hm
}

Expand Down

0 comments on commit 7f3ebb7

Please sign in to comment.