File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2117,6 +2117,12 @@ static int tegra_dc_init(struct host1x_client *client)
21172117 if (dc -> soc -> pitch_align > tegra -> pitch_align )
21182118 tegra -> pitch_align = dc -> soc -> pitch_align ;
21192119
2120+ /* track maximum resolution */
2121+ if (dc -> soc -> has_nvdisplay )
2122+ drm -> mode_config .max_width = drm -> mode_config .max_height = 16384 ;
2123+ else
2124+ drm -> mode_config .max_width = drm -> mode_config .max_height = 4096 ;
2125+
21202126 err = tegra_dc_rgb_init (drm , dc );
21212127 if (err < 0 && err != - ENODEV ) {
21222128 dev_err (dc -> dev , "failed to initialize RGB output: %d\n" , err );
Original file line number Diff line number Diff line change @@ -1121,9 +1121,8 @@ static int host1x_drm_probe(struct host1x_device *dev)
11211121
11221122 drm -> mode_config .min_width = 0 ;
11231123 drm -> mode_config .min_height = 0 ;
1124-
1125- drm -> mode_config .max_width = 4096 ;
1126- drm -> mode_config .max_height = 4096 ;
1124+ drm -> mode_config .max_width = 0 ;
1125+ drm -> mode_config .max_height = 0 ;
11271126
11281127 drm -> mode_config .allow_fb_modifiers = true;
11291128
@@ -1142,6 +1141,14 @@ static int host1x_drm_probe(struct host1x_device *dev)
11421141 if (err < 0 )
11431142 goto fbdev ;
11441143
1144+ /*
1145+ * Now that all display controller have been initialized, the maximum
1146+ * supported resolution is known and the bitmask for horizontal and
1147+ * vertical bitfields can be computed.
1148+ */
1149+ tegra -> hmask = drm -> mode_config .max_width - 1 ;
1150+ tegra -> vmask = drm -> mode_config .max_height - 1 ;
1151+
11451152 if (tegra -> use_explicit_iommu ) {
11461153 u64 carveout_start , carveout_end , gem_start , gem_end ;
11471154 u64 dma_mask = dma_get_mask (& dev -> dev );
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ struct tegra_drm {
5454 struct tegra_fbdev * fbdev ;
5555#endif
5656
57+ unsigned int hmask , vmask ;
5758 unsigned int pitch_align ;
5859
5960 struct tegra_display_hub * hub ;
You can’t perform that action at this time.
0 commit comments