[Freedreno] [PATCH -next 000/491] treewide: use fallthrough;

2020-03-10 Thread Joe Perches
There is a new fallthrough pseudo-keyword macro that can be used
to replace the various /* fallthrough */ style comments that are
used to indicate a case label code block is intended to fallthrough
to the next case label block.

See commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough'
pseudo keyword for switch/case use")

These patches are intended to allow clang to detect missing
switch/case fallthrough uses.

Do a depth-first pass on the MAINTAINERS file and find the various
F: pattern files and convert the fallthrough comments to fallthrough;
for all files matched by all  F: patterns in in each section.

Done via the perl script below and the previously posted
cvt_fallthrough.pl script.

Link: 
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/

These patches are based on next-20200310 and are available in

git://repo.or.cz/linux-2.6/trivial-mods.git in branch 20200310_fallthrough_2

$ cat commit_fallthrough.pl
#!/usr/bin/env perl

use sort 'stable';

#
# Reorder a sorted array so file entries are before directory entries
# depends on a trailing / for directories
# so:
#   foo/
#   foo/bar.c
# becomes
#   foo/bar.c
#   foo/
#
sub file_before_directory {
my ($array_ref) = (@_);

my $count = scalar(@$array_ref);

for (my $i = 1; $i < $count; $i++) {
if (substr(@$array_ref[$i - 1], -1) eq '/' &&
substr(@$array_ref[$i], 0, length(@$array_ref[$i - 1])) eq 
@$array_ref[$i - 1]) {
my $string = @$array_ref[$i - 1];
@$array_ref[$i - 1] = @$array_ref[$i];
@$array_ref[$i] = $string;
}
}
}

sub uniq {
my (@parms) = @_;

my %saw;
@parms = grep(!$saw{$_}++, @parms);

return @parms;
}

