[PATCH 2/3] compositor-drm: Add switch_mode support.

Alex Wu zhiwen.wu at linux.intel.com
Tue Apr 17 18:26:38 PDT 2012


于 2012/4/18 9:01, Juan Zhao 写道:
> On 04/17/2012 05:20 PM, zhiwen.wu at linux.intel.com wrote:
>> + if (!drm_mode) {
>> + printf("%s, invalid resolution:%dx%d\n", __func__, mode->width, 
>> mode->height);
>> + return -1;
>> + } else if (&drm_mode->base == output->base.current) {
>> + return 0;
>> + } else if (drm_mode->base.width == output->base.current->width&&
>> + drm_mode->base.height == output->base.current->height) {
>> + /* only change refresh value */
>> + ret = drmModeSetCrtc(ec->drm.fd,
>> + output->crtc_id,
>> + output->current_fb_id, 0, 0,
>> + &output->connector_id, 1,&drm_mode->mode_info);
>> +
>> + if (ret) {
>> + fprintf(stderr, "failed to set mode (%dx%d) %u Hz\n",
>> + drm_mode->base.width,
>> + drm_mode->base.height,
>> + drm_mode->base.refresh);
>> + ret = -1;
> I would suggest align the error message by fprintf(stderr, "xxx"), or 
> some general error message report method.
> Because we don't have that general error message report method now, I 
> suggest to use "fprintf(stderr, "xxxx")".
Yes, I will fix it in next version
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



More information about the wayland-devel mailing list