aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorShobhit Kumar <shobhit.kumar@intel.com>2013-12-10 01:44:54 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-11 17:52:16 -0500
commitb9f5e07d0245ff0ddaca453d146fcad056ac12c3 (patch)
tree732184e3ccbfa5346cf99089bc9fb8a39a87555b /drivers/gpu/drm/i915
parent9c333719ae95b7c974aa15c6dcc618918b7479c7 (diff)
drm/i915: Add more dev ops for MIPI sub encoder
Some panels require one time programming if they do not contain their own eeprom for basic register initialization. The sequence is Panel Reset --> Send OTP --> Enable Pixel Stream --> Enable the panel v2: Based on review comments from Jani and Ville - Updated the commit message with more details - Move the new parameters out of this patch Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_dsi.c9
-rw-r--r--drivers/gpu/drm/i915/intel_dsi.h5
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 7b9b350d29ae..42ed28a309f5 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -147,6 +147,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
147 147
148 DRM_DEBUG_KMS("\n"); 148 DRM_DEBUG_KMS("\n");
149 149
150 if (intel_dsi->dev.dev_ops->panel_reset)
151 intel_dsi->dev.dev_ops->panel_reset(&intel_dsi->dev);
152
150 temp = I915_READ(MIPI_DEVICE_READY(pipe)); 153 temp = I915_READ(MIPI_DEVICE_READY(pipe));
151 if ((temp & DEVICE_READY) == 0) { 154 if ((temp & DEVICE_READY) == 0) {
152 temp &= ~ULPS_STATE_MASK; 155 temp &= ~ULPS_STATE_MASK;
@@ -162,6 +165,9 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
162 I915_WRITE(MIPI_DEVICE_READY(pipe), temp); 165 I915_WRITE(MIPI_DEVICE_READY(pipe), temp);
163 } 166 }
164 167
168 if (intel_dsi->dev.dev_ops->send_otp_cmds)
169 intel_dsi->dev.dev_ops->send_otp_cmds(&intel_dsi->dev);
170
165 if (is_cmd_mode(intel_dsi)) 171 if (is_cmd_mode(intel_dsi))
166 I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(pipe), 8 * 4); 172 I915_WRITE(MIPI_MAX_RETURN_PKT_SIZE(pipe), 8 * 4);
167 173
@@ -176,7 +182,8 @@ static void intel_dsi_enable(struct intel_encoder *encoder)
176 POSTING_READ(MIPI_PORT_CTRL(pipe)); 182 POSTING_READ(MIPI_PORT_CTRL(pipe));
177 } 183 }
178 184
179 intel_dsi->dev.dev_ops->enable(&intel_dsi->dev); 185 if (intel_dsi->dev.dev_ops->enable)
186 intel_dsi->dev.dev_ops->enable(&intel_dsi->dev);
180} 187}
181 188
182static void intel_dsi_disable(struct intel_encoder *encoder) 189static void intel_dsi_disable(struct intel_encoder *encoder)
diff --git a/drivers/gpu/drm/i915/intel_dsi.h b/drivers/gpu/drm/i915/intel_dsi.h
index c7765f33d524..14509d65f78d 100644
--- a/drivers/gpu/drm/i915/intel_dsi.h
+++ b/drivers/gpu/drm/i915/intel_dsi.h
@@ -39,6 +39,11 @@ struct intel_dsi_device {
39struct intel_dsi_dev_ops { 39struct intel_dsi_dev_ops {
40 bool (*init)(struct intel_dsi_device *dsi); 40 bool (*init)(struct intel_dsi_device *dsi);
41 41
42 void (*panel_reset)(struct intel_dsi_device *dsi);
43
44 /* one time programmable commands if needed */
45 void (*send_otp_cmds)(struct intel_dsi_device *dsi);
46
42 /* This callback must be able to assume DSI commands can be sent */ 47 /* This callback must be able to assume DSI commands can be sent */
43 void (*enable)(struct intel_dsi_device *dsi); 48 void (*enable)(struct intel_dsi_device *dsi);
44 49
765'>765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887






















































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
PK