# Get all the F: file patterns in MAINTAINERS that could be a .[ch] file
my $maintainer_patterns = `grep -P '^F:\\s+' MAINTAINERS`;
my @patterns = split('\n', $maintainer_patterns);
s/^F:\s*// for @patterns;
@patterns = grep(!/^(?:Documentation|tools|scripts)\//, @patterns);
@patterns = grep(!/\.(?:dtsi?|rst|config)$/, @patterns);
@patterns = sort @patterns;
@patterns = sort { $b =~ tr/\//\// cmp $a =~ tr/\//\// } @patterns;
file_before_directory(\@patterns);

my %sections_done;

foreach my $pattern (@patterns) {

# Find the files the pattern matches
my $pattern_files = `git ls-files -- $pattern`;
my @new_patterns = split('\n', $pattern_files);
$pattern_files = join(' ', @new_patterns);
next if ($pattern_files =~ /^\s*$/);

# Find the section the first file matches
my $pattern_file = @new_patterns[0];
my $section_output = `./scripts/get_maintainer.pl --nogit --nogit-fallback 
--sections --pattern-depth=1 $pattern_file`;
my @section = split('\n', $section_output);
my $section_header = @section[0];

print("Section: <$section_header>\n");

# Skip the section if it's already done
print("Already done '$section_header'\n") if 
($sections_done{$section_header});
next if ($sections_done{$section_header}++);

# Find all the .[ch] files in all F: lines in that section
my @new_section;
foreach my $line (@section) {
last if ($line =~ /^\s*$/);
push(@new_section, $line);
}
@section = grep(/^F:/, @new_section);
s/^F:\s*// for @section;

@section = grep(!/^(?:Documentation|tools|scripts)\//, @section);
@section = grep(!/\.(?:dtsi?|rst|config)$/, @section);
@section = sort @section;
@section = uniq(@section);

my $section_files = join(' ', @section);

print("section_files: <$section_files>\n");

next if ($section_files =~ /^\s*$/);

my $cvt_files = `git ls-files -- $section_files`;
my @files = split('\n', $cvt_files);

@files = grep(!/^(?:Documentation|tools|scripts)\//, @files);
@files = grep(!/\.(?:dtsi?|rst|config)$/, @files);
@files = grep(/\.[ch]$/, @files);
@files = sort @files;
@files = uniq(@files);

$cvt_files = join(' ', @files);
print("files: <$cvt_files>\n");

next if (scalar(@files) < 1);

# Convert fallthroughs for all [.ch] files in the section
print("doing cvt_fallthrough.pl -- $cvt_files\n");

`cvt_fallthrough.pl -- $cvt_files`;

# If nothing changed, nothing to commit
`git diff-index --quiet HEAD --`;
next if (!$?);

# Commit the changes
my $fh;

open($fh, "+>", "cvt_fallthrough.commit_msg") or die "$0: can't create 
temporary file: $!\n";
print $fh <https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git@perches.com/
EOF
;
close $fh;

`git commit -s -a -F cvt_fallthrough.commit_msg`;
}

Joe Perches (491):
  MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
  MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER: Use fallthrough;
  MELLANOX MLX5 core VPI driver: Use fallthrough;
  PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
  ARM/UNI

Re: [Freedreno] [DPU PATCH v4 1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon

2020-03-10 Thread Rob Herring
On Wed, Mar 04, 2020 at 04:10:24PM -0800, Vara Reddy wrote:
> From: Chandan Uddaraju 
> 
> Add bindings for Snapdragon DisplayPort and
> display-port PLL driver.
> 
> Changes in V2:
> Provide details about sel-gpio
> 
> Changes in V4:
> Provide details about max dp lanes
> Change the commit text
> 
> Signed-off-by: Chandan Uddaraju 
> Signed-off-by: Vara Reddy 
> ---
>  .../devicetree/bindings/display/msm/dp.txt | 252 
> +
>  .../devicetree/bindings/display/msm/dpu.txt|  16 +-
>  2 files changed, 264 insertions(+), 4 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/display/msm/dp.txt

Sorry for the moving target, but bindings have moved to DT schema format 
now.

Rob
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [v2] dt-bindings: msm: disp: add yaml schemas for DPU and DSI bindings

2020-03-10 Thread Sam Ravnborg
Hi Krishna

On Mon, Mar 09, 2020 at 03:52:46PM +0530, Krishna Manikandan wrote:
> MSM Mobile Display Subsytem(MDSS) encapsulates sub-blocks
> like DPU display controller, DSI etc. Add YAML schema
> for the device tree bindings for the same.
> 
> Signed-off-by: Krishna Manikandan 
Looks good ow - thanks.
Acked-by: Sam Ravnborg 

But you should wait for a review by someone more fluent in this area
too.

Sam
> 
> Changes in v2:
>   - Changed dpu to DPU (Sam Ravnborg)
>   - Fixed indentation issues (Sam Ravnborg)
>   - Added empty line between different properties (Sam Ravnborg)
>   - Replaced reference txt files with  their corresponding
> yaml files (Sam Ravnborg)
>   - Modified the file to use "|" only when it is
> necessary (Sam Ravnborg)
> ---
>  .../bindings/display/msm/dpu-sc7180.yaml   | 261 +++
>  .../bindings/display/msm/dpu-sdm845.yaml   | 259 +++
>  .../bindings/display/msm/dsi-sc7180.yaml   | 362 
> +
>  .../bindings/display/msm/dsi-sdm845.yaml   | 362 
> +
>  4 files changed, 1244 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
>  create mode 100644 
> Documentation/devicetree/bindings/display/msm/dpu-sdm845.yaml
>  create mode 100644 
> Documentation/devicetree/bindings/display/msm/dsi-sc7180.yaml
>  create mode 100644 
> Documentation/devicetree/bindings/display/msm/dsi-sdm845.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml 
> b/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
> new file mode 100644
> index 000..2a9efc5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/msm/dpu-sc7180.yaml
> @@ -0,0 +1,261 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/msm/dpu-sc7180.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Description of Qualcomm Display DPU dt properties.
> +
> +maintainers:
> +  - Krishna Manikandan 
> +
> +description: |
> +  Device tree bindings for MSM Mobile Display Subsytem(MDSS) that 
> encapsulates
> +  sub-blocks like DPU display controller, DSI and DP interfaces etc. Device 
> tree
> +  bindings of MDSS and DPU are mentioned for SC7180 target.
> +
> +properties:
> +  "mdss":
> +type: object
> +description: |
> +  Node containing MDSS that encapsulated sub-blocks like DPU, DSI and DP
> +  interfaces.
> +
> +properties:
> + compatible:
> +   items:
> + - const: qcom,sc7180-mdss
> +
> + reg:
> +   description: Physical base address and length of controller's 
> registers.
> +
> + reg-names:
> +   description: |
> + Names for different register regions defined above. The required 
> region
> + is mentioned below.
> +   items:
> + - const: mdss
> +
> + power-domains:
> +   description: |
> + A power domain consumer specifier according to
> + Documentation/devicetree/bindings/power/power-domain.yaml.
> +
> + clocks:
> +   description: List of clock specifiers for clocks needed by the device.
> +
> + clock-names:
> +   description: |
> + Device clock names in the same order as mentioned in clocks 
> property.
> + The required clocks are mentioned below.
> +   items:
> + - const: iface
> + - const: bus
> + - const: ahb
> + - const: core
> +
> + interrupts:
> +   description: Interrupt signal from MDSS.
> +
> + interrupt-controller:
> +   description: Identifies the node as an interrupt controller.
> +
> + "#interrupt-cells":
> +   description: |
> + Specifies the number of cells needed to encode an interrupt source.
> +   const: 1
> +
> + iommus:
> +   description: Phandle of iommu device node.
> +
> + "#address-cells":
> +   description: |
> + Indicate how many cells (32 bits values) are needed to form the base
> + address part in the reg property.
> +
> + "#size-cells":
> +   description: |
> + Indicate how many cells (32 bits values) are needed to specify the
> + size part in the reg property.
> +
> + ranges:
> +   description: |
> + Parent bus address space is the same as the child bus address space.
> +
> + interconnects :
> +   description: |
> + Interconnect path specifier for MDSS according to
> + Documentation/devicetree/bindings/interconnect/interconnect.txt.
> + Should be 2 paths corresponding to 2 AXI ports.
> +
> + interconnect-names:
> +   description: |
> + MDSS will have 2 port names to differentiate between the
> + 2 interconnect paths defined with interconnect specifier.
> +
> + properties:
> +   description: |
> + The optional properties for MDSS are mentioned below.
> 

Re: [Freedreno] [PATCH v4 2/2] drm/panel: add support for rm69299 visionox panel driver

2020-03-10 Thread Sam Ravnborg
Hi Harigovindan

Thanks for the v4. nice work!

There is one tiny detail to fix.

With this fixed:
Reviewed-by: Sam Ravnborg 

Sam

On Fri, Mar 06, 2020 at 04:06:28PM +0530, Harigovindan P wrote:
> Add support for Visionox panel driver.
> 
> Signed-off-by: Harigovindan P 
> ---
> 
> Changes in v2:
>   - Dropping redundant space in Kconfig(Sam Ravnborg).
>   - Changing structure for include files(Sam Ravnborg).
>   - Removing backlight related code and functions(Sam Ravnborg).
>   - Removing repeated printing of error message(Sam Ravnborg).
>   - Adding drm_connector as an argument for get_modes function.
> Changes in v3:
>   - Adding arguments for drm_panel_init to support against mainline.
> Changes in v4:
>   - Removing error messages from regulator_set_load.
>   - Removing dev struct entry.
>   - Removing checks.
>   - Dropping empty comment lines.
> 
>  drivers/gpu/drm/panel/Kconfig |   8 +
>  drivers/gpu/drm/panel/Makefile|   1 +
>  .../gpu/drm/panel/panel-visionox-rm69299.c| 322 ++
>  3 files changed, 331 insertions(+)
>  create mode 100644 drivers/gpu/drm/panel/panel-visionox-rm69299.c
> 
> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> index ae44ac2ec106..7b696f304a99 100644
> --- a/drivers/gpu/drm/panel/Kconfig
> +++ b/drivers/gpu/drm/panel/Kconfig
> @@ -389,6 +389,14 @@ config DRM_PANEL_TRULY_NT35597_WQXGA
> Say Y here if you want to enable support for Truly NT35597 WQXGA Dual 
> DSI
> Video Mode panel
>  
> +config DRM_PANEL_VISIONOX_RM69299
> + tristate "Visionox RM69299"
> + depends on OF
> + depends on DRM_MIPI_DSI
> + help
> +   Say Y here if you want to enable support for Visionox
> +   RM69299  DSI Video Mode panel.
> +
>  config DRM_PANEL_XINPENG_XPP055C272
>   tristate "Xinpeng XPP055C272 panel driver"
>   depends on OF
> diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
> index 7c4d3c581fd4..9f11d067a6b2 100644
> --- a/drivers/gpu/drm/panel/Makefile
> +++ b/drivers/gpu/drm/panel/Makefile
> @@ -41,4 +41,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += 
> panel-tpo-td028ttec1.o
>  obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
>  obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
>  obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
> +obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) += panel-visionox-rm69299.o
>  obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o
> diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c 
> b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> new file mode 100644
> index ..eb15dca15398
> --- /dev/null
> +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
> @@ -0,0 +1,322 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (c) 2019, The Linux Foundation. All rights reserved.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
Sort alphabetically. Ignore length of line.

> +
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


Re: [Freedreno] [PATCH v4 1/2] dt-bindings: display: add visionox rm69299 panel variant

2020-03-10 Thread Sam Ravnborg
Hi Harigovindan

Thanks for the follow-up. There are still a few things to improve.
See below.

Sam

On Fri, Mar 06, 2020 at 04:06:27PM +0530, Harigovindan P wrote:
> Add bindings for visionox rm69299 panel.
> 
> Signed-off-by: Harigovindan P 
> ---
> 
> Changes in v2:
>   - Removed unwanted properties from description.
>   - Creating source files without execute permissions(Rob Herring).
> Changes in v3:
>   - Changing txt file into yaml
> Changes in v4:
>   - Updating license identifier.
>   - Moving yaml file inside panel directory.
>   - Removing pinctrl entries.
>   - Adding documentation for reset-gpios.
> 
>  .../display/panel/visionox,rm69299.yaml   | 85 +++
>  1 file changed, 85 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml 
> b/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml
> new file mode 100644
> index ..93cae431207c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/visionox,rm69299.yaml
> @@ -0,0 +1,85 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/visionox,rm69299.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Visionox model RM69299 Panels Device Tree Bindings.
> +
> +maintainers:
> + - Harigovindan P 
> +
> +description: |
> + This binding is for display panels using a Visionox RM692999 panel.
> +
> +allOf:
> + - $ref: panel-common.yaml#
> +
> +patternProperties:
> +  "^(panel|panel-dsi)@[0-9]$":
> +type: object

This looks wrong. None of the other panels needs to specify
a patternProperties, and neither do we need to do so for this panel.


> +properties:
> +  compatible:
> +const: visionox,rm69299-1080p-display
The compatible is what we use to match this binding.


> +
> +  reg:
> +maxItems: 1
> +
> +  vdda-supply:
> +description:
> +  Phandle of the regulator that provides the vdda supply voltage.
> +
> +  vdd3p3-supply:
> +description:
> +  Phandle of the regulator that provides the vdd3p3 supply voltage.
> +
> +  ports:
> +type: object
> +description:
> +  A node containing DSI input & output port nodes with endpoint
> +  definitions as documented in
> +  Documentation/devicetree/bindings/media/video-interfaces.txt
> +  Documentation/devicetree/bindings/graph.txt

I think you miss as " |" after "description:"
Again, see other panel bindings.


> +properties:
> +  port@0:

Please just use
port: true

port is already documented in panel-common.yaml.

> +type: object
> +description:
> +  DSI input port node.
> +
> +  reset-gpios:
reset-gpios is part of panel-common.
So specify only:
 reset-gpios: true

No description, as it is in panel-common.


> +description:
> +  a GPIO spec for the reset pin.
> +
> +required:
> +  - compatible
> +  - reg
> +  - vdda-supply
> +  - vdd3p3-supply
> +  - reset-gpios
> +
> +additionalProperties: false
> +
> +examples:
> +- |
> +dsi@ae94000 {
No @ae94000 - this will warn with upcoming dt_binding_check
improvements.

> +panel@0 {
> +compatible = "visionox,rm69299-1080p-display";
> +
> +vdda-supply = <_pp1800_l8c>;
> +vdd3p3-supply = <_pp2800_l18a>;
> +
> +reset-gpios = <_gpio 3 0>;
reg property is required, but missing in the example.


> +ports {
> +#address-cells = <1>;
> +#size-cells = <0>;
> +port@0 {
> +reg = <0>;
> +panel0_in: endpoint {
> +remote-endpoint = <_out>;
> +};
> +};
> +};
> +};
> +};
> +...
> +
> -- 
> 2.25.1
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH v2 08/17] drm/msm: remove checks for return value of drm_debugfs_create_files()

2020-03-10 Thread Wambui Karuga
Since commit 987d65d01356 (drm: debugfs: make
drm_debugfs_create_files() never fail), drm_debugfs_create_files never
fails and only returns 0. Therefore, the unnecessary checks for its
return value and error handling in various debugfs_init() functions in
drm/msm and have the functions return 0 directly.

v2: have debug functions return 0 instead of void to avoid build
breakage and ensure standalone compilation.

References: 
https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
Signed-off-by: Wambui Karuga 
---
 drivers/gpu/drm/msm/adreno/a5xx_debugfs.c | 12 +++-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c  | 14 +++---
 drivers/gpu/drm/msm/msm_debugfs.c | 13 -
 3 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c 
b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
index 075ecce4b5e0..011ab6353dbb 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
@@ -151,21 +151,15 @@ DEFINE_SIMPLE_ATTRIBUTE(reset_fops, NULL, reset_set, 
"%llx\n");
 int a5xx_debugfs_init(struct msm_gpu *gpu, struct drm_minor *minor)
 {
struct drm_device *dev;
-   int ret;
 
if (!minor)
return 0;
 
dev = minor->dev;
 
-   ret = drm_debugfs_create_files(a5xx_debugfs_list,
-   ARRAY_SIZE(a5xx_debugfs_list),
-   minor->debugfs_root, minor);
-
-   if (ret) {
-   DRM_DEV_ERROR(dev->dev, "could not install 
a5xx_debugfs_list\n");
-   return ret;
-   }
+   drm_debugfs_create_files(a5xx_debugfs_list,
+ARRAY_SIZE(a5xx_debugfs_list),
+minor->debugfs_root, minor);
 
debugfs_create_file("reset", S_IWUGO, minor->debugfs_root, dev,
_fops);
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c 
b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
index 6650f478b226..41b461128bbc 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
@@ -259,17 +259,9 @@ static struct drm_info_list mdp5_debugfs_list[] = {
 
 static int mdp5_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor)
 {
-   struct drm_device *dev = minor->dev;
-   int ret;
-
-   ret = drm_debugfs_create_files(mdp5_debugfs_list,
-   ARRAY_SIZE(mdp5_debugfs_list),
-   minor->debugfs_root, minor);
-
-   if (ret) {
-   DRM_DEV_ERROR(dev->dev, "could not install 
mdp5_debugfs_list\n");
-   return ret;
-   }
+   drm_debugfs_create_files(mdp5_debugfs_list,
+ARRAY_SIZE(mdp5_debugfs_list),
+minor->debugfs_root, minor);
 
return 0;
 }
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c 
b/drivers/gpu/drm/msm/msm_debugfs.c
index 1c74381a4fc9..6378157e1fff 100644
--- a/drivers/gpu/drm/msm/msm_debugfs.c
+++ b/drivers/gpu/drm/msm/msm_debugfs.c
@@ -220,14 +220,9 @@ int msm_debugfs_init(struct drm_minor *minor)
struct msm_drm_private *priv = dev->dev_private;
int ret;
 
-   ret = drm_debugfs_create_files(msm_debugfs_list,
-   ARRAY_SIZE(msm_debugfs_list),
-   minor->debugfs_root, minor);
-
-   if (ret) {
-   DRM_DEV_ERROR(dev->dev, "could not install msm_debugfs_list\n");
-   return ret;
-   }
+   drm_debugfs_create_files(msm_debugfs_list,
+ARRAY_SIZE(msm_debugfs_list),
+minor->debugfs_root, minor);
 
debugfs_create_file("gpu", S_IRUSR, minor->debugfs_root,
dev, _gpu_fops);
@@ -238,7 +233,7 @@ int msm_debugfs_init(struct drm_minor *minor)
return ret;
}
 
-   return ret;
+   return 0;
 }
 #endif
 
-- 
2.25.1

___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 4.19 14/86] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 5224010d90e4a..bd66d2aac41f7 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -328,7 +328,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 4.14 080/126] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 855248132b2bd..7d46399a39b4d 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -400,7 +400,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 5.5 023/189] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 271aa7bbca925..355a60b4a536f 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -336,7 +336,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 5.4 023/168] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 271aa7bbca925..355a60b4a536f 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -336,7 +336,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 4.9 55/88] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index c8d1f19c9a6d9..10d49d43c17eb 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -306,7 +306,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH 4.4 43/72] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI

