mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drm/tegra: Drop kernel version checks
Drop the kernel version checks from Tegra DRM because these are only needed for pre-Linux v6.x kernels and these are no longer supported. JIRA LINQPJ14-47 Change-Id: Ie5190eec6f3e37b477ae2ad84f2ef2f3ed9c3d8a Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3333319 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#if defined(NV_DRM_DISPLAY_DRM_DP_HELPER_H_PRESENT) /* Linux v5.19 */
|
||||
@@ -586,13 +585,11 @@ static int tegra_dpaux_probe(struct platform_device *pdev)
|
||||
list_add_tail(&dpaux->list, &dpaux_list);
|
||||
mutex_unlock(&dpaux_lock);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
err = devm_of_dp_aux_populate_ep_devices(&dpaux->aux);
|
||||
if (err < 0) {
|
||||
dev_err(dpaux->dev, "failed to populate AUX bus: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if defined(NV_APERTURE_REMOVE_ALL_CONFLICTING_DEVICES_PRESENT) /* Linux v6.0 */
|
||||
#include <linux/aperture.h>
|
||||
@@ -1376,10 +1375,8 @@ static int __init host1x_drm_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||
if (drm_firmware_drivers_only())
|
||||
return -ENODEV;
|
||||
#endif
|
||||
|
||||
err = host1x_driver_register(&host1x_drm_driver);
|
||||
if (err < 0)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include <linux/console.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_framebuffer.h>
|
||||
@@ -39,11 +38,7 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
|
||||
{
|
||||
uint64_t modifier = framebuffer->modifier;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
if (fourcc_mod_is_vendor(modifier, NVIDIA)) {
|
||||
#else
|
||||
if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) {
|
||||
#endif
|
||||
if ((modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) == 0)
|
||||
tiling->sector_layout = TEGRA_BO_SECTOR_LAYOUT_TEGRA;
|
||||
else
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <soc/tegra/common.h>
|
||||
#include <soc/tegra/pmc.h>
|
||||
@@ -390,11 +389,7 @@ static int gr3d_init_power(struct device *dev, struct gr3d *gr3d)
|
||||
.num_pd_names = 2,
|
||||
};
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
static const char * const opp_genpd_names[] = { "3d0", "3d1", NULL };
|
||||
#else
|
||||
static const char *opp_genpd_names[] = { "3d0", "3d1", NULL };
|
||||
#endif
|
||||
const u32 link_flags = DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME;
|
||||
struct device **opp_virt_devs, *pd_dev;
|
||||
struct device_link *link;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <soc/tegra/common.h>
|
||||
#include <sound/hdmi-codec.h>
|
||||
@@ -1250,11 +1249,7 @@ static void tegra_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
h_back_porch = mode->htotal - mode->hsync_end;
|
||||
h_front_porch = mode->hsync_start - mode->hdisplay;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
err = dev_pm_opp_set_rate(hdmi->dev, hdmi->pixel_clock);
|
||||
#else
|
||||
err = clk_set_rate(hdmi->clk, hdmi->pixel_clock);
|
||||
#endif
|
||||
if (err < 0) {
|
||||
dev_err(hdmi->dev, "failed to set HDMI clock frequency: %d\n",
|
||||
err);
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <soc/tegra/mc.h>
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <soc/tegra/pmc.h>
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/iommu.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <drm/drm_atomic.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
@@ -116,11 +115,7 @@ static bool tegra_plane_format_mod_supported(struct drm_plane *plane,
|
||||
return true;
|
||||
|
||||
/* check for the sector layout bit */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
|
||||
if (fourcc_mod_is_vendor(modifier, NVIDIA)) {
|
||||
#else
|
||||
if ((modifier >> 56) == DRM_FORMAT_MOD_VENDOR_NVIDIA) {
|
||||
#endif
|
||||
if (modifier & DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) {
|
||||
if (!tegra_plane_supports_sector_layout(plane))
|
||||
return false;
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/reset.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
@@ -1071,14 +1070,8 @@ static int vic_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops vic_pm_ops = {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
|
||||
RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
#else
|
||||
SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user