]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
msm:disp:dpu1: add scaler support on SC7180 display
[linux.git] / drivers / gpu / drm / msm / disp / dpu1 / dpu_hw_sspp.c
index e9132bf5166be8ae8b044d3a514f056564547eef..82c5dbfdabc7594ac0eaf9cbe43ef438715387d8 100644 (file)
@@ -1,13 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include "dpu_hwio.h"
 /* traffic shaper clock in Hz */
 #define TS_CLK                 19200000
 
+
 static int _sspp_subblk_offset(struct dpu_hw_pipe *ctx,
                int s_id,
                u32 *idx)
@@ -665,7 +658,8 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
                test_bit(DPU_SSPP_SMART_DMA_V2, &c->cap->features))
                c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
-       if (test_bit(DPU_SSPP_SCALER_QSEED3, &features)) {
+       if (test_bit(DPU_SSPP_SCALER_QSEED3, &features) ||
+                       test_bit(DPU_SSPP_SCALER_QSEED4, &features)) {
                c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler3;
                c->ops.get_scaler_ver = _dpu_hw_sspp_get_scaler3_ver;
        }
@@ -674,7 +668,7 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
                c->ops.setup_cdp = dpu_hw_sspp_setup_cdp;
 }
 
-static struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp,
+static const struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp,
                void __iomem *addr,
                struct dpu_mdss_cfg *catalog,
                struct dpu_hw_blk_reg_map *b)
@@ -704,7 +698,7 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
                bool is_virtual_pipe)
 {
        struct dpu_hw_pipe *hw_pipe;
-       struct dpu_sspp_cfg *cfg;
+       const struct dpu_sspp_cfg *cfg;
 
        if (!addr || !catalog)
                return ERR_PTR(-EINVAL);