Skip to content

Commit

Permalink
pdmonboard: Fix display resolution change.
Browse files Browse the repository at this point in the history
You can connect a multisync display which should support 640x480 and 832x624.
  • Loading branch information
joevt authored and dingusdev committed Nov 13, 2024
1 parent f53a7cc commit f27b8ba
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions devices/video/pdmonboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ void PdmOnboardVideo::set_video_mode(uint8_t new_mode)
case PdmVideoMode::VGA:
if (this->video_mode != (new_mode & 0x1F)) {
this->video_mode = new_mode & 0x1F;
LOG_F(INFO, "PDM-Video: video mode set to 0x%X", this->video_mode);
}
if (!this->blanking) {
this->enable_video_internal();
LOG_F(INFO, "PDM-Video: video mode changed to 0x%X", this->video_mode);
}
this->enable_video_internal();
break;
default:
LOG_F(9, "PDM-Video: video disabled, new mode = 0x%X", new_mode & 0x1F);
Expand Down Expand Up @@ -165,7 +163,8 @@ void PdmOnboardVideo::enable_video_internal()
case PdmVideoMode::Rgb16in:
case PdmVideoMode::VGA:
if (this->pixel_depth > 8) {
ABORT_F("PDM-Video: no 16bpp support in mode %d!", this->video_mode);
LOG_F(ERROR, "PDM-Video: no 16bpp support in mode %d!", this->video_mode);
this->pixel_depth = 8;
}
default:
break;
Expand Down Expand Up @@ -212,10 +211,6 @@ void PdmOnboardVideo::enable_video_internal()
ABORT_F("PDM-Video: invalid video mode %d", this->video_mode);
}

if (new_width != this->active_width || new_height != this->active_height) {
LOG_F(WARNING, "Display window resizing not implemented yet!");
}

// figure out where our framebuffer is located
uint64_t hmc_control = this->hmc_obj->get_control_reg();
uint32_t fb_base_phys = ((hmc_control >> HMC_VBASE_BIT) & 1) ? 0 : 0x100000;
Expand Down

0 comments on commit f27b8ba

Please sign in to comment.