Subversion Repositories Kolibri OS

Rev

Rev 1179 | Rev 1221 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1179 Rev 1182
Line 442... Line 442...
442
 
442
 
443
bool set_mode(struct drm_device *dev, int width, int height)
443
bool set_mode(struct drm_device *dev, int width, int height)
444
{
444
{
Line 445... Line 445...
445
    struct drm_connector *connector;
445
    struct drm_connector *connector;
Line 446... Line 446...
446
 
446
 
447
    bool   ret;
447
    bool ret = false;
448
 
448
 
Line 463... Line 463...
463
        crtc = encoder->crtc;
463
        crtc = encoder->crtc;
Line 464... Line 464...
464
 
464
 
465
        if(crtc == NULL)
465
        if(crtc == NULL)
Line -... Line 466...
-
 
466
            continue;
-
 
467
 
-
 
468
 
-
 
469
        list_for_each_entry(mode, &connector->modes, head)
-
 
470
        {
-
 
471
            if (mode->type & DRM_MODE_TYPE_PREFERRED);
-
 
472
                break;
-
 
473
        };
-
 
474
 
-
 
475
/*
-
 
476
        struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
-
 
477
        struct radeon_native_mode *native_mode = &radeon_encoder->native_mode;
-
 
478
 
-
 
479
        native_mode->panel_xres = mode->hdisplay;
-
 
480
        native_mode->panel_yres = mode->vdisplay;
-
 
481
 
-
 
482
        native_mode->hblank = mode->htotal - mode->hdisplay;
-
 
483
        native_mode->hoverplus = mode->hsync_start - mode->hdisplay;
-
 
484
        native_mode->hsync_width = mode->hsync_end - mode->hsync_start;
-
 
485
        native_mode->vblank = mode->vtotal - mode->vdisplay;
-
 
486
        native_mode->voverplus = mode->vsync_start - mode->vdisplay;
-
 
487
        native_mode->vsync_width = mode->vsync_end - mode->vsync_start;
-
 
488
        native_mode->dotclock = mode->clock;
466
            continue;
489
        native_mode->flags = mode->flags;
467
 
490
*/
468
        list_for_each_entry(mode, &connector->modes, head)
491
        list_for_each_entry(mode, &connector->modes, head)
Line 469... Line 492...
469
        {
492
        {
Line 500... Line 523...
500
 
523
 
Line 501... Line 524...
501
                crtc->fb = fb;
524
                crtc->fb = fb;
Line 502... Line 525...
502
 
525
 
Line 503... Line 526...
503
                ret = drm_crtc_helper_set_mode(crtc, mode, 0, 0, fb);
526
                ret = drm_crtc_helper_set_mode(crtc, mode, 0, 0, fb);
504
 
527
 
505
                sysSetScreen(width, height, fb->pitch);
528
                sysSetScreen(fb->width, fb->height, fb->pitch);
506
 
529
 
507
                if (ret == true)
530
                if (ret == true)
508
                {
531
                {
509
                    dbgprintf("new mode %d %d pitch %d\n", width, height, fb->pitch);
532
                    dbgprintf("new mode %d %d pitch %d\n",fb->width, fb->height, fb->pitch);
510
                }
533
                }
511
                else
534
                else
512
                {
-
 
513
                    DRM_ERROR("failed to set mode %d_%d on crtc %p\n",
-
 
514
                               width, height, crtc);
535
                {
515
                };
536
                    DRM_ERROR("failed to set mode %d_%d on crtc %p\n",
516
 
537
                               fb->width, fb->height, crtc);
Line 517... Line 538...
517
                return ret;
538
                };
518
            };
539
            };