.. | .. |
---|
24 | 24 | * |
---|
25 | 25 | */ |
---|
26 | 26 | |
---|
27 | | -#include <drm/drmP.h> |
---|
28 | 27 | #include <drm/drm_crtc_helper.h> |
---|
| 28 | +#include <drm/drm_probe_helper.h> |
---|
29 | 29 | #include "nouveau_drv.h" |
---|
30 | 30 | #include "nouveau_reg.h" |
---|
31 | 31 | #include "nouveau_encoder.h" |
---|
.. | .. |
---|
599 | 599 | helper->dpms(encoder, DRM_MODE_DPMS_ON); |
---|
600 | 600 | |
---|
601 | 601 | NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n", |
---|
602 | | - nouveau_encoder_connector_get(nv_encoder)->base.name, |
---|
| 602 | + nv04_encoder_get_connector(nv_encoder)->base.name, |
---|
603 | 603 | nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); |
---|
604 | 604 | } |
---|
605 | 605 | |
---|
.. | .. |
---|
644 | 644 | int i; |
---|
645 | 645 | |
---|
646 | 646 | if (nouveau_tv_norm) { |
---|
647 | | - for (i = 0; i < num_tv_norms; i++) { |
---|
648 | | - if (!strcmp(nv17_tv_norm_names[i], nouveau_tv_norm)) { |
---|
649 | | - tv_enc->tv_norm = i; |
---|
650 | | - break; |
---|
651 | | - } |
---|
652 | | - } |
---|
653 | | - |
---|
654 | | - if (i == num_tv_norms) |
---|
| 647 | + i = match_string(nv17_tv_norm_names, num_tv_norms, |
---|
| 648 | + nouveau_tv_norm); |
---|
| 649 | + if (i < 0) |
---|
655 | 650 | NV_WARN(drm, "Invalid TV norm setting \"%s\"\n", |
---|
656 | 651 | nouveau_tv_norm); |
---|
| 652 | + else |
---|
| 653 | + tv_enc->tv_norm = i; |
---|
657 | 654 | } |
---|
658 | 655 | |
---|
659 | 656 | drm_mode_create_tv_properties(dev, num_tv_norms, nv17_tv_norm_names); |
---|