private_voutput->mmwidth = mmWidth;
private_voutput->mmheight = mmHeight;
- wl_tdm_voutput_set_physical_size(private_voutput->wl_voutput, private_voutput->mmwidth, private_voutput->mmheight);
return TDM_ERROR_NONE;
}
private_output->connection = TDM_OUTPUT_CONN_STATUS_CONNECTED;
modes = private_voutput->available_modes.modes;
- for (i = 0; i < private_voutput->available_modes.count; i++)
- {
+ for (i = 0; i < private_voutput->available_modes.count; i++) {
wl_tdm_voutput_set_available_modes(private_voutput->wl_voutput, i,
modes[i].clock, modes[i].hdisplay,
modes[i].hsync_start, modes[i].hsync_end,
modes[i].flags, modes[i].type,
modes[i].name);
}
+ wl_tdm_voutput_set_physical_size(private_voutput->wl_voutput, private_voutput->mmwidth, private_voutput->mmheight);
wl_tdm_voutput_connect(private_voutput->wl_voutput);
void TDMVirtualOutput::TearDownTestCase(void)
{
+// TDM_UT_WAIT("check & press");
+
if (voutput)
tdm_client_voutput_destroy(voutput);
return true;
}
+static void
+_tc_tdm_client_virutual_make_available_mode(tdm_client_output_mode *modes, int count)
+{
+ int i;
+
+ for (i = 0; i < count; i++) {
+ modes[i].clock = 25200;
+ modes[i].hdisplay = 640;
+ modes[i].hsync_start = 656;
+ modes[i].hsync_end = 752;
+ modes[i].htotal = 800;
+ modes[i].hskew = 0;
+ modes[i].vdisplay = 480;
+ modes[i].vsync_start = 490;
+ modes[i].vsync_end = 492;
+ modes[i].vtotal = 525;
+ modes[i].vscan = 0;
+ modes[i].vrefresh = 30;
+ modes[i].flags = 0;
+ modes[i].type = 0;
+ snprintf(modes[i].name, TDM_NAME_LEN, "%dx%d_%d", modes[i].hdisplay, modes[i].vdisplay, i);
+ }
+}
+
TEST_F(TDMVirtualOutput, SetAvailableModes)
{
tdm_error ret;
tdm_client_output_mode modes[this->MODE_COUNT];
- int i, count = this->MODE_COUNT;
-
- for (i = 0; i < count; i++)
- {
- modes[i].clock = 1;
- modes[i].hdisplay = 2;
- modes[i].hsync_start = 3;
- modes[i].hsync_end = 4;
- modes[i].htotal = 5;
- modes[i].hskew = 6;
- modes[i].vdisplay = 7;
- modes[i].vsync_start = 8;
- modes[i].vsync_end = 9;
- modes[i].vtotal = 10;
- modes[i].vscan = 11;
- modes[i].vrefresh = 12;
- modes[i].flags = 13;
- modes[i].type = 14;
- snprintf(modes[i].name, TDM_NAME_LEN, "TestModeSetting %d", i);
- }
+ int count = this->MODE_COUNT;
+
+ _tc_tdm_client_virutual_make_available_mode(modes, count);
ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
ASSERT_EQ(ret, TDM_ERROR_NONE);
{
tdm_error ret;
tdm_client_output *output;
+ unsigned int mmWidth = 300, mmHeight = 150;
+ tdm_client_output_mode modes[this->MODE_COUNT];
+ int count = this->MODE_COUNT;
output = tdm_client_voutput_get_client_output(this->voutput, &ret);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ASSERT_NE(output, NULL);
+ ret = tdm_client_voutput_set_physical_size(this->voutput, mmWidth, mmHeight);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+
+ _tc_tdm_client_virutual_make_available_mode(modes, count);
+ ret = tdm_client_voutput_set_available_modes(this->voutput, modes, count);
+ ASSERT_EQ(ret, TDM_ERROR_NONE);
+
ret = tdm_client_output_connect(output);
ASSERT_EQ(ret, TDM_ERROR_NONE);
tdm_error ret;
tdm_client_output *output;
+// TDM_UT_WAIT("check & press");
+
output = tdm_client_voutput_get_client_output(this->voutput, &ret);
ASSERT_EQ(ret, TDM_ERROR_NONE);
ASSERT_NE(output, NULL);