2020-03-10 Thread Greg Kroah-Hartman
From: John Stultz 

[ Upstream commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d ]

I was hitting kCFI crashes when building with clang, and after
some digging finally narrowed it down to the
dsi_mgr_connector_mode_valid() function being implemented as
returning an int, instead of an enum drm_mode_status.

This patch fixes it, and appeases the opaque word of the kCFI
gods (seriously, clang inlining everything makes the kCFI
backtraces only really rough estimates of where things went
wrong).

Thanks as always to Sami for his help narrowing this down.

Cc: Rob Clark 
Cc: Sean Paul 
Cc: Sami Tolvanen 
Cc: Todd Kjos 
Cc: Alistair Delva 
Cc: Amit Pundir 
Cc: Sumit Semwal 
Cc: freedreno@lists.freedesktop.org
Cc: clang-built-li...@googlegroups.com
Signed-off-by: John Stultz 
Reviewed-by: Nick Desaulniers 
Tested-by: Amit Pundir 
Signed-off-by: Rob Clark 
Signed-off-by: Sasha Levin 
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c 
b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 0455ff75074ad..439dfb69e2ef8 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -302,7 +302,7 @@ static int dsi_mgr_connector_get_modes(struct drm_connector 
*connector)
return num;
 }
 
-static int dsi_mgr_connector_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status dsi_mgr_connector_mode_valid(struct drm_connector 
*connector,
struct drm_display_mode *mode)
 {
int id = dsi_mgr_connector_get_id(connector);
-- 
2.20.1



___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno