disp.c (254e7e3bfcfcae829e120e53e21050e2fe5ce1d7) disp.c (09838c4efe9afb6fefa889d92c3571d49029af26)
1/*
2 * Copyright 2011 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 397 unchanged lines hidden (view full) ---

406 return ret;
407
408 if (crtc_state->mode_changed || crtc_state->connectors_changed)
409 asyh->or.bpc = connector->display_info.bpc;
410
411 return 0;
412}
413
1/*
2 * Copyright 2011 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 397 unchanged lines hidden (view full) ---

406 return ret;
407
408 if (crtc_state->mode_changed || crtc_state->connectors_changed)
409 asyh->or.bpc = connector->display_info.bpc;
410
411 return 0;
412}
413
414struct nouveau_connector *
415nv50_outp_get_new_connector(struct nouveau_encoder *outp,
416 struct drm_atomic_state *state)
417{
418 struct drm_connector *connector;
419 struct drm_connector_state *connector_state;
420 struct drm_encoder *encoder = to_drm_encoder(outp);
421 int i;
422
423 for_each_new_connector_in_state(state, connector, connector_state, i) {
424 if (connector_state->best_encoder == encoder)
425 return nouveau_connector(connector);
426 }
427
428 return NULL;
429}
430
431struct nouveau_connector *
432nv50_outp_get_old_connector(struct nouveau_encoder *outp,
433 struct drm_atomic_state *state)
434{
435 struct drm_connector *connector;
436 struct drm_connector_state *connector_state;
437 struct drm_encoder *encoder = to_drm_encoder(outp);
438 int i;
439
440 for_each_old_connector_in_state(state, connector, connector_state, i) {
441 if (connector_state->best_encoder == encoder)
442 return nouveau_connector(connector);
443 }
444
445 return NULL;
446}
447
414/******************************************************************************
415 * DAC
416 *****************************************************************************/
417static void
418nv50_dac_disable(struct drm_encoder *encoder)
419{
420 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
421 struct nv50_core *core = nv50_disp(encoder->dev)->core;

--- 125 unchanged lines hidden (view full) ---

547static int
548nv50_audio_component_get_eld(struct device *kdev, int port, int dev_id,
549 bool *enabled, unsigned char *buf, int max_bytes)
550{
551 struct drm_device *drm_dev = dev_get_drvdata(kdev);
552 struct nouveau_drm *drm = nouveau_drm(drm_dev);
553 struct drm_encoder *encoder;
554 struct nouveau_encoder *nv_encoder;
448/******************************************************************************
449 * DAC
450 *****************************************************************************/
451static void
452nv50_dac_disable(struct drm_encoder *encoder)
453{
454 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
455 struct nv50_core *core = nv50_disp(encoder->dev)->core;

--- 125 unchanged lines hidden (view full) ---

581static int
582nv50_audio_component_get_eld(struct device *kdev, int port, int dev_id,
583 bool *enabled, unsigned char *buf, int max_bytes)
584{
585 struct drm_device *drm_dev = dev_get_drvdata(kdev);
586 struct nouveau_drm *drm = nouveau_drm(drm_dev);
587 struct drm_encoder *encoder;
588 struct nouveau_encoder *nv_encoder;
555 struct nouveau_connector *nv_connector;
589 struct drm_connector *connector;
556 struct nouveau_crtc *nv_crtc;
590 struct nouveau_crtc *nv_crtc;
591 struct drm_connector_list_iter conn_iter;
557 int ret = 0;
558
559 *enabled = false;
592 int ret = 0;
593
594 *enabled = false;
595
560 drm_for_each_encoder(encoder, drm->dev) {
596 drm_for_each_encoder(encoder, drm->dev) {
597 struct nouveau_connector *nv_connector = NULL;
598
561 nv_encoder = nouveau_encoder(encoder);
599 nv_encoder = nouveau_encoder(encoder);
562 nv_connector = nouveau_encoder_connector_get(nv_encoder);
600
601 drm_connector_list_iter_begin(drm_dev, &conn_iter);
602 drm_for_each_connector_iter(connector, &conn_iter) {
603 if (connector->state->best_encoder == encoder) {
604 nv_connector = nouveau_connector(connector);
605 break;
606 }
607 }
608 drm_connector_list_iter_end(&conn_iter);
609 if (!nv_connector)
610 continue;
611
563 nv_crtc = nouveau_crtc(encoder->crtc);
612 nv_crtc = nouveau_crtc(encoder->crtc);
564 if (!nv_connector || !nv_crtc || nv_encoder->or != port ||
613 if (!nv_crtc || nv_encoder->or != port ||
565 nv_crtc->index != dev_id)
566 continue;
567 *enabled = nv_encoder->audio;
568 if (*enabled) {
569 ret = drm_eld_size(nv_connector->base.eld);
570 memcpy(buf, nv_connector->base.eld,
571 min(max_bytes, ret));
572 }
573 break;
574 }
614 nv_crtc->index != dev_id)
615 continue;
616 *enabled = nv_encoder->audio;
617 if (*enabled) {
618 ret = drm_eld_size(nv_connector->base.eld);
619 memcpy(buf, nv_connector->base.eld,
620 min(max_bytes, ret));
621 }
622 break;
623 }
624
575 return ret;
576}
577
578static const struct drm_audio_component_ops nv50_audio_component_ops = {
579 .get_eld = nv50_audio_component_get_eld,
580};
581
582static int

--- 77 unchanged lines hidden (view full) ---

660 nv_encoder->audio = false;
661 nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
662
663 nv50_audio_component_eld_notify(drm->audio.component, nv_encoder->or,
664 nv_crtc->index);
665}
666
667static void
625 return ret;
626}
627
628static const struct drm_audio_component_ops nv50_audio_component_ops = {
629 .get_eld = nv50_audio_component_get_eld,
630};
631
632static int

--- 77 unchanged lines hidden (view full) ---

710 nv_encoder->audio = false;
711 nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
712
713 nv50_audio_component_eld_notify(drm->audio.component, nv_encoder->or,
714 nv_crtc->index);
715}
716
717static void
668nv50_audio_enable(struct drm_encoder *encoder, struct drm_display_mode *mode)
718nv50_audio_enable(struct drm_encoder *encoder, struct drm_atomic_state *state,
719 struct drm_display_mode *mode)
669{
670 struct nouveau_drm *drm = nouveau_drm(encoder->dev);
671 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
672 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
673 struct nouveau_connector *nv_connector;
674 struct nv50_disp *disp = nv50_disp(encoder->dev);
675 struct __packed {
676 struct {

--- 4 unchanged lines hidden (view full) ---

681 } args = {
682 .base.mthd.version = 1,
683 .base.mthd.method = NV50_DISP_MTHD_V1_SOR_HDA_ELD,
684 .base.mthd.hasht = nv_encoder->dcb->hasht,
685 .base.mthd.hashm = (0xf0ff & nv_encoder->dcb->hashm) |
686 (0x0100 << nv_crtc->index),
687 };
688
720{
721 struct nouveau_drm *drm = nouveau_drm(encoder->dev);
722 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
723 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
724 struct nouveau_connector *nv_connector;
725 struct nv50_disp *disp = nv50_disp(encoder->dev);
726 struct __packed {
727 struct {

--- 4 unchanged lines hidden (view full) ---

732 } args = {
733 .base.mthd.version = 1,
734 .base.mthd.method = NV50_DISP_MTHD_V1_SOR_HDA_ELD,
735 .base.mthd.hasht = nv_encoder->dcb->hasht,
736 .base.mthd.hashm = (0xf0ff & nv_encoder->dcb->hashm) |
737 (0x0100 << nv_crtc->index),
738 };
739
689 nv_connector = nouveau_encoder_connector_get(nv_encoder);
740 nv_connector = nv50_outp_get_new_connector(nv_encoder, state);
690 if (!drm_detect_monitor_audio(nv_connector->edid))
691 return;
692
693 memcpy(args.data, nv_connector->base.eld, sizeof(args.data));
694
695 nvif_mthd(&disp->disp->object, 0, &args,
696 sizeof(args.base) + drm_eld_size(args.data));
697 nv_encoder->audio = true;

--- 20 unchanged lines hidden (view full) ---

718 .base.hashm = (0xf0ff & nv_encoder->dcb->hashm) |
719 (0x0100 << nv_crtc->index),
720 };
721
722 nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
723}
724
725static void
741 if (!drm_detect_monitor_audio(nv_connector->edid))
742 return;
743
744 memcpy(args.data, nv_connector->base.eld, sizeof(args.data));
745
746 nvif_mthd(&disp->disp->object, 0, &args,
747 sizeof(args.base) + drm_eld_size(args.data));
748 nv_encoder->audio = true;

--- 20 unchanged lines hidden (view full) ---

769 .base.hashm = (0xf0ff & nv_encoder->dcb->hashm) |
770 (0x0100 << nv_crtc->index),
771 };
772
773 nvif_mthd(&disp->disp->object, 0, &args, sizeof(args));
774}
775
776static void
726nv50_hdmi_enable(struct drm_encoder *encoder, struct drm_display_mode *mode)
777nv50_hdmi_enable(struct drm_encoder *encoder, struct drm_atomic_state *state,
778 struct drm_display_mode *mode)
727{
728 struct nouveau_drm *drm = nouveau_drm(encoder->dev);
729 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
730 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
731 struct nv50_disp *disp = nv50_disp(encoder->dev);
732 struct {
733 struct nv50_disp_mthd_v1 base;
734 struct nv50_disp_sor_hdmi_pwr_v0 pwr;

--- 12 unchanged lines hidden (view full) ---

747 u32 max_ac_packet;
748 union hdmi_infoframe avi_frame;
749 union hdmi_infoframe vendor_frame;
750 bool high_tmds_clock_ratio = false, scrambling = false;
751 u8 config;
752 int ret;
753 int size;
754
779{
780 struct nouveau_drm *drm = nouveau_drm(encoder->dev);
781 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
782 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
783 struct nv50_disp *disp = nv50_disp(encoder->dev);
784 struct {
785 struct nv50_disp_mthd_v1 base;
786 struct nv50_disp_sor_hdmi_pwr_v0 pwr;

--- 12 unchanged lines hidden (view full) ---

799 u32 max_ac_packet;
800 union hdmi_infoframe avi_frame;
801 union hdmi_infoframe vendor_frame;
802 bool high_tmds_clock_ratio = false, scrambling = false;
803 u8 config;
804 int ret;
805 int size;
806
755 nv_connector = nouveau_encoder_connector_get(nv_encoder);
807 nv_connector = nv50_outp_get_new_connector(nv_encoder, state);
756 if (!drm_detect_hdmi_monitor(nv_connector->edid))
757 return;
758
759 hdmi = &nv_connector->base.display_info.hdmi;
760
761 ret = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame.avi,
762 &nv_connector->base, mode);
763 if (!ret) {

--- 29 unchanged lines hidden (view full) ---

793 NV50_DISP_SOR_HDMI_PWR_V0_SCDC_DIV_BY_4 * high_tmds_clock_ratio;
794
795 size = sizeof(args.base)
796 + sizeof(args.pwr)
797 + args.pwr.avi_infoframe_length
798 + args.pwr.vendor_infoframe_length;
799 nvif_mthd(&disp->disp->object, 0, &args, size);
800
808 if (!drm_detect_hdmi_monitor(nv_connector->edid))
809 return;
810
811 hdmi = &nv_connector->base.display_info.hdmi;
812
813 ret = drm_hdmi_avi_infoframe_from_display_mode(&avi_frame.avi,
814 &nv_connector->base, mode);
815 if (!ret) {

--- 29 unchanged lines hidden (view full) ---

845 NV50_DISP_SOR_HDMI_PWR_V0_SCDC_DIV_BY_4 * high_tmds_clock_ratio;
846
847 size = sizeof(args.base)
848 + sizeof(args.pwr)
849 + args.pwr.avi_infoframe_length
850 + args.pwr.vendor_infoframe_length;
851 nvif_mthd(&disp->disp->object, 0, &args, size);
852
801 nv50_audio_enable(encoder, mode);
853 nv50_audio_enable(encoder, state, mode);
802
803 /* If SCDC is supported by the downstream monitor, update
804 * divider / scrambling settings to what we programmed above.
805 */
806 if (!hdmi->scdc.scrambling.supported)
807 return;
808
809 ret = drm_scdc_readb(nv_encoder->i2c, SCDC_TMDS_CONFIG, &config);

--- 758 unchanged lines hidden (view full) ---

1568 nv_encoder->ctrl |= BIT(head);
1569 asyh->or.depth = depth;
1570 }
1571
1572 core->func->sor->ctrl(core, nv_encoder->or, nv_encoder->ctrl, asyh);
1573}
1574
1575static void
854
855 /* If SCDC is supported by the downstream monitor, update
856 * divider / scrambling settings to what we programmed above.
857 */
858 if (!hdmi->scdc.scrambling.supported)
859 return;
860
861 ret = drm_scdc_readb(nv_encoder->i2c, SCDC_TMDS_CONFIG, &config);

--- 758 unchanged lines hidden (view full) ---

1620 nv_encoder->ctrl |= BIT(head);
1621 asyh->or.depth = depth;
1622 }
1623
1624 core->func->sor->ctrl(core, nv_encoder->or, nv_encoder->ctrl, asyh);
1625}
1626
1627static void
1576nv50_sor_disable(struct drm_encoder *encoder)
1628nv50_sor_disable(struct drm_encoder *encoder,
1629 struct drm_atomic_state *state)
1577{
1578 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1579 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
1580
1581 nv_encoder->crtc = NULL;
1582
1583 if (nv_crtc) {
1584 struct nvkm_i2c_aux *aux = nv_encoder->aux;

--- 11 unchanged lines hidden (view full) ---

1596 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
1597 nv50_audio_disable(encoder, nv_crtc);
1598 nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
1599 nv50_outp_release(nv_encoder);
1600 }
1601}
1602
1603static void
1630{
1631 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1632 struct nouveau_crtc *nv_crtc = nouveau_crtc(nv_encoder->crtc);
1633
1634 nv_encoder->crtc = NULL;
1635
1636 if (nv_crtc) {
1637 struct nvkm_i2c_aux *aux = nv_encoder->aux;

--- 11 unchanged lines hidden (view full) ---

1649 nv_encoder->update(nv_encoder, nv_crtc->index, NULL, 0, 0);
1650 nv50_audio_disable(encoder, nv_crtc);
1651 nv50_hdmi_disable(&nv_encoder->base.base, nv_crtc);
1652 nv50_outp_release(nv_encoder);
1653 }
1654}
1655
1656static void
1604nv50_sor_enable(struct drm_encoder *encoder)
1657nv50_sor_enable(struct drm_encoder *encoder,
1658 struct drm_atomic_state *state)
1605{
1606 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1607 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
1608 struct nv50_head_atom *asyh = nv50_head_atom(nv_crtc->base.state);
1609 struct drm_display_mode *mode = &asyh->state.adjusted_mode;
1610 struct {
1611 struct nv50_disp_mthd_v1 base;
1612 struct nv50_disp_sor_lvds_script_v0 lvds;

--- 7 unchanged lines hidden (view full) ---

1620 struct drm_device *dev = encoder->dev;
1621 struct nouveau_drm *drm = nouveau_drm(dev);
1622 struct nouveau_connector *nv_connector;
1623 struct nvbios *bios = &drm->vbios;
1624 bool hda = false;
1625 u8 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_CUSTOM;
1626 u8 depth = NV837D_SOR_SET_CONTROL_PIXEL_DEPTH_DEFAULT;
1627
1659{
1660 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1661 struct nouveau_crtc *nv_crtc = nouveau_crtc(encoder->crtc);
1662 struct nv50_head_atom *asyh = nv50_head_atom(nv_crtc->base.state);
1663 struct drm_display_mode *mode = &asyh->state.adjusted_mode;
1664 struct {
1665 struct nv50_disp_mthd_v1 base;
1666 struct nv50_disp_sor_lvds_script_v0 lvds;

--- 7 unchanged lines hidden (view full) ---

1674 struct drm_device *dev = encoder->dev;
1675 struct nouveau_drm *drm = nouveau_drm(dev);
1676 struct nouveau_connector *nv_connector;
1677 struct nvbios *bios = &drm->vbios;
1678 bool hda = false;
1679 u8 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_CUSTOM;
1680 u8 depth = NV837D_SOR_SET_CONTROL_PIXEL_DEPTH_DEFAULT;
1681
1628 nv_connector = nouveau_encoder_connector_get(nv_encoder);
1682 nv_connector = nv50_outp_get_new_connector(nv_encoder, state);
1629 nv_encoder->crtc = encoder->crtc;
1630
1631 if ((disp->disp->object.oclass == GT214_DISP ||
1632 disp->disp->object.oclass >= GF110_DISP) &&
1633 drm_detect_monitor_audio(nv_connector->edid))
1634 hda = true;
1635 nv50_outp_acquire(nv_encoder, hda);
1636

--- 10 unchanged lines hidden (view full) ---

1647 if (mode->clock >= 165000 &&
1648 nv_encoder->dcb->duallink_possible &&
1649 !drm_detect_hdmi_monitor(nv_connector->edid))
1650 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_DUAL_TMDS;
1651 } else {
1652 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_SINGLE_TMDS_B;
1653 }
1654
1683 nv_encoder->crtc = encoder->crtc;
1684
1685 if ((disp->disp->object.oclass == GT214_DISP ||
1686 disp->disp->object.oclass >= GF110_DISP) &&
1687 drm_detect_monitor_audio(nv_connector->edid))
1688 hda = true;
1689 nv50_outp_acquire(nv_encoder, hda);
1690

--- 10 unchanged lines hidden (view full) ---

1701 if (mode->clock >= 165000 &&
1702 nv_encoder->dcb->duallink_possible &&
1703 !drm_detect_hdmi_monitor(nv_connector->edid))
1704 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_DUAL_TMDS;
1705 } else {
1706 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_SINGLE_TMDS_B;
1707 }
1708
1655 nv50_hdmi_enable(&nv_encoder->base.base, mode);
1709 nv50_hdmi_enable(&nv_encoder->base.base, state, mode);
1656 break;
1657 case DCB_OUTPUT_LVDS:
1658 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_LVDS_CUSTOM;
1659
1660 if (bios->fp_no_ddc) {
1661 if (bios->fp.dual_link)
1662 lvds.lvds.script |= 0x0100;
1663 if (bios->fp.if_is_24bit)

--- 24 unchanged lines hidden (view full) ---

1688 case DCB_OUTPUT_DP:
1689 depth = nv50_dp_bpc_to_depth(asyh->or.bpc);
1690
1691 if (nv_encoder->link & 1)
1692 proto = NV887D_SOR_SET_CONTROL_PROTOCOL_DP_A;
1693 else
1694 proto = NV887D_SOR_SET_CONTROL_PROTOCOL_DP_B;
1695
1710 break;
1711 case DCB_OUTPUT_LVDS:
1712 proto = NV507D_SOR_SET_CONTROL_PROTOCOL_LVDS_CUSTOM;
1713
1714 if (bios->fp_no_ddc) {
1715 if (bios->fp.dual_link)
1716 lvds.lvds.script |= 0x0100;
1717 if (bios->fp.if_is_24bit)

--- 24 unchanged lines hidden (view full) ---

1742 case DCB_OUTPUT_DP:
1743 depth = nv50_dp_bpc_to_depth(asyh->or.bpc);
1744
1745 if (nv_encoder->link & 1)
1746 proto = NV887D_SOR_SET_CONTROL_PROTOCOL_DP_A;
1747 else
1748 proto = NV887D_SOR_SET_CONTROL_PROTOCOL_DP_B;
1749
1696 nv50_audio_enable(encoder, mode);
1750 nv50_audio_enable(encoder, state, mode);
1697 break;
1698 default:
1699 BUG();
1700 break;
1701 }
1702
1703 nv_encoder->update(nv_encoder, nv_crtc->index, asyh, proto, depth);
1704}
1705
1706static const struct drm_encoder_helper_funcs
1707nv50_sor_help = {
1708 .atomic_check = nv50_outp_atomic_check,
1751 break;
1752 default:
1753 BUG();
1754 break;
1755 }
1756
1757 nv_encoder->update(nv_encoder, nv_crtc->index, asyh, proto, depth);
1758}
1759
1760static const struct drm_encoder_helper_funcs
1761nv50_sor_help = {
1762 .atomic_check = nv50_outp_atomic_check,
1709 .enable = nv50_sor_enable,
1710 .disable = nv50_sor_disable,
1763 .atomic_enable = nv50_sor_enable,
1764 .atomic_disable = nv50_sor_disable,
1711};
1712
1713static void
1714nv50_sor_destroy(struct drm_encoder *encoder)
1715{
1716 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1717 nv50_mstm_del(&nv_encoder->dp.mstm);
1718 drm_encoder_cleanup(encoder);

--- 342 unchanged lines hidden (view full) ---

2061
2062 encoder = outp->encoder;
2063 help = encoder->helper_private;
2064
2065 NV_ATOMIC(drm, "%s: clr %02x (set %02x)\n", encoder->name,
2066 outp->clr.mask, outp->set.mask);
2067
2068 if (outp->clr.mask) {
1765};
1766
1767static void
1768nv50_sor_destroy(struct drm_encoder *encoder)
1769{
1770 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
1771 nv50_mstm_del(&nv_encoder->dp.mstm);
1772 drm_encoder_cleanup(encoder);

--- 342 unchanged lines hidden (view full) ---

2115
2116 encoder = outp->encoder;
2117 help = encoder->helper_private;
2118
2119 NV_ATOMIC(drm, "%s: clr %02x (set %02x)\n", encoder->name,
2120 outp->clr.mask, outp->set.mask);
2121
2122 if (outp->clr.mask) {
2069 help->disable(encoder);
2123 help->atomic_disable(encoder, state);
2070 interlock[NV50_DISP_INTERLOCK_CORE] |= 1;
2071 if (outp->flush_disable) {
2072 nv50_disp_atomic_commit_wndw(state, interlock);
2073 nv50_disp_atomic_commit_core(state, interlock);
2074 memset(interlock, 0x00, sizeof(interlock));
2075
2076 flushed = true;
2077 }

--- 22 unchanged lines hidden (view full) ---

2100
2101 encoder = outp->encoder;
2102 help = encoder->helper_private;
2103
2104 NV_ATOMIC(drm, "%s: set %02x (clr %02x)\n", encoder->name,
2105 outp->set.mask, outp->clr.mask);
2106
2107 if (outp->set.mask) {
2124 interlock[NV50_DISP_INTERLOCK_CORE] |= 1;
2125 if (outp->flush_disable) {
2126 nv50_disp_atomic_commit_wndw(state, interlock);
2127 nv50_disp_atomic_commit_core(state, interlock);
2128 memset(interlock, 0x00, sizeof(interlock));
2129
2130 flushed = true;
2131 }

--- 22 unchanged lines hidden (view full) ---

2154
2155 encoder = outp->encoder;
2156 help = encoder->helper_private;
2157
2158 NV_ATOMIC(drm, "%s: set %02x (clr %02x)\n", encoder->name,
2159 outp->set.mask, outp->clr.mask);
2160
2161 if (outp->set.mask) {
2108 help->enable(encoder);
2162 help->atomic_enable(encoder, state);
2109 interlock[NV50_DISP_INTERLOCK_CORE] = 1;
2110 }
2111
2112 list_del(&outp->head);
2113 kfree(outp);
2114 }
2115
2116 /* Update head(s). */

--- 638 unchanged lines hidden ---
2163 interlock[NV50_DISP_INTERLOCK_CORE] = 1;
2164 }
2165
2166 list_del(&outp->head);
2167 kfree(outp);
2168 }
2169
2170 /* Update head(s). */

--- 638 unchanged lines hidden ---