Sync the drm-intel-gt-next changes back to drm-intel-next via drm-next.
Unified · Split
| @@ -18,7 +18,6 @@ Block · 17 unmodified lines | ||
| 18 | 18 | kyber-iosched |
| 19 | 19 | null_blk |
| 20 | 20 | pr |
| 21 | − request | |
| 22 | 21 | stat |
| 23 | 22 | switching-sched |
| 24 | 23 | writeback_cache_control |
| @@ -1,99 +0,0 @@ | ||
| 1 | −============================ | |
| 2 | −struct request documentation | |
| 3 | −============================ | |
| 4 | − | |
| 5 | −Jens Axboe <jens.axboe@oracle.com> 27/05/02 | |
| 6 | − | |
| 7 | − | |
| 8 | −.. FIXME: | |
| 9 | − No idea about what does mean - seems just some noise, so comment it | |
| 10 | − | |
| 11 | − 1.0 | |
| 12 | − Index | |
| 13 | − | |
| 14 | − 2.0 Struct request members classification | |
| 15 | − | |
| 16 | − 2.1 struct request members explanation | |
| 17 | − | |
| 18 | − 3.0 | |
| 19 | − | |
| 20 | − | |
| 21 | − 2.0 | |
| 22 | − | |
| 23 | − | |
| 24 | − | |
| 25 | −Short explanation of request members | |
| 26 | −==================================== | |
| 27 | − | |
| 28 | −Classification flags: | |
| 29 | − | |
| 30 | − = ==================== | |
| 31 | − D driver member | |
| 32 | − B block layer member | |
| 33 | − I I/O scheduler member | |
| 34 | − = ==================== | |
| 35 | − | |
| 36 | −Unless an entry contains a D classification, a device driver must not access | |
| 37 | −this member. Some members may contain D classifications, but should only be | |
| 38 | −access through certain macros or functions (eg ->flags). | |
| 39 | − | |
| 40 | −<linux/blkdev.h> | |
| 41 | − | |
| 42 | −=============================== ======= ======================================= | |
| 43 | −Member Flag Comment | |
| 44 | −=============================== ======= ======================================= | |
| 45 | −struct list_head queuelist BI Organization on various internal | |
| 46 | − queues | |
| 47 | − | |
| 48 | −``void *elevator_private`` I I/O scheduler private data | |
| 49 | − | |
| 50 | −unsigned char cmd[16] D Driver can use this for setting up | |
| 51 | − a cdb before execution, see | |
| 52 | − blk_queue_prep_rq | |
| 53 | − | |
| 54 | −unsigned long flags DBI Contains info about data direction, | |
| 55 | − request type, etc. | |
| 56 | − | |
| 57 | −int rq_status D Request status bits | |
| 58 | − | |
| 59 | −kdev_t rq_dev DBI Target device | |
| 60 | − | |
| 61 | −int errors DB Error counts | |
| 62 | − | |
| 63 | −sector_t sector DBI Target location | |
| 64 | − | |
| 65 | −unsigned long hard_nr_sectors B Used to keep sector sane | |
| 66 | − | |
| 67 | −unsigned long nr_sectors DBI Total number of sectors in request | |
| 68 | − | |
| 69 | −unsigned long hard_nr_sectors B Used to keep nr_sectors sane | |
| 70 | − | |
| 71 | −unsigned short nr_phys_segments DB Number of physical scatter gather | |
| 72 | − segments in a request | |
| 73 | − | |
| 74 | −unsigned short nr_hw_segments DB Number of hardware scatter gather | |
| 75 | − segments in a request | |
| 76 | − | |
| 77 | −unsigned int current_nr_sectors DB Number of sectors in first segment | |
| 78 | − of request | |
| 79 | − | |
| 80 | −unsigned int hard_cur_sectors B Used to keep current_nr_sectors sane | |
| 81 | − | |
| 82 | −int tag DB TCQ tag, if assigned | |
| 83 | − | |
| 84 | −``void *special`` D Free to be used by driver | |
| 85 | − | |
| 86 | −``char *buffer`` D Map of first segment, also see | |
| 87 | − section on bouncing SECTION | |
| 88 | − | |
| 89 | −``struct completion *waiting`` D Can be used by driver to get signalled | |
| 90 | − on request completion | |
| 91 | − | |
| 92 | −``struct bio *bio`` DBI First bio in request | |
| 93 | − | |
| 94 | −``struct bio *biotail`` DBI Last bio in request | |
| 95 | − | |
| 96 | −``struct request_queue *q`` DB Request queue this request belongs to | |
| 97 | − | |
| 98 | −``struct request_list *rl`` B Request list this request came from | |
| 99 | −=============================== ======= ======================================= | |
| @@ -17,6 +17,7 @@ description: | · 16 unmodified lines | ||
| 17 | 17 | properties: |
| 18 | 18 | compatible: |
| 19 | 19 | enum: |
| 20 | + - fsl,imx6sx-ldb | |
| 20 | 21 | - fsl,imx8mp-ldb |
| 21 | 22 | - fsl,imx93-ldb |
| 22 | 23 | |
| @@ -64,7 +65,9 @@ allOf: · 41 unmodified lines | ||
| 64 | 65 | properties: |
| 65 | 66 | compatible: |
| 66 | 67 | contains: |
| 67 | − const: fsl,imx93-ldb | |
| 68 | + enum: | |
| 69 | + - fsl,imx6sx-ldb | |
| 70 | + - fsl,imx93-ldb | |
| 68 | 71 | then: |
| 69 | 72 | properties: |
| 70 | 73 | ports: |
| @@ -105,6 +105,29 @@ properties: · 104 unmodified lines | ||
| 105 | 105 | DSI output port node to the panel or the next bridge |
| 106 | 106 | in the chain. |
| 107 | 107 | |
| 108 | + properties: | |
| 109 | + endpoint: | |
| 110 | + $ref: /schemas/media/video-interfaces.yaml# | |
| 111 | + unevaluatedProperties: false | |
| 112 | + | |
| 113 | + properties: | |
| 114 | + data-lanes: | |
| 115 | + minItems: 1 | |
| 116 | + maxItems: 4 | |
| 117 | + uniqueItems: true | |
| 118 | + items: | |
| 119 | + enum: [ 1, 2, 3, 4 ] | |
| 120 | + | |
| 121 | + lane-polarities: | |
| 122 | + minItems: 1 | |
| 123 | + maxItems: 5 | |
| 124 | + description: | |
| 125 | + The Samsung MIPI DSI IP requires that all the data lanes have | |
| 126 | + the same polarity. | |
| 127 | + | |
| 128 | + dependencies: | |
| 129 | + lane-polarities: [data-lanes] | |
| 130 | + | |
| 108 | 131 | required: |
| 109 | 132 | - clock-names |
| 110 | 133 | - clocks |
| @@ -4,16 +4,24 @@ · 3 unmodified lines | ||
| 4 | 4 | $id: http://devicetree.org/schemas/display/bridge/toshiba,tc358767.yaml# |
| 5 | 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | 6 | |
| 7 | −title: Toshiba TC358767 eDP bridge | |
| 7 | +title: Toshiba TC358767/TC358867/TC9595 DSI/DPI/eDP bridge | |
| 8 | 8 | |
| 9 | 9 | maintainers: |
| 10 | 10 | - Andrey Gusakov <andrey.gusakov@cogentembedded.com> |
| 11 | 11 | |
| 12 | −description: The TC358767 is bridge device which converts DSI/DPI to eDP/DP | |
| 12 | +description: | | |
| 13 | + The TC358767/TC358867/TC9595 is bridge device which | |
| 14 | + converts DSI/DPI to eDP/DP . | |
| 13 | 15 | |
| 14 | 16 | properties: |
| 15 | 17 | compatible: |
| 16 | − const: toshiba,tc358767 | |
| 18 | + oneOf: | |
| 19 | + - items: | |
| 20 | + - enum: | |
| 21 | + - toshiba,tc358867 | |
| 22 | + - toshiba,tc9595 | |
| 23 | + - const: toshiba,tc358767 | |
| 24 | + - const: toshiba,tc358767 | |
| 17 | 25 | |
| 18 | 26 | reg: |
| 19 | 27 | enum: |
| @@ -19,11 +19,16 @@ allOf: · 18 unmodified lines | ||
| 19 | 19 | |
| 20 | 20 | properties: |
| 21 | 21 | compatible: |
| 22 | − items: | |
| 23 | − - enum: | |
| 24 | − - xiaomi,elish-boe-nt36523 | |
| 25 | − - xiaomi,elish-csot-nt36523 | |
| 26 | − - const: novatek,nt36523 | |
| 22 | + oneOf: | |
| 23 | + - items: | |
| 24 | + - enum: | |
| 25 | + - xiaomi,elish-boe-nt36523 | |
| 26 | + - xiaomi,elish-csot-nt36523 | |
| 27 | + - const: novatek,nt36523 | |
| 28 | + - items: | |
| 29 | + - enum: | |
| 30 | + - lenovo,j606f-boe-nt36523w | |
| 31 | + - const: novatek,nt36523w | |
| 27 | 32 | |
| 28 | 33 | reset-gpios: |
| 29 | 34 | maxItems: 1 |
| @@ -34,6 +39,7 @@ properties: · 4 unmodified lines | ||
| 34 | 39 | |
| 35 | 40 | reg: true |
| 36 | 41 | ports: true |
| 42 | + rotation: true | |
| 37 | 43 | backlight: true |
| 38 | 44 | |
| 39 | 45 | required: |
| @@ -77,6 +77,8 @@ properties: · 76 unmodified lines | ||
| 77 | 77 | - auo,t215hvn01 |
| 78 | 78 | # Shanghai AVIC Optoelectronics 7" 1024x600 color TFT-LCD panel |
| 79 | 79 | - avic,tm070ddh03 |
| 80 | + # BOE EV121WXM-N10-1850 12.1" WXGA (1280x800) TFT LCD panel | |
| 81 | + - boe,ev121wxm-n10-1850 | |
| 80 | 82 | # BOE HV070WSA-100 7.01" WSVGA TFT LCD panel |
| 81 | 83 | - boe,hv070wsa-100 |
| 82 | 84 | # BOE OPTOELECTRONICS TECHNOLOGY 10.1" WXGA TFT LCD panel |
| @@ -174,6 +176,8 @@ properties: · 91 unmodified lines | ||
| 174 | 176 | - innolux,at043tn24 |
| 175 | 177 | # Innolux AT070TN92 7.0" WQVGA TFT LCD panel |
| 176 | 178 | - innolux,at070tn92 |
| 179 | + # Innolux G070ACE-L01 7" WVGA (800x480) TFT LCD panel | |
| 180 | + - innolux,g070ace-l01 | |
| 177 | 181 | # Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD panel |
| 178 | 182 | - innolux,g070y2-l01 |
| 179 | 183 | # Innolux G070Y2-T02 7" WVGA (800x480) TFT LCD TTL panel |
| @@ -20,6 +20,8 @@ allOf: · 19 unmodified lines | ||
| 20 | 20 | properties: |
| 21 | 21 | compatible: |
| 22 | 22 | enum: |
| 23 | + # Anberic RG353V-V2 5.0" 640x480 TFT LCD panel | |
| 24 | + - anbernic,rg353v-panel-v2 | |
| 23 | 25 | # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel |
| 24 | 26 | - rocktech,jh057n00900 |
| 25 | 27 | # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel |
| @@ -0,0 +1,70 @@ | ||
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | |
| 2 | +%YAML 1.2 | |
| 3 | +--- | |
| 4 | +$id: http://devicetree.org/schemas/display/panel/samsung,s6d7aa0.yaml# | |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# | |
| 6 | + | |
| 7 | +title: Samsung S6D7AA0 MIPI-DSI LCD panel controller | |
| 8 | + | |
| 9 | +maintainers: | |
| 10 | + - Artur Weber <aweber.kernel@gmail.com> | |
| 11 | + | |
| 12 | +allOf: | |
| 13 | + - $ref: panel-common.yaml# | |
| 14 | + | |
| 15 | +properties: | |
| 16 | + compatible: | |
| 17 | + items: | |
| 18 | + - enum: | |
| 19 | + # 1280x800 LSL080AL02 panel | |
| 20 | + - samsung,lsl080al02 | |
| 21 | + # 1024x768 LSL080AL03 panel | |
| 22 | + - samsung,lsl080al03 | |
| 23 | + # 1024x768 LTL101AT01 panel | |
| 24 | + - samsung,ltl101at01 | |
| 25 | + - const: samsung,s6d7aa0 | |
| 26 | + | |
| 27 | + reg: true | |
| 28 | + | |
| 29 | + backlight: | |
| 30 | + description: | |
| 31 | + Backlight to use for the panel. If this property is set on panels | |
| 32 | + that have DSI-based backlight control (LSL080AL03 and LTL101AT01), | |
| 33 | + it overrides the DSI-based backlight. | |
| 34 | + | |
| 35 | + reset-gpios: | |
| 36 | + description: Reset GPIO pin, usually GPIO_ACTIVE_LOW. | |
| 37 | + | |
| 38 | + power-supply: | |
| 39 | + description: | |
| 40 | + Main power supply for the panel; the exact voltage differs between | |
| 41 | + panels, and is usually somewhere around 3.3-5v. | |
| 42 | + | |
| 43 | + vmipi-supply: | |
| 44 | + description: VMIPI supply, usually 1.8v. | |
| 45 | + | |
| 46 | +required: | |
| 47 | + - compatible | |
| 48 | + - reg | |
| 49 | + - reset-gpios | |
| 50 | + | |
| 51 | +additionalProperties: false | |
| 52 | + | |
| 53 | +examples: | |
| 54 | + - | | |
| 55 | + #include <dt-bindings/gpio/gpio.h> | |
| 56 | + | |
| 57 | + dsi { | |
| 58 | + #address-cells = <1>; | |
| 59 | + #size-cells = <0>; | |
| 60 | + | |
| 61 | + panel@0 { | |
| 62 | + compatible = "samsung,lsl080al02", "samsung,s6d7aa0"; | |
| 63 | + reg = <0>; | |
| 64 | + power-supply = <&display_3v3_supply>; | |
| 65 | + reset-gpios = <&gpf0 4 GPIO_ACTIVE_LOW>; | |
| 66 | + backlight = <&backlight>; | |
| 67 | + }; | |
| 68 | + }; | |
| 69 | + | |
| 70 | +... | |
| @@ -49,6 +49,7 @@ properties: · 48 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | properties: |
| 51 | 51 | data-lanes: |
| 52 | + minItems: 1 | |
| 52 | 53 | maxItems: 2 |
| 53 | 54 | |
| 54 | 55 | required: |
| @@ -17,20 +17,11 @@ description: · 16 unmodified lines | ||
| 17 | 17 | properties: |
| 18 | 18 | clocks: |
| 19 | 19 | minItems: 3 |
| 20 | − items: | |
| 21 | − - description: PCIe bridge clock. | |
| 22 | − - description: PCIe bus clock. | |
| 23 | − - description: PCIe PHY clock. | |
| 24 | − - description: Additional required clock entry for imx6sx-pcie, | |
| 25 | − imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep. | |
| 20 | + maxItems: 4 | |
| 26 | 21 | |
| 27 | 22 | clock-names: |
| 28 | 23 | minItems: 3 |
| 29 | − items: | |
| 30 | − - const: pcie | |
| 31 | − - const: pcie_bus | |
| 32 | − - enum: [ pcie_phy, pcie_aux ] | |
| 33 | − - enum: [ pcie_inbound_axi, pcie_aux ] | |
| 24 | + maxItems: 4 | |
| 34 | 25 | |
| 35 | 26 | num-lanes: |
| 36 | 27 | const: 1 |
| @@ -31,6 +31,19 @@ properties: · 30 unmodified lines | ||
| 31 | 31 | - const: dbi |
| 32 | 32 | - const: addr_space |
| 33 | 33 | |
| 34 | + clocks: | |
| 35 | + minItems: 3 | |
| 36 | + items: | |
| 37 | + - description: PCIe bridge clock. | |
| 38 | + - description: PCIe bus clock. | |
| 39 | + - description: PCIe PHY clock. | |
| 40 | + - description: Additional required clock entry for imx6sx-pcie, | |
| 41 | + imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep. | |
| 42 | + | |
| 43 | + clock-names: | |
| 44 | + minItems: 3 | |
| 45 | + maxItems: 4 | |
| 46 | + | |
| 34 | 47 | interrupts: |
| 35 | 48 | items: |
| 36 | 49 | - description: builtin eDMA interrupter. |
| @@ -49,6 +62,31 @@ required: · 12 unmodified lines | ||
| 49 | 62 | allOf: |
| 50 | 63 | - $ref: /schemas/pci/snps,dw-pcie-ep.yaml# |
| 51 | 64 | - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml# |
| 65 | + - if: | |
| 66 | + properties: | |
| 67 | + compatible: | |
| 68 | + enum: | |
| 69 | + - fsl,imx8mq-pcie-ep | |
| 70 | + then: | |
| 71 | + properties: | |
| 72 | + clocks: | |
| 73 | + minItems: 4 | |
| 74 | + clock-names: | |
| 75 | + items: | |
| 76 | + - const: pcie | |
| 77 | + - const: pcie_bus | |
| 78 | + - const: pcie_phy | |
| 79 | + - const: pcie_aux | |
| 80 | + else: | |
| 81 | + properties: | |
| 82 | + clocks: | |
| 83 | + maxItems: 3 | |
| 84 | + clock-names: | |
| 85 | + items: | |
| 86 | + - const: pcie | |
| 87 | + - const: pcie_bus | |
| 88 | + - const: pcie_aux | |
| 89 | + | |
| 52 | 90 | |
| 53 | 91 | unevaluatedProperties: false |
| 54 | 92 | |
| @@ -40,6 +40,19 @@ properties: · 39 unmodified lines | ||
| 40 | 40 | - const: dbi |
| 41 | 41 | - const: config |
| 42 | 42 | |
| 43 | + clocks: | |
| 44 | + minItems: 3 | |
| 45 | + items: | |
| 46 | + - description: PCIe bridge clock. | |
| 47 | + - description: PCIe bus clock. | |
| 48 | + - description: PCIe PHY clock. | |
| 49 | + - description: Additional required clock entry for imx6sx-pcie, | |
| 50 | + imx6sx-pcie-ep, imx8mq-pcie, imx8mq-pcie-ep. | |
| 51 | + | |
| 52 | + clock-names: | |
| 53 | + minItems: 3 | |
| 54 | + maxItems: 4 | |
| 55 | + | |
| 43 | 56 | interrupts: |
| 44 | 57 | items: |
| 45 | 58 | - description: builtin MSI controller. |
| @@ -77,6 +90,70 @@ required: · 31 unmodified lines | ||
| 77 | 90 | allOf: |
| 78 | 91 | - $ref: /schemas/pci/snps,dw-pcie.yaml# |
| 79 | 92 | - $ref: /schemas/pci/fsl,imx6q-pcie-common.yaml# |
| 93 | + - if: | |
| 94 | + properties: | |
| 95 | + compatible: | |
| 96 | + enum: | |
| 97 | + - fsl,imx6sx-pcie | |
| 98 | + then: | |
| 99 | + properties: | |
| 100 | + clocks: | |
| 101 | + minItems: 4 | |
| 102 | + clock-names: | |
| 103 | + items: | |
| 104 | + - const: pcie | |
| 105 | + - const: pcie_bus | |
| 106 | + - const: pcie_phy | |
| 107 | + - const: pcie_inbound_axi | |
| 108 | + | |
| 109 | + - if: | |
| 110 | + properties: | |
| 111 | + compatible: | |
| 112 | + enum: | |
| 113 | + - fsl,imx8mq-pcie | |
| 114 | + then: | |
| 115 | + properties: | |
| 116 | + clocks: | |
| 117 | + minItems: 4 | |
| 118 | + clock-names: | |
| 119 | + items: | |
| 120 | + - const: pcie | |
| 121 | + - const: pcie_bus | |
| 122 | + - const: pcie_phy | |
| 123 | + - const: pcie_aux | |
| 124 | + | |
| 125 | + - if: | |
| 126 | + properties: | |
| 127 | + compatible: | |
| 128 | + enum: | |
| 129 | + - fsl,imx6q-pcie | |
| 130 | + - fsl,imx6qp-pcie | |
| 131 | + - fsl,imx7d-pcie | |
| 132 | + then: | |
| 133 | + properties: | |
| 134 | + clocks: | |
| 135 | + maxItems: 3 | |
| 136 | + clock-names: | |
| 137 | + items: | |
| 138 | + - const: pcie | |
| 139 | + - const: pcie_bus | |
| 140 | + - const: pcie_phy | |
| 141 | + | |
| 142 | + - if: | |
| 143 | + properties: | |
| 144 | + compatible: | |
| 145 | + enum: | |
| 146 | + - fsl,imx8mm-pcie | |
| 147 | + - fsl,imx8mp-pcie | |
| 148 | + then: | |
| 149 | + properties: | |
| 150 | + clocks: | |
| 151 | + maxItems: 3 | |
| 152 | + clock-names: | |
| 153 | + items: | |
| 154 | + - const: pcie | |
| 155 | + - const: pcie_bus | |
| 156 | + - const: pcie_aux | |
| 80 | 157 | |
| 81 | 158 | unevaluatedProperties: false |
| 82 | 159 | |
| @@ -31,3 +31,7 @@ host such documentation: · 30 unmodified lines | ||
| 31 | 31 | .. toctree:: |
| 32 | 32 | |
| 33 | 33 | i915_vm_bind.rst |
| 34 | + | |
| 35 | +.. toctree:: | |
| 36 | + | |
| 37 | + xe.rst | |
| @@ -0,0 +1,235 @@ | ||
| 1 | +========================== | |
| 2 | +Xe – Merge Acceptance Plan | |
| 3 | +========================== | |
| 4 | +Xe is a new driver for Intel GPUs that supports both integrated and | |
| 5 | +discrete platforms starting with Tiger Lake (first Intel Xe Architecture). | |
| 6 | + | |
| 7 | +This document aims to establish a merge plan for the Xe, by writing down clear | |
| 8 | +pre-merge goals, in order to avoid unnecessary delays. | |
| 9 | + | |
| 10 | +Xe – Overview | |
| 11 | +============= | |
| 12 | +The main motivation of Xe is to have a fresh base to work from that is | |
| 13 | +unencumbered by older platforms, whilst also taking the opportunity to | |
| 14 | +rearchitect our driver to increase sharing across the drm subsystem, both | |
| 15 | +leveraging and allowing us to contribute more towards other shared components | |
| 16 | +like TTM and drm/scheduler. | |
| 17 | + | |
| 18 | +This is also an opportunity to start from the beginning with a clean uAPI that is | |
| 19 | +extensible by design and already aligned with the modern userspace needs. For | |
| 20 | +this reason, the memory model is solely based on GPU Virtual Address space | |
| 21 | +bind/unbind (‘VM_BIND’) of GEM buffer objects (BOs) and execution only supporting | |
| 22 | +explicit synchronization. With persistent mapping across the execution, the | |
| 23 | +userspace does not need to provide a list of all required mappings during each | |
| 24 | +submission. | |
| 25 | + | |
| 26 | +The new driver leverages a lot from i915. As for display, the intent is to share | |
| 27 | +the display code with the i915 driver so that there is maximum reuse there. | |
| 28 | + | |
| 29 | +As for the power management area, the goal is to have a much-simplified support | |
| 30 | +for the system suspend states (S-states), PCI device suspend states (D-states), | |
| 31 | +GPU/Render suspend states (R-states) and frequency management. It should leverage | |
| 32 | +as much as possible all the existent PCI-subsystem infrastructure (pm and | |
| 33 | +runtime_pm) and underlying firmware components such PCODE and GuC for the power | |
| 34 | +states and frequency decisions. | |
| 35 | + | |
| 36 | +Repository: | |
| 37 | + | |
| 38 | +https://gitlab.freedesktop.org/drm/xe/kernel (branch drm-xe-next) | |
| 39 | + | |
| 40 | +Xe – Platforms | |
| 41 | +============== | |
| 42 | +Currently, Xe is already functional and has experimental support for multiple | |
| 43 | +platforms starting from Tiger Lake, with initial support in userspace implemented | |
| 44 | +in Mesa (for Iris and Anv, our OpenGL and Vulkan drivers), as well as in NEO | |
| 45 | +(for OpenCL and Level0). | |
| 46 | + | |
| 47 | +During a transition period, platforms will be supported by both Xe and i915. | |
| 48 | +However, the force_probe mechanism existent in both drivers will allow only one | |
| 49 | +official and by-default probe at a given time. | |
| 50 | + | |
| 51 | +For instance, in order to probe a DG2 which PCI ID is 0x5690 by Xe instead of | |
| 52 | +i915, the following set of parameters need to be used: | |
| 53 | + | |
| 54 | +``` | |
| 55 | +i915.force_probe=!5690 xe.force_probe=5690 | |
| 56 | +``` | |
| 57 | + | |
| 58 | +In both drivers, the ‘.require_force_probe’ protection forces the user to use the | |
| 59 | +force_probe parameter while the driver is under development. This protection is | |
| 60 | +only removed when the support for the platform and the uAPI are stable. Stability | |
| 61 | +which needs to be demonstrated by CI results. | |
| 62 | + | |
| 63 | +In order to avoid user space regressions, i915 will continue to support all the | |
| 64 | +current platforms that are already out of this protection. Xe support will be | |
| 65 | +forever experimental and dependent on the usage of force_probe for these | |
| 66 | +platforms. | |
| 67 | + | |
| 68 | +When the time comes for Xe, the protection will be lifted on Xe and kept in i915. | |
| 69 | + | |
| 70 | +Xe driver will be protected with both STAGING Kconfig and force_probe. Changes in | |
| 71 | +the uAPI are expected while the driver is behind these protections. STAGING will | |
| 72 | +be removed when the driver uAPI gets to a mature state where we can guarantee the | |
| 73 | +‘no regression’ rule. Then force_probe will be lifted only for future platforms | |
| 74 | +that will be productized with Xe driver, but not with i915. | |
| 75 | + | |
| 76 | +Xe – Pre-Merge Goals | |
| 77 | +==================== | |
| 78 | + | |
| 79 | +Drm_scheduler | |
| 80 | +------------- | |
| 81 | +Xe primarily uses Firmware based scheduling (GuC FW). However, it will use | |
| 82 | +drm_scheduler as the scheduler ‘frontend’ for userspace submission in order to | |
| 83 | +resolve syncobj and dma-buf implicit sync dependencies. However, drm_scheduler is | |
| 84 | +not yet prepared to handle the 1-to-1 relationship between drm_gpu_scheduler and | |
| 85 | +drm_sched_entity. | |
| 86 | + | |
| 87 | +Deeper changes to drm_scheduler should *not* be required to get Xe accepted, but | |
| 88 | +some consensus needs to be reached between Xe and other community drivers that | |
| 89 | +could also benefit from this work, for coupling FW based/assisted submission such | |
| 90 | +as the ARM’s new Mali GPU driver, and others. | |
| 91 | + | |
| 92 | +As a key measurable result, the patch series introducing Xe itself shall not | |
| 93 | +depend on any other patch touching drm_scheduler itself that was not yet merged | |
| 94 | +through drm-misc. This, by itself, already includes the reach of an agreement for | |
| 95 | +uniform 1 to 1 relationship implementation / usage across drivers. | |
| 96 | + | |
| 97 | +GPU VA | |
| 98 | +------ | |
| 99 | +Two main goals of Xe are meeting together here: | |
| 100 | + | |
| 101 | +1) Have an uAPI that aligns with modern UMD needs. | |
| 102 | + | |
| 103 | +2) Early upstream engagement. | |
| 104 | + | |
| 105 | +RedHat engineers working on Nouveau proposed a new DRM feature to handle keeping | |
| 106 | +track of GPU virtual address mappings. This is still not merged upstream, but | |
| 107 | +this aligns very well with our goals and with our VM_BIND. The engagement with | |
| 108 | +upstream and the port of Xe towards GPUVA is already ongoing. | |
| 109 | + | |
| 110 | +As a key measurable result, Xe needs to be aligned with the GPU VA and working in | |
| 111 | +our tree. Missing Nouveau patches should *not* block Xe and any needed GPUVA | |
| 112 | +related patch should be independent and present on dri-devel or acked by | |
| 113 | +maintainers to go along with the first Xe pull request towards drm-next. | |
| 114 | + | |
| 115 | +DRM_VM_BIND | |
| 116 | +----------- | |
| 117 | +Nouveau, and Xe are all implementing ‘VM_BIND’ and new ‘Exec’ uAPIs in order to | |
| 118 | +fulfill the needs of the modern uAPI. Xe merge should *not* be blocked on the | |
| 119 | +development of a common new drm_infrastructure. However, the Xe team needs to | |
| 120 | +engage with the community to explore the options of a common API. | |
| 121 | + | |
| 122 | +As a key measurable result, the DRM_VM_BIND needs to be documented in this file | |
| 123 | +below, or this entire block deleted if the consensus is for independent drivers | |
| 124 | +vm_bind ioctls. | |
| 125 | + | |
| 126 | +Although having a common DRM level IOCTL for VM_BIND is not a requirement to get | |
| 127 | +Xe merged, it is mandatory to enforce the overall locking scheme for all major | |
| 128 | +structs and list (so vm and vma). So, a consensus is needed, and possibly some | |
| 129 | +common helpers. If helpers are needed, they should be also documented in this | |
| 130 | +document. | |
| 131 | + | |
| 132 | +ASYNC VM_BIND | |
| 133 | +------------- | |
| 134 | +Although having a common DRM level IOCTL for VM_BIND is not a requirement to get | |
| 135 | +Xe merged, it is mandatory to have a consensus with other drivers and Mesa. | |
| 136 | +It needs to be clear how to handle async VM_BIND and interactions with userspace | |
| 137 | +memory fences. Ideally with helper support so people don't get it wrong in all | |
| 138 | +possible ways. | |
| 139 | + | |
| 140 | +As a key measurable result, the benefits of ASYNC VM_BIND and a discussion of | |
| 141 | +various flavors, error handling and a sample API should be documented here or in | |
| 142 | +a separate document pointed to by this document. | |
| 143 | + | |
| 144 | +Userptr integration and vm_bind | |
| 145 | +------------------------------- | |
| 146 | +Different drivers implement different ways of dealing with execution of userptr. | |
| 147 | +With multiple drivers currently introducing support to VM_BIND, the goal is to | |
| 148 | +aim for a DRM consensus on what’s the best way to have that support. To some | |
| 149 | +extent this is already getting addressed itself with the GPUVA where likely the | |
| 150 | +userptr will be a GPUVA with a NULL GEM call VM bind directly on the userptr. | |
| 151 | +However, there are more aspects around the rules for that and the usage of | |
| 152 | +mmu_notifiers, locking and other aspects. | |
| 153 | + | |
| 154 | +This task here has the goal of introducing a documentation of the basic rules. | |
| 155 | + | |
| 156 | +The documentation *needs* to first live in this document (API session below) and | |
| 157 | +then moved to another more specific document or at Xe level or at DRM level. | |
| 158 | + | |
| 159 | +Documentation should include: | |
| 160 | + | |
| 161 | + * The userptr part of the VM_BIND api. | |
| 162 | + | |
| 163 | + * Locking, including the page-faulting case. | |
| 164 | + | |
| 165 | + * O(1) complexity under VM_BIND. | |
| 166 | + | |
| 167 | +Some parts of userptr like mmu_notifiers should become GPUVA or DRM helpers when | |
| 168 | +the second driver supporting VM_BIND+userptr appears. Details to be defined when | |
| 169 | +the time comes. | |
| 170 | + | |
| 171 | +Long running compute: minimal data structure/scaffolding | |
| 172 | +-------------------------------------------------------- | |
| 173 | +The generic scheduler code needs to include the handling of endless compute | |
| 174 | +contexts, with the minimal scaffolding for preempt-ctx fences (probably on the | |
| 175 | +drm_sched_entity) and making sure drm_scheduler can cope with the lack of job | |
| 176 | +completion fence. | |
| 177 | + | |
| 178 | +The goal is to achieve a consensus ahead of Xe initial pull-request, ideally with | |
| 179 | +this minimal drm/scheduler work, if needed, merged to drm-misc in a way that any | |
| 180 | +drm driver, including Xe, could re-use and add their own individual needs on top | |
| 181 | +in a next stage. However, this should not block the initial merge. | |
| 182 | + | |
| 183 | +This is a non-blocker item since the driver without the support for the long | |
| 184 | +running compute enabled is not a showstopper. | |
| 185 | + | |
| 186 | +Display integration with i915 | |
| 187 | +----------------------------- | |
| 188 | +In order to share the display code with the i915 driver so that there is maximum | |
| 189 | +reuse, the i915/display/ code is built twice, once for i915.ko and then for | |
| 190 | +xe.ko. Currently, the i915/display code in Xe tree is polluted with many 'ifdefs' | |
| 191 | +depending on the build target. The goal is to refactor both Xe and i915/display | |
| 192 | +code simultaneously in order to get a clean result before they land upstream, so | |
| 193 | +that display can already be part of the initial pull request towards drm-next. | |
| 194 | + | |
| 195 | +However, display code should not gate the acceptance of Xe in upstream. Xe | |
| 196 | +patches will be refactored in a way that display code can be removed, if needed, | |
| 197 | +from the first pull request of Xe towards drm-next. The expectation is that when | |
| 198 | +both drivers are part of the drm-tip, the introduction of cleaner patches will be | |
| 199 | +easier and speed up. | |
| 200 | + | |
| 201 | +Drm_exec | |
| 202 | +-------- | |
| 203 | +Helper to make dma_resv locking for a big number of buffers is getting removed in | |
| 204 | +the drm_exec series proposed in https://patchwork.freedesktop.org/patch/524376/ | |
| 205 | +If that happens, Xe needs to change and incorporate the changes in the driver. | |
| 206 | +The goal is to engage with the Community to understand if the best approach is to | |
| 207 | +move that to the drivers that are using it or if we should keep the helpers in | |
| 208 | +place waiting for Xe to get merged. | |
| 209 | + | |
| 210 | +This item ties into the GPUVA, VM_BIND, and even long-running compute support. | |
| 211 | + | |
| 212 | +As a key measurable result, we need to have a community consensus documented in | |
| 213 | +this document and the Xe driver prepared for the changes, if necessary. | |
| 214 | + | |
| 215 | +Dev_coredump | |
| 216 | +------------ | |
| 217 | + | |
| 218 | +Xe needs to align with other drivers on the way that the error states are | |
| 219 | +dumped, avoiding a Xe only error_state solution. The goal is to use devcoredump | |
| 220 | +infrastructure to report error states, since it produces a standardized way | |
| 221 | +by exposing a virtual and temporary /sys/class/devcoredump device. | |
| 222 | + | |
| 223 | +As the key measurable result, Xe driver needs to provide GPU snapshots captured | |
| 224 | +at hang time through devcoredump, but without depending on any core modification | |
| 225 | +of devcoredump infrastructure itself. | |
| 226 | + | |
| 227 | +Later, when we are in-tree, the goal is to collaborate with devcoredump | |
| 228 | +infrastructure with overall possible improvements, like multiple file support | |
| 229 | +for better organization of the dumps, snapshot support, dmesg extra print, | |
| 230 | +and whatever may make sense and help the overall infrastructure. | |
| 231 | + | |
| 232 | +Xe – uAPI high level overview | |
| 233 | +============================= | |
| 234 | + | |
| 235 | +...Warning: To be done in follow up patches after/when/where the main consensus in various items are individually reached. | |
| @@ -276,11 +276,8 @@ Various hold-ups: · 275 unmodified lines | ||
| 276 | 276 | - Need to switch to drm_fbdev_generic_setup(), otherwise a lot of the custom fb |
| 277 | 277 | setup code can't be deleted. |
| 278 | 278 | |
| 279 | −- Many drivers wrap drm_gem_fb_create() only to check for valid formats. For | |
| 280 | − atomic drivers we could check for valid formats by calling | |
| 281 | − drm_plane_check_pixel_format() against all planes, and pass if any plane | |
| 282 | − supports the format. For non-atomic that's not possible since like the format | |
| 283 | − list for the primary plane is fake and we'd therefor reject valid formats. | |
| 279 | +- Need to switch to drm_gem_fb_create(), as now drm_gem_fb_create() checks for | |
| 280 | + valid formats for atomic drivers. | |
| 284 | 281 | |
| 285 | 282 | - Many drivers subclass drm_framebuffer, we'd need a embedding compatible |
| 286 | 283 | version of the varios drm_gem_fb_create functions. Maybe called |
| @@ -118,14 +118,9 @@ Add Plane Features · 117 unmodified lines | ||
| 118 | 118 | |
| 119 | 119 | There's lots of plane features we could add support for: |
| 120 | 120 | |
| 121 | −- ARGB format on primary plane: blend the primary plane into background with | |
| 122 | − translucent alpha. | |
| 123 | − | |
| 124 | 121 | - Add background color KMS property[Good to get started]. |
| 125 | 122 | |
| 126 | −- Full alpha blending on all planes. | |
| 127 | − | |
| 128 | −- Rotation, scaling. | |
| 123 | +- Scaling. | |
| 129 | 124 | |
| 130 | 125 | - Additional buffer formats, especially YUV formats for video like NV12. |
| 131 | 126 | Low/high bpp RGB formats would also be interesting. |
| @@ -776,10 +776,11 @@ peer_notif_delay · 775 unmodified lines | ||
| 776 | 776 | Specify the delay, in milliseconds, between each peer |
| 777 | 777 | notification (gratuitous ARP and unsolicited IPv6 Neighbor |
| 778 | 778 | Advertisement) when they are issued after a failover event. |
| 779 | − This delay should be a multiple of the link monitor interval | |
| 780 | − (arp_interval or miimon, whichever is active). The default | |
| 781 | − value is 0 which means to match the value of the link monitor | |
| 782 | − interval. | |
| 779 | + This delay should be a multiple of the MII link monitor interval | |
| 780 | + (miimon). | |
| 781 | + | |
| 782 | + The valid range is 0 - 300000. The default value is 0, which means | |
| 783 | + to match the value of the MII link monitor interval. | |
| 783 | 784 | |
| 784 | 785 | prio |
| 785 | 786 | Slave priority. A higher number means higher priority. |
| @@ -116,8 +116,8 @@ Contents: · 115 unmodified lines | ||
| 116 | 116 | udplite |
| 117 | 117 | vrf |
| 118 | 118 | vxlan |
| 119 | − x25-iface | |
| 120 | 119 | x25 |
| 120 | + x25-iface | |
| 121 | 121 | xfrm_device |
| 122 | 122 | xfrm_proc |
| 123 | 123 | xfrm_sync |
| @@ -1,8 +1,7 @@ | ||
| 1 | 1 | .. SPDX-License-Identifier: GPL-2.0 |
| 2 | 2 | |
| 3 | −============================- | |
| 4 | 3 | X.25 Device Driver Interface |
| 5 | −============================- | |
| 4 | +============================ | |
| 6 | 5 | |
| 7 | 6 | Version 1.1 |
| 8 | 7 | |
| @@ -273,8 +273,8 @@ ABI/API · 272 unmodified lines | ||
| 273 | 273 | L: linux-api@vger.kernel.org |
| 274 | 274 | F: include/linux/syscalls.h |
| 275 | 275 | F: kernel/sys_ni.c |
| 276 | −X: include/uapi/ | |
| 277 | 276 | X: arch/*/include/uapi/ |
| 277 | +X: include/uapi/ | |
| 278 | 278 | |
| 279 | 279 | ABIT UGURU 1,2 HARDWARE MONITOR DRIVER |
| 280 | 280 | M: Hans de Goede <hdegoede@redhat.com> |
| @@ -406,12 +406,6 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) · 125 unmodified lines | ||
| 406 | 406 | S: Maintained |
| 407 | 407 | F: drivers/acpi/arm64 |
| 408 | 408 | |
| 409 | −ACPI SERIAL MULTI INSTANTIATE DRIVER | |
| 410 | −M: Hans de Goede <hdegoede@redhat.com> | |
| 411 | −L: platform-driver-x86@vger.kernel.org | |
| 412 | −S: Maintained | |
| 413 | −F: drivers/platform/x86/serial-multi-instantiate.c | |
| 414 | − | |
| 415 | 409 | ACPI PCC(Platform Communication Channel) MAILBOX DRIVER |
| 416 | 410 | M: Sudeep Holla <sudeep.holla@arm.com> |
| 417 | 411 | L: linux-acpi@vger.kernel.org |
| @@ -430,6 +424,12 @@ B: https://bugzilla.kernel.org · 12 unmodified lines | ||
| 430 | 424 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm |
| 431 | 425 | F: drivers/acpi/pmic/ |
| 432 | 426 | |
| 427 | +ACPI SERIAL MULTI INSTANTIATE DRIVER | |
| 428 | +M: Hans de Goede <hdegoede@redhat.com> | |
| 429 | +L: platform-driver-x86@vger.kernel.org | |
| 430 | +S: Maintained | |
| 431 | +F: drivers/platform/x86/serial-multi-instantiate.c | |
| 432 | + | |
| 433 | 433 | ACPI THERMAL DRIVER |
| 434 | 434 | M: Rafael J. Wysocki <rafael@kernel.org> |
| 435 | 435 | R: Zhang Rui <rui.zhang@intel.com> |
| @@ -823,6 +823,13 @@ L: linux-crypto@vger.kernel.org · 387 unmodified lines | ||
| 823 | 823 | S: Maintained |
| 824 | 824 | F: drivers/crypto/allwinner/ |
| 825 | 825 | |
| 826 | +ALLWINNER DMIC DRIVERS | |
| 827 | +M: Ban Tao <fengzheng923@gmail.com> | |
| 828 | +L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 829 | +S: Maintained | |
| 830 | +F: Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml | |
| 831 | +F: sound/soc/sunxi/sun50i-dmic.c | |
| 832 | + | |
| 826 | 833 | ALLWINNER HARDWARE SPINLOCK SUPPORT |
| 827 | 834 | M: Wilken Gottwalt <wilken.gottwalt@posteo.net> |
| 828 | 835 | S: Maintained |
| @@ -844,13 +851,6 @@ L: linux-media@vger.kernel.org · 15 unmodified lines | ||
| 844 | 851 | S: Maintained |
| 845 | 852 | F: drivers/staging/media/sunxi/cedrus/ |
| 846 | 853 | |
| 847 | −ALLWINNER DMIC DRIVERS | |
| 848 | −M: Ban Tao <fengzheng923@gmail.com> | |
| 849 | −L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 850 | −S: Maintained | |
| 851 | −F: Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml | |
| 852 | −F: sound/soc/sunxi/sun50i-dmic.c | |
| 853 | − | |
| 854 | 854 | ALPHA PORT |
| 855 | 855 | M: Richard Henderson <richard.henderson@linaro.org> |
| 856 | 856 | M: Ivan Kokshaysky <ink@jurassic.park.msu.ru> |
| @@ -1026,6 +1026,16 @@ F: drivers/char/hw_random/geode-rng.c · 169 unmodified lines | ||
| 1026 | 1026 | F: drivers/crypto/geode* |
| 1027 | 1027 | F: drivers/video/fbdev/geode/ |
| 1028 | 1028 | |
| 1029 | +AMD HSMP DRIVER | |
| 1030 | +M: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com> | |
| 1031 | +R: Carlos Bilbao <carlos.bilbao@amd.com> | |
| 1032 | +L: platform-driver-x86@vger.kernel.org | |
| 1033 | +S: Maintained | |
| 1034 | +F: Documentation/arch/x86/amd_hsmp.rst | |
| 1035 | +F: arch/x86/include/asm/amd_hsmp.h | |
| 1036 | +F: arch/x86/include/uapi/asm/amd_hsmp.h | |
| 1037 | +F: drivers/platform/x86/amd/hsmp.c | |
| 1038 | + | |
| 1029 | 1039 | AMD IOMMU (AMD-VI) |
| 1030 | 1040 | M: Joerg Roedel <joro@8bytes.org> |
| 1031 | 1041 | R: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> |
| @@ -1049,6 +1059,13 @@ F: drivers/gpu/drm/amd/include/vi_structs.h · 17 unmodified lines | ||
| 1049 | 1059 | F: include/uapi/linux/kfd_ioctl.h |
| 1050 | 1060 | F: include/uapi/linux/kfd_sysfs.h |
| 1051 | 1061 | |
| 1062 | +AMD MP2 I2C DRIVER | |
| 1063 | +M: Elie Morisse <syniurge@gmail.com> | |
| 1064 | +M: Shyam Sundar S K <shyam-sundar.s-k@amd.com> | |
| 1065 | +L: linux-i2c@vger.kernel.org | |
| 1066 | +S: Maintained | |
| 1067 | +F: drivers/i2c/busses/i2c-amd-mp2* | |
| 1068 | + | |
| 1052 | 1069 | AMD PDS CORE DRIVER |
| 1053 | 1070 | M: Shannon Nelson <shannon.nelson@amd.com> |
| 1054 | 1071 | M: Brett Creeley <brett.creeley@amd.com> |
| @@ -1058,18 +1075,6 @@ F: Documentation/networking/device_drivers/ethernet/amd/pds_core.rst · 3 unmodified lines | ||
| 1058 | 1075 | F: drivers/net/ethernet/amd/pds_core/ |
| 1059 | 1076 | F: include/linux/pds/ |
| 1060 | 1077 | |
| 1061 | −AMD SPI DRIVER | |
| 1062 | −M: Sanjay R Mehta <sanju.mehta@amd.com> | |
| 1063 | −S: Maintained | |
| 1064 | −F: drivers/spi/spi-amd.c | |
| 1065 | − | |
| 1066 | −AMD MP2 I2C DRIVER | |
| 1067 | −M: Elie Morisse <syniurge@gmail.com> | |
| 1068 | −M: Shyam Sundar S K <shyam-sundar.s-k@amd.com> | |
| 1069 | −L: linux-i2c@vger.kernel.org | |
| 1070 | −S: Maintained | |
| 1071 | −F: drivers/i2c/busses/i2c-amd-mp2* | |
| 1072 | − | |
| 1073 | 1078 | AMD PMC DRIVER |
| 1074 | 1079 | M: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> |
| 1075 | 1080 | L: platform-driver-x86@vger.kernel.org |
| @@ -1083,16 +1088,6 @@ S: Maintained · 7 unmodified lines | ||
| 1083 | 1088 | F: Documentation/ABI/testing/sysfs-amd-pmf |
| 1084 | 1089 | F: drivers/platform/x86/amd/pmf/ |
| 1085 | 1090 | |
| 1086 | −AMD HSMP DRIVER | |
| 1087 | −M: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@amd.com> | |
| 1088 | −R: Carlos Bilbao <carlos.bilbao@amd.com> | |
| 1089 | −L: platform-driver-x86@vger.kernel.org | |
| 1090 | −S: Maintained | |
| 1091 | −F: Documentation/arch/x86/amd_hsmp.rst | |
| 1092 | −F: arch/x86/include/asm/amd_hsmp.h | |
| 1093 | −F: arch/x86/include/uapi/asm/amd_hsmp.h | |
| 1094 | −F: drivers/platform/x86/amd/hsmp.c | |
| 1095 | − | |
| 1096 | 1091 | AMD POWERPLAY AND SWSMU |
| 1097 | 1092 | M: Evan Quan <evan.quan@amd.com> |
| 1098 | 1093 | L: amd-gfx@lists.freedesktop.org |
| @@ -1121,13 +1116,6 @@ M: Tom Lendacky <thomas.lendacky@amd.com> · 22 unmodified lines | ||
| 1121 | 1116 | S: Supported |
| 1122 | 1117 | F: arch/arm64/boot/dts/amd/ |
| 1123 | 1118 | |
| 1124 | −AMD XGBE DRIVER | |
| 1125 | −M: "Shyam Sundar S K" <Shyam-sundar.S-k@amd.com> | |
| 1126 | −L: netdev@vger.kernel.org | |
| 1127 | −S: Supported | |
| 1128 | −F: arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi | |
| 1129 | −F: drivers/net/ethernet/amd/xgbe/ | |
| 1130 | − | |
| 1131 | 1119 | AMD SENSOR FUSION HUB DRIVER |
| 1132 | 1120 | M: Basavaraj Natikar <basavaraj.natikar@amd.com> |
| 1133 | 1121 | L: linux-input@vger.kernel.org |
| @@ -1135,6 +1123,18 @@ S: Maintained · 1 unmodified line | ||
| 1135 | 1123 | F: Documentation/hid/amd-sfh* |
| 1136 | 1124 | F: drivers/hid/amd-sfh-hid/ |
| 1137 | 1125 | |
| 1126 | +AMD SPI DRIVER | |
| 1127 | +M: Sanjay R Mehta <sanju.mehta@amd.com> | |
| 1128 | +S: Maintained | |
| 1129 | +F: drivers/spi/spi-amd.c | |
| 1130 | + | |
| 1131 | +AMD XGBE DRIVER | |
| 1132 | +M: "Shyam Sundar S K" <Shyam-sundar.S-k@amd.com> | |
| 1133 | +L: netdev@vger.kernel.org | |
| 1134 | +S: Supported | |
| 1135 | +F: arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi | |
| 1136 | +F: drivers/net/ethernet/amd/xgbe/ | |
| 1137 | + | |
| 1138 | 1138 | AMLOGIC DDR PMU DRIVER |
| 1139 | 1139 | M: Jiucheng Xu <jiucheng.xu@amlogic.com> |
| 1140 | 1140 | L: linux-amlogic@lists.infradead.org |
| @@ -1169,6 +1169,14 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git · 28 unmodified lines | ||
| 1169 | 1169 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git |
| 1170 | 1170 | F: drivers/net/amt.c |
| 1171 | 1171 | |
| 1172 | +ANALOG DEVICES INC AD3552R DRIVER | |
| 1173 | +M: Nuno Sá <nuno.sa@analog.com> | |
| 1174 | +L: linux-iio@vger.kernel.org | |
| 1175 | +S: Supported | |
| 1176 | +W: https://ez.analog.com/linux-software-drivers | |
| 1177 | +F: Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml | |
| 1178 | +F: drivers/iio/dac/ad3552r.c | |
| 1179 | + | |
| 1172 | 1180 | ANALOG DEVICES INC AD4130 DRIVER |
| 1173 | 1181 | M: Cosmin Tanislav <cosmin.tanislav@analog.com> |
| 1174 | 1182 | L: linux-iio@vger.kernel.org |
| @@ -1194,14 +1202,6 @@ W: https://ez.analog.com/linux-software-drivers · 19 unmodified lines | ||
| 1194 | 1202 | F: Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml |
| 1195 | 1203 | F: drivers/iio/adc/ad7292.c |
| 1196 | 1204 | |
| 1197 | −ANALOG DEVICES INC AD3552R DRIVER | |
| 1198 | −M: Nuno Sá <nuno.sa@analog.com> | |
| 1199 | −L: linux-iio@vger.kernel.org | |
| 1200 | −S: Supported | |
| 1201 | −W: https://ez.analog.com/linux-software-drivers | |
| 1202 | −F: Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml | |
| 1203 | −F: drivers/iio/dac/ad3552r.c | |
| 1204 | − | |
| 1205 | 1205 | ANALOG DEVICES INC AD7293 DRIVER |
| 1206 | 1206 | M: Antoniu Miclaus <antoniu.miclaus@analog.com> |
| 1207 | 1207 | L: linux-iio@vger.kernel.org |
| @@ -1210,23 +1210,6 @@ W: https://ez.analog.com/linux-software-drivers · 2 unmodified lines | ||
| 1210 | 1210 | F: Documentation/devicetree/bindings/iio/dac/adi,ad7293.yaml |
| 1211 | 1211 | F: drivers/iio/dac/ad7293.c |
| 1212 | 1212 | |
| 1213 | −ANALOG DEVICES INC AD7768-1 DRIVER | |
| 1214 | −M: Michael Hennerich <Michael.Hennerich@analog.com> | |
| 1215 | −L: linux-iio@vger.kernel.org | |
| 1216 | −S: Supported | |
| 1217 | −W: https://ez.analog.com/linux-software-drivers | |
| 1218 | −F: Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml | |
| 1219 | −F: drivers/iio/adc/ad7768-1.c | |
| 1220 | − | |
| 1221 | −ANALOG DEVICES INC AD7780 DRIVER | |
| 1222 | −M: Michael Hennerich <Michael.Hennerich@analog.com> | |
| 1223 | −M: Renato Lui Geh <renatogeh@gmail.com> | |
| 1224 | −L: linux-iio@vger.kernel.org | |
| 1225 | −S: Supported | |
| 1226 | −W: https://ez.analog.com/linux-software-drivers | |
| 1227 | −F: Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | |
| 1228 | −F: drivers/iio/adc/ad7780.c | |
| 1229 | − | |
| 1230 | 1213 | ANALOG DEVICES INC AD74115 DRIVER |
| 1231 | 1214 | M: Cosmin Tanislav <cosmin.tanislav@analog.com> |
| 1232 | 1215 | L: linux-iio@vger.kernel.org |
| @@ -1244,6 +1227,23 @@ F: Documentation/devicetree/bindings/iio/addac/adi,ad74413r.yaml · 11 unmodified lines | ||
| 1244 | 1227 | F: drivers/iio/addac/ad74413r.c |
| 1245 | 1228 | F: include/dt-bindings/iio/addac/adi,ad74413r.h |
| 1246 | 1229 | |
| 1230 | +ANALOG DEVICES INC AD7768-1 DRIVER | |
| 1231 | +M: Michael Hennerich <Michael.Hennerich@analog.com> | |
| 1232 | +L: linux-iio@vger.kernel.org | |
| 1233 | +S: Supported | |
| 1234 | +W: https://ez.analog.com/linux-software-drivers | |
| 1235 | +F: Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml | |
| 1236 | +F: drivers/iio/adc/ad7768-1.c | |
| 1237 | + | |
| 1238 | +ANALOG DEVICES INC AD7780 DRIVER | |
| 1239 | +M: Michael Hennerich <Michael.Hennerich@analog.com> | |
| 1240 | +M: Renato Lui Geh <renatogeh@gmail.com> | |
| 1241 | +L: linux-iio@vger.kernel.org | |
| 1242 | +S: Supported | |
| 1243 | +W: https://ez.analog.com/linux-software-drivers | |
| 1244 | +F: Documentation/devicetree/bindings/iio/adc/adi,ad7780.yaml | |
| 1245 | +F: drivers/iio/adc/ad7780.c | |
| 1246 | + | |
| 1247 | 1247 | ANALOG DEVICES INC ADA4250 DRIVER |
| 1248 | 1248 | M: Antoniu Miclaus <antoniu.miclaus@analog.com> |
| 1249 | 1249 | L: linux-iio@vger.kernel.org |
| @@ -1294,10 +1294,10 @@ F: drivers/iio/imu/adis16460.c · 44 unmodified lines | ||
| 1294 | 1294 | ANALOG DEVICES INC ADIS16475 DRIVER |
| 1295 | 1295 | M: Nuno Sa <nuno.sa@analog.com> |
| 1296 | 1296 | L: linux-iio@vger.kernel.org |
| 1297 | −W: https://ez.analog.com/linux-software-drivers | |
| 1298 | 1297 | S: Supported |
| 1299 | −F: drivers/iio/imu/adis16475.c | |
| 1298 | +W: https://ez.analog.com/linux-software-drivers | |
| 1300 | 1299 | F: Documentation/devicetree/bindings/iio/imu/adi,adis16475.yaml |
| 1300 | +F: drivers/iio/imu/adis16475.c | |
| 1301 | 1301 | |
| 1302 | 1302 | ANALOG DEVICES INC ADM1177 DRIVER |
| 1303 | 1303 | M: Michael Hennerich <Michael.Hennerich@analog.com> |
| @@ -1315,21 +1315,21 @@ W: https://ez.analog.com/linux-software-drivers · 11 unmodified lines | ||
| 1315 | 1315 | F: Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml |
| 1316 | 1316 | F: drivers/iio/frequency/admv1013.c |
| 1317 | 1317 | |
| 1318 | −ANALOG DEVICES INC ADMV8818 DRIVER | |
| 1318 | +ANALOG DEVICES INC ADMV1014 DRIVER | |
| 1319 | 1319 | M: Antoniu Miclaus <antoniu.miclaus@analog.com> |
| 1320 | 1320 | L: linux-iio@vger.kernel.org |
| 1321 | 1321 | S: Supported |
| 1322 | 1322 | W: https://ez.analog.com/linux-software-drivers |
| 1323 | −F: Documentation/devicetree/bindings/iio/filter/adi,admv8818.yaml | |
| 1324 | −F: drivers/iio/filter/admv8818.c | |
| 1323 | +F: Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml | |
| 1324 | +F: drivers/iio/frequency/admv1014.c | |
| 1325 | 1325 | |
| 1326 | −ANALOG DEVICES INC ADMV1014 DRIVER | |
| 1326 | +ANALOG DEVICES INC ADMV8818 DRIVER | |
| 1327 | 1327 | M: Antoniu Miclaus <antoniu.miclaus@analog.com> |
| 1328 | 1328 | L: linux-iio@vger.kernel.org |
| 1329 | 1329 | S: Supported |
| 1330 | 1330 | W: https://ez.analog.com/linux-software-drivers |
| 1331 | −F: Documentation/devicetree/bindings/iio/frequency/adi,admv1014.yaml | |
| 1332 | −F: drivers/iio/frequency/admv1014.c | |
| 1331 | +F: Documentation/devicetree/bindings/iio/filter/adi,admv8818.yaml | |
| 1332 | +F: drivers/iio/filter/admv8818.c | |
| 1333 | 1333 | |
| 1334 | 1334 | ANALOG DEVICES INC ADP5061 DRIVER |
| 1335 | 1335 | M: Michael Hennerich <Michael.Hennerich@analog.com> |
| @@ -1351,8 +1351,8 @@ M: Lars-Peter Clausen <lars@metafoo.de> · 15 unmodified lines | ||
| 1351 | 1351 | L: linux-media@vger.kernel.org |
| 1352 | 1352 | S: Supported |
| 1353 | 1353 | W: https://ez.analog.com/linux-software-drivers |
| 1354 | −F: drivers/media/i2c/adv7180.c | |
| 1355 | 1354 | F: Documentation/devicetree/bindings/media/i2c/adv7180.yaml |
| 1355 | +F: drivers/media/i2c/adv7180.c | |
| 1356 | 1356 | |
| 1357 | 1357 | ANALOG DEVICES INC ADV748X DRIVER |
| 1358 | 1358 | M: Kieran Bingham <kieran.bingham@ideasonboard.com> |
| @@ -1371,8 +1371,8 @@ ANALOG DEVICES INC ADV7604 DRIVER · 12 unmodified lines | ||
| 1371 | 1371 | M: Hans Verkuil <hverkuil-cisco@xs4all.nl> |
| 1372 | 1372 | L: linux-media@vger.kernel.org |
| 1373 | 1373 | S: Maintained |
| 1374 | −F: drivers/media/i2c/adv7604* | |
| 1375 | 1374 | F: Documentation/devicetree/bindings/media/i2c/adv7604.yaml |
| 1375 | +F: drivers/media/i2c/adv7604* | |
| 1376 | 1376 | |
| 1377 | 1377 | ANALOG DEVICES INC ADV7842 DRIVER |
| 1378 | 1378 | M: Hans Verkuil <hverkuil-cisco@xs4all.nl> |
| @@ -1384,8 +1384,8 @@ ANALOG DEVICES INC ADXRS290 DRIVER · 5 unmodified lines | ||
| 1384 | 1384 | M: Nishant Malpani <nish.malpani25@gmail.com> |
| 1385 | 1385 | L: linux-iio@vger.kernel.org |
| 1386 | 1386 | S: Supported |
| 1387 | −F: drivers/iio/gyro/adxrs290.c | |
| 1388 | 1387 | F: Documentation/devicetree/bindings/iio/gyroscope/adi,adxrs290.yaml |
| 1388 | +F: drivers/iio/gyro/adxrs290.c | |
| 1389 | 1389 | |
| 1390 | 1390 | ANALOG DEVICES INC ASOC CODEC DRIVERS |
| 1391 | 1391 | M: Lars-Peter Clausen <lars@metafoo.de> |
| @@ -1625,6 +1625,17 @@ S: Maintained · 233 unmodified lines | ||
| 1625 | 1625 | F: drivers/net/arcnet/ |
| 1626 | 1626 | F: include/uapi/linux/if_arcnet.h |
| 1627 | 1627 | |
| 1628 | +ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS) | |
| 1629 | +M: Arnd Bergmann <arnd@arndb.de> | |
| 1630 | +M: Olof Johansson <olof@lixom.net> | |
| 1631 | +M: soc@kernel.org | |
| 1632 | +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 1633 | +S: Maintained | |
| 1634 | +C: irc://irc.libera.chat/armlinux | |
| 1635 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git | |
| 1636 | +F: arch/arm/boot/dts/Makefile | |
| 1637 | +F: arch/arm64/boot/dts/Makefile | |
| 1638 | + | |
| 1628 | 1639 | ARM ARCHITECTED TIMER DRIVER |
| 1629 | 1640 | M: Mark Rutland <mark.rutland@arm.com> |
| 1630 | 1641 | M: Marc Zyngier <maz@kernel.org> |
| @@ -1738,22 +1749,6 @@ S: Odd Fixes · 107 unmodified lines | ||
| 1738 | 1749 | F: drivers/amba/ |
| 1739 | 1750 | F: include/linux/amba/bus.h |
| 1740 | 1751 | |
| 1741 | −ARM PRIMECELL PL35X NAND CONTROLLER DRIVER | |
| 1742 | −M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 1743 | −M: Naga Sureshkumar Relli <nagasure@xilinx.com> | |
| 1744 | −L: linux-mtd@lists.infradead.org | |
| 1745 | −S: Maintained | |
| 1746 | −F: Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml | |
| 1747 | −F: drivers/mtd/nand/raw/pl35x-nand-controller.c | |
| 1748 | − | |
| 1749 | −ARM PRIMECELL PL35X SMC DRIVER | |
| 1750 | −M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 1751 | −M: Naga Sureshkumar Relli <nagasure@xilinx.com> | |
| 1752 | −L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 1753 | −S: Maintained | |
| 1754 | −F: Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml | |
| 1755 | −F: drivers/memory/pl353-smc.c | |
| 1756 | − | |
| 1757 | 1752 | ARM PRIMECELL CLCD PL110 DRIVER |
| 1758 | 1753 | M: Russell King <linux@armlinux.org.uk> |
| 1759 | 1754 | S: Odd Fixes |
| @@ -1771,6 +1766,22 @@ S: Odd Fixes · 11 unmodified lines | ||
| 1771 | 1766 | F: drivers/mmc/host/mmci.* |
| 1772 | 1767 | F: include/linux/amba/mmci.h |
| 1773 | 1768 | |
| 1769 | +ARM PRIMECELL PL35X NAND CONTROLLER DRIVER | |
| 1770 | +M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 1771 | +M: Naga Sureshkumar Relli <nagasure@xilinx.com> | |
| 1772 | +L: linux-mtd@lists.infradead.org | |
| 1773 | +S: Maintained | |
| 1774 | +F: Documentation/devicetree/bindings/mtd/arm,pl353-nand-r2p1.yaml | |
| 1775 | +F: drivers/mtd/nand/raw/pl35x-nand-controller.c | |
| 1776 | + | |
| 1777 | +ARM PRIMECELL PL35X SMC DRIVER | |
| 1778 | +M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 1779 | +M: Naga Sureshkumar Relli <nagasure@xilinx.com> | |
| 1780 | +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 1781 | +S: Maintained | |
| 1782 | +F: Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml | |
| 1783 | +F: drivers/memory/pl353-smc.c | |
| 1784 | + | |
| 1774 | 1785 | ARM PRIMECELL SSP PL022 SPI DRIVER |
| 1775 | 1786 | M: Linus Walleij <linus.walleij@linaro.org> |
| 1776 | 1787 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -1807,17 +1818,6 @@ F: Documentation/devicetree/bindings/iommu/arm,smmu* · 30 unmodified lines | ||
| 1807 | 1818 | F: drivers/iommu/arm/ |
| 1808 | 1819 | F: drivers/iommu/io-pgtable-arm* |
| 1809 | 1820 | |
| 1810 | −ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS) | |
| 1811 | −M: Arnd Bergmann <arnd@arndb.de> | |
| 1812 | −M: Olof Johansson <olof@lixom.net> | |
| 1813 | −M: soc@kernel.org | |
| 1814 | −L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 1815 | −S: Maintained | |
| 1816 | −C: irc://irc.libera.chat/armlinux | |
| 1817 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git | |
| 1818 | −F: arch/arm/boot/dts/Makefile | |
| 1819 | −F: arch/arm64/boot/dts/Makefile | |
| 1820 | − | |
| 1821 | 1821 | ARM SUB-ARCHITECTURES |
| 1822 | 1822 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1823 | 1823 | S: Maintained |
| @@ -1869,9 +1869,9 @@ M: Chen-Yu Tsai <wens@csie.org> · 45 unmodified lines | ||
| 1869 | 1869 | M: Jernej Skrabec <jernej.skrabec@gmail.com> |
| 1870 | 1870 | M: Samuel Holland <samuel@sholland.org> |
| 1871 | 1871 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 1872 | +L: linux-sunxi@lists.linux.dev | |
| 1872 | 1873 | S: Maintained |
| 1873 | 1874 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git |
| 1874 | −L: linux-sunxi@lists.linux.dev | |
| 1875 | 1875 | F: arch/arm/mach-sunxi/ |
| 1876 | 1876 | F: arch/arm64/boot/dts/allwinner/ |
| 1877 | 1877 | F: drivers/clk/sunxi-ng/ |
| @@ -1934,6 +1934,15 @@ F: arch/arm/mach-alpine/ · 56 unmodified lines | ||
| 1934 | 1934 | F: arch/arm64/boot/dts/amazon/ |
| 1935 | 1935 | F: drivers/*/*alpine* |
| 1936 | 1936 | |
| 1937 | +ARM/APPLE MACHINE SOUND DRIVERS | |
| 1938 | +M: Martin Povišer <povik+lin@cutebit.org> | |
| 1939 | +L: asahi@lists.linux.dev | |
| 1940 | +L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 1941 | +S: Maintained | |
| 1942 | +F: Documentation/devicetree/bindings/sound/apple,* | |
| 1943 | +F: sound/soc/apple/* | |
| 1944 | +F: sound/soc/codecs/cs42l83-i2c.c | |
| 1945 | + | |
| 1937 | 1946 | ARM/APPLE MACHINE SUPPORT |
| 1938 | 1947 | M: Hector Martin <marcan@marcan.st> |
| 1939 | 1948 | M: Sven Peter <sven@svenpeter.dev> |
| @@ -1961,7 +1970,7 @@ F: Documentation/devicetree/bindings/nvmem/apple,efuses.yaml · 21 unmodified lines | ||
| 1961 | 1970 | F: Documentation/devicetree/bindings/pci/apple,pcie.yaml |
| 1962 | 1971 | F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml |
| 1963 | 1972 | F: Documentation/devicetree/bindings/power/apple* |
| 1964 | −F: Documentation/devicetree/bindings/pwm/pwm-apple.yaml | |
| 1973 | +F: Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml | |
| 1965 | 1974 | F: Documentation/devicetree/bindings/watchdog/apple,wdt.yaml |
| 1966 | 1975 | F: arch/arm64/boot/dts/apple/ |
| 1967 | 1976 | F: drivers/bluetooth/hci_bcm4377.c |
| @@ -1985,15 +1994,6 @@ F: include/dt-bindings/pinctrl/apple.h · 17 unmodified lines | ||
| 1985 | 1994 | F: include/linux/apple-mailbox.h |
| 1986 | 1995 | F: include/linux/soc/apple/* |
| 1987 | 1996 | |
| 1988 | −ARM/APPLE MACHINE SOUND DRIVERS | |
| 1989 | −M: Martin Povišer <povik+lin@cutebit.org> | |
| 1990 | −L: asahi@lists.linux.dev | |
| 1991 | −L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 1992 | −S: Maintained | |
| 1993 | −F: Documentation/devicetree/bindings/sound/apple,* | |
| 1994 | −F: sound/soc/apple/* | |
| 1995 | −F: sound/soc/codecs/cs42l83-i2c.c | |
| 1996 | − | |
| 1997 | 1997 | ARM/ARTPEC MACHINE SUPPORT |
| 1998 | 1998 | M: Jesper Nilsson <jesper.nilsson@axis.com> |
| 1999 | 1999 | M: Lars Persson <lars.persson@axis.com> |
| @@ -2109,19 +2109,19 @@ S: Maintained · 109 unmodified lines | ||
| 2109 | 2109 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git |
| 2110 | 2110 | F: Documentation/ABI/testing/sysfs-bus-coresight-devices-* |
| 2111 | 2111 | F: Documentation/devicetree/bindings/arm/arm,coresight-*.yaml |
| 2112 | −F: Documentation/devicetree/bindings/arm/qcom,coresight-*.yaml | |
| 2113 | 2112 | F: Documentation/devicetree/bindings/arm/arm,embedded-trace-extension.yaml |
| 2114 | 2113 | F: Documentation/devicetree/bindings/arm/arm,trace-buffer-extension.yaml |
| 2114 | +F: Documentation/devicetree/bindings/arm/qcom,coresight-*.yaml | |
| 2115 | 2115 | F: Documentation/trace/coresight/* |
| 2116 | 2116 | F: drivers/hwtracing/coresight/* |
| 2117 | 2117 | F: include/dt-bindings/arm/coresight-cti-dt.h |
| 2118 | 2118 | F: include/linux/coresight* |
| 2119 | 2119 | F: samples/coresight/* |
| 2120 | −F: tools/perf/tests/shell/coresight/* | |
| 2121 | 2120 | F: tools/perf/arch/arm/util/auxtrace.c |
| 2122 | 2121 | F: tools/perf/arch/arm/util/cs-etm.c |
| 2123 | 2122 | F: tools/perf/arch/arm/util/cs-etm.h |
| 2124 | 2123 | F: tools/perf/arch/arm/util/pmu.c |
| 2124 | +F: tools/perf/tests/shell/coresight/* | |
| 2125 | 2125 | F: tools/perf/util/cs-etm-decoder/* |
| 2126 | 2126 | F: tools/perf/util/cs-etm.* |
| 2127 | 2127 | |
| @@ -2156,9 +2156,9 @@ F: Documentation/devicetree/bindings/leds/cznic,turris-omnia-leds.yaml · 28 unmodified lines | ||
| 2156 | 2156 | F: Documentation/devicetree/bindings/watchdog/armada-37xx-wdt.txt |
| 2157 | 2157 | F: drivers/bus/moxtet.c |
| 2158 | 2158 | F: drivers/firmware/turris-mox-rwtm.c |
| 2159 | +F: drivers/gpio/gpio-moxtet.c | |
| 2159 | 2160 | F: drivers/leds/leds-turris-omnia.c |
| 2160 | 2161 | F: drivers/mailbox/armada-37xx-rwtm-mailbox.c |
| 2161 | −F: drivers/gpio/gpio-moxtet.c | |
| 2162 | 2162 | F: drivers/watchdog/armada_37xx_wdt.c |
| 2163 | 2163 | F: include/dt-bindings/bus/moxtet.h |
| 2164 | 2164 | F: include/linux/armada-37xx-rwtm-mailbox.h |
| @@ -2188,10 +2188,10 @@ R: NXP Linux Team <linux-imx@nxp.com> · 23 unmodified lines | ||
| 2188 | 2188 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2189 | 2189 | S: Maintained |
| 2190 | 2190 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git |
| 2191 | −X: drivers/media/i2c/ | |
| 2192 | 2191 | F: arch/arm64/boot/dts/freescale/ |
| 2193 | 2192 | X: arch/arm64/boot/dts/freescale/fsl-* |
| 2194 | 2193 | X: arch/arm64/boot/dts/freescale/qoriq-* |
| 2194 | +X: drivers/media/i2c/ | |
| 2195 | 2195 | N: imx |
| 2196 | 2196 | N: mxs |
| 2197 | 2197 | |
| @@ -2245,12 +2245,12 @@ ARM/HPE GXP ARCHITECTURE · 47 unmodified lines | ||
| 2245 | 2245 | M: Jean-Marie Verdun <verdun@hpe.com> |
| 2246 | 2246 | M: Nick Hawkins <nick.hawkins@hpe.com> |
| 2247 | 2247 | S: Maintained |
| 2248 | −F: Documentation/hwmon/gxp-fan-ctrl.rst | |
| 2249 | 2248 | F: Documentation/devicetree/bindings/arm/hpe,gxp.yaml |
| 2250 | 2249 | F: Documentation/devicetree/bindings/hwmon/hpe,gxp-fan-ctrl.yaml |
| 2251 | 2250 | F: Documentation/devicetree/bindings/i2c/hpe,gxp-i2c.yaml |
| 2252 | 2251 | F: Documentation/devicetree/bindings/spi/hpe,gxp-spifi.yaml |
| 2253 | 2252 | F: Documentation/devicetree/bindings/timer/hpe,gxp-timer.yaml |
| 2253 | +F: Documentation/hwmon/gxp-fan-ctrl.rst | |
| 2254 | 2254 | F: arch/arm/boot/dts/hpe-bmc* |
| 2255 | 2255 | F: arch/arm/boot/dts/hpe-gxp* |
| 2256 | 2256 | F: arch/arm/mach-hpe/ |
| @@ -2275,9 +2275,9 @@ M: Krzysztof Halasa <khalasa@piap.pl> · 18 unmodified lines | ||
| 2275 | 2275 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2276 | 2276 | S: Maintained |
| 2277 | 2277 | F: Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml |
| 2278 | −F: Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion* | |
| 2279 | 2278 | F: Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt |
| 2280 | 2279 | F: Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.yaml |
| 2280 | +F: Documentation/devicetree/bindings/memory-controllers/intel,ixp4xx-expansion* | |
| 2281 | 2281 | F: Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.yaml |
| 2282 | 2282 | F: arch/arm/boot/dts/intel-ixp* |
| 2283 | 2283 | F: arch/arm/mach-ixp4xx/ |
| @@ -2447,13 +2447,6 @@ F: drivers/net/ethernet/microchip/vcap/ · 163 unmodified lines | ||
| 2447 | 2447 | F: drivers/pinctrl/pinctrl-microchip-sgpio.c |
| 2448 | 2448 | N: sparx5 |
| 2449 | 2449 | |
| 2450 | −Microchip Timer Counter Block (TCB) Capture Driver | |
| 2451 | −M: Kamel Bouhara <kamel.bouhara@bootlin.com> | |
| 2452 | −L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 2453 | −L: linux-iio@vger.kernel.org | |
| 2454 | −S: Maintained | |
| 2455 | −F: drivers/counter/microchip-tcb-capture.c | |
| 2456 | − | |
| 2457 | 2450 | ARM/MILBEAUT ARCHITECTURE |
| 2458 | 2451 | M: Taichi Sugaya <sugaya.taichi@socionext.com> |
| 2459 | 2452 | M: Takao Orito <orito.takao@socionext.com> |
| @@ -2525,8 +2518,8 @@ F: Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml · 65 unmodified lines | ||
| 2525 | 2518 | F: arch/arm/boot/dts/nuvoton-npcm* |
| 2526 | 2519 | F: arch/arm/mach-npcm/ |
| 2527 | 2520 | F: arch/arm64/boot/dts/nuvoton/ |
| 2528 | −F: drivers/*/*npcm* | |
| 2529 | 2521 | F: drivers/*/*/*npcm* |
| 2522 | +F: drivers/*/*npcm* | |
| 2530 | 2523 | F: drivers/rtc/rtc-nct3018y.c |
| 2531 | 2524 | F: include/dt-bindings/clock/nuvoton,npcm7xx-clock.h |
| 2532 | 2525 | F: include/dt-bindings/clock/nuvoton,npcm845-clk.h |
| @@ -2569,9 +2562,15 @@ F: arch/arm/mach-oxnas/ · 36 unmodified lines | ||
| 2569 | 2562 | F: drivers/power/reset/oxnas-restart.c |
| 2570 | 2563 | N: oxnas |
| 2571 | 2564 | |
| 2572 | −ARM/QUALCOMM SUPPORT | |
| 2573 | −M: Andy Gross <agross@kernel.org> | |
| 2574 | −M: Bjorn Andersson <andersson@kernel.org> | |
| 2565 | +ARM/QUALCOMM CHROMEBOOK SUPPORT | |
| 2566 | +R: cros-qcom-dts-watchers@chromium.org | |
| 2567 | +F: arch/arm64/boot/dts/qcom/sc7180* | |
| 2568 | +F: arch/arm64/boot/dts/qcom/sc7280* | |
| 2569 | +F: arch/arm64/boot/dts/qcom/sdm845-cheza* | |
| 2570 | + | |
| 2571 | +ARM/QUALCOMM SUPPORT | |
| 2572 | +M: Andy Gross <agross@kernel.org> | |
| 2573 | +M: Bjorn Andersson <andersson@kernel.org> | |
| 2575 | 2574 | R: Konrad Dybcio <konrad.dybcio@linaro.org> |
| 2576 | 2575 | L: linux-arm-msm@vger.kernel.org |
| 2577 | 2576 | S: Maintained |
| @@ -2602,22 +2601,16 @@ F: drivers/pci/controller/dwc/pcie-qcom.c · 24 unmodified lines | ||
| 2602 | 2601 | F: drivers/phy/qualcomm/ |
| 2603 | 2602 | F: drivers/power/*/msm* |
| 2604 | 2603 | F: drivers/reset/reset-qcom-* |
| 2605 | −F: drivers/ufs/host/ufs-qcom* | |
| 2606 | 2604 | F: drivers/spi/spi-geni-qcom.c |
| 2607 | 2605 | F: drivers/spi/spi-qcom-qspi.c |
| 2608 | 2606 | F: drivers/spi/spi-qup.c |
| 2609 | 2607 | F: drivers/tty/serial/msm_serial.c |
| 2608 | +F: drivers/ufs/host/ufs-qcom* | |
| 2610 | 2609 | F: drivers/usb/dwc3/dwc3-qcom.c |
| 2611 | 2610 | F: include/dt-bindings/*/qcom* |
| 2612 | 2611 | F: include/linux/*/qcom* |
| 2613 | 2612 | F: include/linux/soc/qcom/ |
| 2614 | 2613 | |
| 2615 | −ARM/QUALCOMM CHROMEBOOK SUPPORT | |
| 2616 | −R: cros-qcom-dts-watchers@chromium.org | |
| 2617 | −F: arch/arm64/boot/dts/qcom/sc7180* | |
| 2618 | −F: arch/arm64/boot/dts/qcom/sc7280* | |
| 2619 | −F: arch/arm64/boot/dts/qcom/sdm845-cheza* | |
| 2620 | − | |
| 2621 | 2614 | ARM/RDA MICRO ARCHITECTURE |
| 2622 | 2615 | M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> |
| 2623 | 2616 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -2709,9 +2702,9 @@ R: Alim Akhtar <alim.akhtar@samsung.com> · 85 unmodified lines | ||
| 2709 | 2702 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2710 | 2703 | L: linux-samsung-soc@vger.kernel.org |
| 2711 | 2704 | S: Maintained |
| 2712 | −C: irc://irc.libera.chat/linux-exynos | |
| 2713 | 2705 | Q: https://patchwork.kernel.org/project/linux-samsung-soc/list/ |
| 2714 | 2706 | B: mailto:linux-samsung-soc@vger.kernel.org |
| 2707 | +C: irc://irc.libera.chat/linux-exynos | |
| 2715 | 2708 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git |
| 2716 | 2709 | F: Documentation/arm/samsung/ |
| 2717 | 2710 | F: Documentation/devicetree/bindings/arm/samsung/ |
| @@ -2811,8 +2804,8 @@ M: Patrice Chotard <patrice.chotard@foss.st.com> · 93 unmodified lines | ||
| 2811 | 2804 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 2812 | 2805 | S: Maintained |
| 2813 | 2806 | W: http://www.stlinux.com |
| 2814 | −F: Documentation/devicetree/bindings/spi/st,ssc-spi.yaml | |
| 2815 | 2807 | F: Documentation/devicetree/bindings/i2c/st,sti-i2c.yaml |
| 2808 | +F: Documentation/devicetree/bindings/spi/st,ssc-spi.yaml | |
| 2816 | 2809 | F: arch/arm/boot/dts/sti* |
| 2817 | 2810 | F: arch/arm/mach-sti/ |
| 2818 | 2811 | F: drivers/ata/ahci_st.c |
| @@ -2959,15 +2952,15 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git · 140 unmodified lines | ||
| 2959 | 2952 | F: Documentation/devicetree/bindings/arm/toshiba.yaml |
| 2960 | 2953 | F: Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pipllct.yaml |
| 2961 | 2954 | F: Documentation/devicetree/bindings/clock/toshiba,tmpv770x-pismu.yaml |
| 2962 | −F: Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml | |
| 2963 | 2955 | F: Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml |
| 2956 | +F: Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml | |
| 2964 | 2957 | F: Documentation/devicetree/bindings/pci/toshiba,visconti-pcie.yaml |
| 2965 | 2958 | F: Documentation/devicetree/bindings/pinctrl/toshiba,visconti-pinctrl.yaml |
| 2966 | 2959 | F: Documentation/devicetree/bindings/watchdog/toshiba,visconti-wdt.yaml |
| 2967 | 2960 | F: arch/arm64/boot/dts/toshiba/ |
| 2968 | 2961 | F: drivers/clk/visconti/ |
| 2969 | −F: drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | |
| 2970 | 2962 | F: drivers/gpio/gpio-visconti.c |
| 2963 | +F: drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c | |
| 2971 | 2964 | F: drivers/pci/controller/dwc/pcie-visconti.c |
| 2972 | 2965 | F: drivers/pinctrl/visconti/ |
| 2973 | 2966 | F: drivers/watchdog/visconti_wdt.c |
| @@ -3112,6 +3105,13 @@ S: Maintained · 138 unmodified lines | ||
| 3112 | 3105 | F: Documentation/devicetree/bindings/net/asix,ax88796c.yaml |
| 3113 | 3106 | F: drivers/net/ethernet/asix/ax88796c_* |
| 3114 | 3107 | |
| 3108 | +ASPEED CRYPTO DRIVER | |
| 3109 | +M: Neal Liu <neal_liu@aspeedtech.com> | |
| 3110 | +L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) | |
| 3111 | +S: Maintained | |
| 3112 | +F: Documentation/devicetree/bindings/crypto/aspeed,* | |
| 3113 | +F: drivers/crypto/aspeed/ | |
| 3114 | + | |
| 3115 | 3115 | ASPEED PECI CONTROLLER |
| 3116 | 3116 | M: Iwona Winiarska <iwona.winiarska@intel.com> |
| 3117 | 3117 | L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) |
| @@ -3156,6 +3156,13 @@ S: Maintained · 38 unmodified lines | ||
| 3156 | 3156 | F: Documentation/devicetree/bindings/spi/aspeed,ast2600-fmc.yaml |
| 3157 | 3157 | F: drivers/spi/spi-aspeed-smc.c |
| 3158 | 3158 | |
| 3159 | +ASPEED USB UDC DRIVER | |
| 3160 | +M: Neal Liu <neal_liu@aspeedtech.com> | |
| 3161 | +L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) | |
| 3162 | +S: Maintained | |
| 3163 | +F: Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml | |
| 3164 | +F: drivers/usb/gadget/udc/aspeed_udc.c | |
| 3165 | + | |
| 3159 | 3166 | ASPEED VIDEO ENGINE DRIVER |
| 3160 | 3167 | M: Eddie James <eajames@linux.ibm.com> |
| 3161 | 3168 | L: linux-media@vger.kernel.org |
| @@ -3164,19 +3171,11 @@ S: Maintained · 2 unmodified lines | ||
| 3164 | 3171 | F: Documentation/devicetree/bindings/media/aspeed-video.txt |
| 3165 | 3172 | F: drivers/media/platform/aspeed/ |
| 3166 | 3173 | |
| 3167 | −ASPEED USB UDC DRIVER | |
| 3168 | −M: Neal Liu <neal_liu@aspeedtech.com> | |
| 3169 | −L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) | |
| 3170 | −S: Maintained | |
| 3171 | −F: Documentation/devicetree/bindings/usb/aspeed,ast2600-udc.yaml | |
| 3172 | −F: drivers/usb/gadget/udc/aspeed_udc.c | |
| 3173 | − | |
| 3174 | −ASPEED CRYPTO DRIVER | |
| 3175 | −M: Neal Liu <neal_liu@aspeedtech.com> | |
| 3176 | −L: linux-aspeed@lists.ozlabs.org (moderated for non-subscribers) | |
| 3174 | +ASUS EC HARDWARE MONITOR DRIVER | |
| 3175 | +M: Eugene Shalygin <eugene.shalygin@gmail.com> | |
| 3176 | +L: linux-hwmon@vger.kernel.org | |
| 3177 | 3177 | S: Maintained |
| 3178 | −F: Documentation/devicetree/bindings/crypto/aspeed,* | |
| 3179 | −F: drivers/crypto/aspeed/ | |
| 3178 | +F: drivers/hwmon/asus-ec-sensors.c | |
| 3180 | 3179 | |
| 3181 | 3180 | ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS |
| 3182 | 3181 | M: Corentin Chary <corentin.chary@gmail.com> |
| @@ -3194,6 +3193,12 @@ S: Maintained · 11 unmodified lines | ||
| 3194 | 3193 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git |
| 3195 | 3194 | F: drivers/platform/x86/asus-tf103c-dock.c |
| 3196 | 3195 | |
| 3196 | +ASUS WIRELESS RADIO CONTROL DRIVER | |
| 3197 | +M: João Paulo Rechi Vita <jprvita@gmail.com> | |
| 3198 | +L: platform-driver-x86@vger.kernel.org | |
| 3199 | +S: Maintained | |
| 3200 | +F: drivers/platform/x86/asus-wireless.c | |
| 3201 | + | |
| 3197 | 3202 | ASUS WMI HARDWARE MONITOR DRIVER |
| 3198 | 3203 | M: Ed Brindley <kernel@maidavale.org> |
| 3199 | 3204 | M: Denis Pauk <pauk.denis@gmail.com> |
| @@ -3201,18 +3206,6 @@ L: linux-hwmon@vger.kernel.org · 1 unmodified line | ||
| 3201 | 3206 | S: Maintained |
| 3202 | 3207 | F: drivers/hwmon/asus_wmi_sensors.c |
| 3203 | 3208 | |
| 3204 | −ASUS EC HARDWARE MONITOR DRIVER | |
| 3205 | −M: Eugene Shalygin <eugene.shalygin@gmail.com> | |
| 3206 | −L: linux-hwmon@vger.kernel.org | |
| 3207 | −S: Maintained | |
| 3208 | −F: drivers/hwmon/asus-ec-sensors.c | |
| 3209 | − | |
| 3210 | −ASUS WIRELESS RADIO CONTROL DRIVER | |
| 3211 | −M: João Paulo Rechi Vita <jprvita@gmail.com> | |
| 3212 | −L: platform-driver-x86@vger.kernel.org | |
| 3213 | −S: Maintained | |
| 3214 | −F: drivers/platform/x86/asus-wireless.c | |
| 3215 | − | |
| 3216 | 3209 | ASYMMETRIC KEYS |
| 3217 | 3210 | M: David Howells <dhowells@redhat.com> |
| 3218 | 3211 | L: keyrings@vger.kernel.org |
| @@ -3352,10 +3345,10 @@ R: Boqun Feng <boqun.feng@gmail.com> · 133 unmodified lines | ||
| 3352 | 3345 | R: Mark Rutland <mark.rutland@arm.com> |
| 3353 | 3346 | L: linux-kernel@vger.kernel.org |
| 3354 | 3347 | S: Maintained |
| 3348 | +F: Documentation/atomic_*.txt | |
| 3355 | 3349 | F: arch/*/include/asm/atomic*.h |
| 3356 | 3350 | F: include/*/atomic*.h |
| 3357 | 3351 | F: include/linux/refcount.h |
| 3358 | −F: Documentation/atomic_*.txt | |
| 3359 | 3352 | F: scripts/atomic/ |
| 3360 | 3353 | |
| 3361 | 3354 | ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER |
| @@ -3649,50 +3642,6 @@ S: Maintained · 287 unmodified lines | ||
| 3649 | 3642 | F: Documentation/devicetree/bindings/iio/accel/bosch,bma400.yaml |
| 3650 | 3643 | F: drivers/iio/accel/bma400* |
| 3651 | 3644 | |
| 3652 | −BPF [GENERAL] (Safe Dynamic Programs and Tools) | |
| 3653 | −M: Alexei Starovoitov <ast@kernel.org> | |
| 3654 | −M: Daniel Borkmann <daniel@iogearbox.net> | |
| 3655 | −M: Andrii Nakryiko <andrii@kernel.org> | |
| 3656 | −R: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3657 | −R: Song Liu <song@kernel.org> | |
| 3658 | −R: Yonghong Song <yhs@fb.com> | |
| 3659 | −R: John Fastabend <john.fastabend@gmail.com> | |
| 3660 | −R: KP Singh <kpsingh@kernel.org> | |
| 3661 | −R: Stanislav Fomichev <sdf@google.com> | |
| 3662 | −R: Hao Luo <haoluo@google.com> | |
| 3663 | −R: Jiri Olsa <jolsa@kernel.org> | |
| 3664 | −L: bpf@vger.kernel.org | |
| 3665 | −S: Supported | |
| 3666 | −W: https://bpf.io/ | |
| 3667 | −Q: https://patchwork.kernel.org/project/netdevbpf/list/?delegate=121173 | |
| 3668 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git | |
| 3669 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git | |
| 3670 | −F: Documentation/bpf/ | |
| 3671 | −F: Documentation/networking/filter.rst | |
| 3672 | −F: Documentation/userspace-api/ebpf/ | |
| 3673 | −F: arch/*/net/* | |
| 3674 | −F: include/linux/bpf* | |
| 3675 | −F: include/linux/btf* | |
| 3676 | −F: include/linux/filter.h | |
| 3677 | −F: include/trace/events/xdp.h | |
| 3678 | −F: include/uapi/linux/bpf* | |
| 3679 | −F: include/uapi/linux/btf* | |
| 3680 | −F: include/uapi/linux/filter.h | |
| 3681 | −F: kernel/bpf/ | |
| 3682 | −F: kernel/trace/bpf_trace.c | |
| 3683 | −F: lib/test_bpf.c | |
| 3684 | −F: net/bpf/ | |
| 3685 | −F: net/core/filter.c | |
| 3686 | −F: net/sched/act_bpf.c | |
| 3687 | −F: net/sched/cls_bpf.c | |
| 3688 | −F: samples/bpf/ | |
| 3689 | −F: scripts/bpf_doc.py | |
| 3690 | −F: scripts/pahole-flags.sh | |
| 3691 | −F: scripts/pahole-version.sh | |
| 3692 | −F: tools/bpf/ | |
| 3693 | −F: tools/lib/bpf/ | |
| 3694 | −F: tools/testing/selftests/bpf/ | |
| 3695 | − | |
| 3696 | 3645 | BPF JIT for ARM |
| 3697 | 3646 | M: Shubham Bansal <illusionist.neo@gmail.com> |
| 3698 | 3647 | L: bpf@vger.kernel.org |
| @@ -3771,79 +3720,79 @@ S: Supported · 72 unmodified lines | ||
| 3771 | 3720 | F: arch/x86/net/ |
| 3772 | 3721 | X: arch/x86/net/bpf_jit_comp32.c |
| 3773 | 3722 | |
| 3723 | +BPF [BTF] | |
| 3724 | +M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3725 | +L: bpf@vger.kernel.org | |
| 3726 | +S: Maintained | |
| 3727 | +F: include/linux/btf* | |
| 3728 | +F: kernel/bpf/btf.c | |
| 3729 | + | |
| 3774 | 3730 | BPF [CORE] |
| 3775 | 3731 | M: Alexei Starovoitov <ast@kernel.org> |
| 3776 | 3732 | M: Daniel Borkmann <daniel@iogearbox.net> |
| 3777 | 3733 | R: John Fastabend <john.fastabend@gmail.com> |
| 3778 | 3734 | L: bpf@vger.kernel.org |
| 3779 | 3735 | S: Maintained |
| 3780 | −F: kernel/bpf/verifier.c | |
| 3781 | −F: kernel/bpf/tnum.c | |
| 3782 | −F: kernel/bpf/core.c | |
| 3783 | −F: kernel/bpf/syscall.c | |
| 3784 | −F: kernel/bpf/dispatcher.c | |
| 3785 | −F: kernel/bpf/trampoline.c | |
| 3786 | 3736 | F: include/linux/bpf* |
| 3787 | 3737 | F: include/linux/filter.h |
| 3788 | 3738 | F: include/linux/tnum.h |
| 3739 | +F: kernel/bpf/core.c | |
| 3740 | +F: kernel/bpf/dispatcher.c | |
| 3741 | +F: kernel/bpf/syscall.c | |
| 3742 | +F: kernel/bpf/tnum.c | |
| 3743 | +F: kernel/bpf/trampoline.c | |
| 3744 | +F: kernel/bpf/verifier.c | |
| 3789 | 3745 | |
| 3790 | −BPF [BTF] | |
| 3791 | −M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3792 | −L: bpf@vger.kernel.org | |
| 3793 | −S: Maintained | |
| 3794 | −F: kernel/bpf/btf.c | |
| 3795 | −F: include/linux/btf* | |
| 3796 | − | |
| 3797 | −BPF [TRACING] | |
| 3798 | −M: Song Liu <song@kernel.org> | |
| 3799 | −R: Jiri Olsa <jolsa@kernel.org> | |
| 3746 | +BPF [DOCUMENTATION] (Related to Standardization) | |
| 3747 | +R: David Vernet <void@manifault.com> | |
| 3800 | 3748 | L: bpf@vger.kernel.org |
| 3749 | +L: bpf@ietf.org | |
| 3801 | 3750 | S: Maintained |
| 3802 | −F: kernel/trace/bpf_trace.c | |
| 3803 | −F: kernel/bpf/stackmap.c | |
| 3751 | +F: Documentation/bpf/instruction-set.rst | |
| 3804 | 3752 | |
| 3805 | −BPF [NETWORKING] (tc BPF, sock_addr) | |
| 3806 | −M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3753 | +BPF [GENERAL] (Safe Dynamic Programs and Tools) | |
| 3754 | +M: Alexei Starovoitov <ast@kernel.org> | |
| 3807 | 3755 | M: Daniel Borkmann <daniel@iogearbox.net> |
| 3756 | +M: Andrii Nakryiko <andrii@kernel.org> | |
| 3757 | +R: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3758 | +R: Song Liu <song@kernel.org> | |
| 3759 | +R: Yonghong Song <yhs@fb.com> | |
| 3808 | 3760 | R: John Fastabend <john.fastabend@gmail.com> |
| 3761 | +R: KP Singh <kpsingh@kernel.org> | |
| 3762 | +R: Stanislav Fomichev <sdf@google.com> | |
| 3763 | +R: Hao Luo <haoluo@google.com> | |
| 3764 | +R: Jiri Olsa <jolsa@kernel.org> | |
| 3809 | 3765 | L: bpf@vger.kernel.org |
| 3810 | −L: netdev@vger.kernel.org | |
| 3811 | −S: Maintained | |
| 3766 | +S: Supported | |
| 3767 | +W: https://bpf.io/ | |
| 3768 | +Q: https://patchwork.kernel.org/project/netdevbpf/list/?delegate=121173 | |
| 3769 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git | |
| 3770 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git | |
| 3771 | +F: Documentation/bpf/ | |
| 3772 | +F: Documentation/networking/filter.rst | |
| 3773 | +F: Documentation/userspace-api/ebpf/ | |
| 3774 | +F: arch/*/net/* | |
| 3775 | +F: include/linux/bpf* | |
| 3776 | +F: include/linux/btf* | |
| 3777 | +F: include/linux/filter.h | |
| 3778 | +F: include/trace/events/xdp.h | |
| 3779 | +F: include/uapi/linux/bpf* | |
| 3780 | +F: include/uapi/linux/btf* | |
| 3781 | +F: include/uapi/linux/filter.h | |
| 3782 | +F: kernel/bpf/ | |
| 3783 | +F: kernel/trace/bpf_trace.c | |
| 3784 | +F: lib/test_bpf.c | |
| 3785 | +F: net/bpf/ | |
| 3812 | 3786 | F: net/core/filter.c |
| 3813 | 3787 | F: net/sched/act_bpf.c |
| 3814 | 3788 | F: net/sched/cls_bpf.c |
| 3815 | − | |
| 3816 | −BPF [NETWORKING] (struct_ops, reuseport) | |
| 3817 | −M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3818 | −L: bpf@vger.kernel.org | |
| 3819 | −L: netdev@vger.kernel.org | |
| 3820 | −S: Maintained | |
| 3821 | −F: kernel/bpf/bpf_struct* | |
| 3822 | − | |
| 3823 | −BPF [SECURITY & LSM] (Security Audit and Enforcement using BPF) | |
| 3824 | −M: KP Singh <kpsingh@kernel.org> | |
| 3825 | −R: Florent Revest <revest@chromium.org> | |
| 3826 | −R: Brendan Jackman <jackmanb@chromium.org> | |
| 3827 | −L: bpf@vger.kernel.org | |
| 3828 | −S: Maintained | |
| 3829 | −F: Documentation/bpf/prog_lsm.rst | |
| 3830 | −F: include/linux/bpf_lsm.h | |
| 3831 | −F: kernel/bpf/bpf_lsm.c | |
| 3832 | −F: security/bpf/ | |
| 3833 | − | |
| 3834 | −BPF [STORAGE & CGROUPS] | |
| 3835 | −M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3836 | −L: bpf@vger.kernel.org | |
| 3837 | −S: Maintained | |
| 3838 | −F: kernel/bpf/cgroup.c | |
| 3839 | −F: kernel/bpf/*storage.c | |
| 3840 | −F: kernel/bpf/bpf_lru* | |
| 3841 | − | |
| 3842 | −BPF [RINGBUF] | |
| 3843 | −M: Andrii Nakryiko <andrii@kernel.org> | |
| 3844 | −L: bpf@vger.kernel.org | |
| 3845 | −S: Maintained | |
| 3846 | −F: kernel/bpf/ringbuf.c | |
| 3789 | +F: samples/bpf/ | |
| 3790 | +F: scripts/bpf_doc.py | |
| 3791 | +F: scripts/pahole-flags.sh | |
| 3792 | +F: scripts/pahole-version.sh | |
| 3793 | +F: tools/bpf/ | |
| 3794 | +F: tools/lib/bpf/ | |
| 3795 | +F: tools/testing/selftests/bpf/ | |
| 3847 | 3796 | |
| 3848 | 3797 | BPF [ITERATOR] |
| 3849 | 3798 | M: Yonghong Song <yhs@fb.com> |
| @@ -3870,12 +3819,45 @@ L: bpf@vger.kernel.org · 20 unmodified lines | ||
| 3870 | 3819 | S: Maintained |
| 3871 | 3820 | F: tools/lib/bpf/ |
| 3872 | 3821 | |
| 3873 | −BPF [TOOLING] (bpftool) | |
| 3874 | −M: Quentin Monnet <quentin@isovalent.com> | |
| 3822 | +BPF [MISC] | |
| 3823 | +L: bpf@vger.kernel.org | |
| 3824 | +S: Odd Fixes | |
| 3825 | +K: (?:\b|_)bpf(?:\b|_) | |
| 3826 | + | |
| 3827 | +BPF [NETWORKING] (struct_ops, reuseport) | |
| 3828 | +M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3875 | 3829 | L: bpf@vger.kernel.org |
| 3830 | +L: netdev@vger.kernel.org | |
| 3876 | 3831 | S: Maintained |
| 3877 | −F: kernel/bpf/disasm.* | |
| 3878 | −F: tools/bpf/bpftool/ | |
| 3832 | +F: kernel/bpf/bpf_struct* | |
| 3833 | + | |
| 3834 | +BPF [NETWORKING] (tc BPF, sock_addr) | |
| 3835 | +M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3836 | +M: Daniel Borkmann <daniel@iogearbox.net> | |
| 3837 | +R: John Fastabend <john.fastabend@gmail.com> | |
| 3838 | +L: bpf@vger.kernel.org | |
| 3839 | +L: netdev@vger.kernel.org | |
| 3840 | +S: Maintained | |
| 3841 | +F: net/core/filter.c | |
| 3842 | +F: net/sched/act_bpf.c | |
| 3843 | +F: net/sched/cls_bpf.c | |
| 3844 | + | |
| 3845 | +BPF [RINGBUF] | |
| 3846 | +M: Andrii Nakryiko <andrii@kernel.org> | |
| 3847 | +L: bpf@vger.kernel.org | |
| 3848 | +S: Maintained | |
| 3849 | +F: kernel/bpf/ringbuf.c | |
| 3850 | + | |
| 3851 | +BPF [SECURITY & LSM] (Security Audit and Enforcement using BPF) | |
| 3852 | +M: KP Singh <kpsingh@kernel.org> | |
| 3853 | +R: Florent Revest <revest@chromium.org> | |
| 3854 | +R: Brendan Jackman <jackmanb@chromium.org> | |
| 3855 | +L: bpf@vger.kernel.org | |
| 3856 | +S: Maintained | |
| 3857 | +F: Documentation/bpf/prog_lsm.rst | |
| 3858 | +F: include/linux/bpf_lsm.h | |
| 3859 | +F: kernel/bpf/bpf_lsm.c | |
| 3860 | +F: security/bpf/ | |
| 3879 | 3861 | |
| 3880 | 3862 | BPF [SELFTESTS] (Test Runners & Infrastructure) |
| 3881 | 3863 | M: Andrii Nakryiko <andrii@kernel.org> |
| @@ -3884,17 +3866,28 @@ L: bpf@vger.kernel.org · 2 unmodified lines | ||
| 3884 | 3866 | S: Maintained |
| 3885 | 3867 | F: tools/testing/selftests/bpf/ |
| 3886 | 3868 | |
| 3887 | −BPF [DOCUMENTATION] (Related to Standardization) | |
| 3888 | −R: David Vernet <void@manifault.com> | |
| 3869 | +BPF [STORAGE & CGROUPS] | |
| 3870 | +M: Martin KaFai Lau <martin.lau@linux.dev> | |
| 3889 | 3871 | L: bpf@vger.kernel.org |
| 3890 | −L: bpf@ietf.org | |
| 3891 | 3872 | S: Maintained |
| 3892 | −F: Documentation/bpf/instruction-set.rst | |
| 3873 | +F: kernel/bpf/*storage.c | |
| 3874 | +F: kernel/bpf/bpf_lru* | |
| 3875 | +F: kernel/bpf/cgroup.c | |
| 3893 | 3876 | |
| 3894 | −BPF [MISC] | |
| 3877 | +BPF [TOOLING] (bpftool) | |
| 3878 | +M: Quentin Monnet <quentin@isovalent.com> | |
| 3895 | 3879 | L: bpf@vger.kernel.org |
| 3896 | −S: Odd Fixes | |
| 3897 | −K: (?:\b|_)bpf(?:\b|_) | |
| 3880 | +S: Maintained | |
| 3881 | +F: kernel/bpf/disasm.* | |
| 3882 | +F: tools/bpf/bpftool/ | |
| 3883 | + | |
| 3884 | +BPF [TRACING] | |
| 3885 | +M: Song Liu <song@kernel.org> | |
| 3886 | +R: Jiri Olsa <jolsa@kernel.org> | |
| 3887 | +L: bpf@vger.kernel.org | |
| 3888 | +S: Maintained | |
| 3889 | +F: kernel/bpf/stackmap.c | |
| 3890 | +F: kernel/trace/bpf_trace.c | |
| 3898 | 3891 | |
| 3899 | 3892 | BROADCOM B44 10/100 ETHERNET DRIVER |
| 3900 | 3893 | M: Michael Chan <michael.chan@broadcom.com> |
| @@ -3913,34 +3906,6 @@ F: drivers/net/dsa/bcm_sf2* · 12 unmodified lines | ||
| 3913 | 3906 | F: include/linux/dsa/brcm.h |
| 3914 | 3907 | F: include/linux/platform_data/b53.h |
| 3915 | 3908 | |
| 3916 | −BROADCOM BCMBCA ARM ARCHITECTURE | |
| 3917 | −M: William Zhang <william.zhang@broadcom.com> | |
| 3918 | −M: Anand Gore <anand.gore@broadcom.com> | |
| 3919 | −M: Kursad Oney <kursad.oney@broadcom.com> | |
| 3920 | −M: Florian Fainelli <f.fainelli@gmail.com> | |
| 3921 | −M: Rafał Miłecki <rafal@milecki.pl> | |
| 3922 | −R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> | |
| 3923 | −L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 3924 | −S: Maintained | |
| 3925 | −T: git https://github.com/broadcom/stblinux.git | |
| 3926 | −F: Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | |
| 3927 | −F: arch/arm64/boot/dts/broadcom/bcmbca/* | |
| 3928 | −N: bcmbca | |
| 3929 | −N: bcm[9]?47622 | |
| 3930 | −N: bcm[9]?4912 | |
| 3931 | −N: bcm[9]?63138 | |
| 3932 | −N: bcm[9]?63146 | |
| 3933 | −N: bcm[9]?63148 | |
| 3934 | −N: bcm[9]?63158 | |
| 3935 | −N: bcm[9]?63178 | |
| 3936 | −N: bcm[9]?6756 | |
| 3937 | −N: bcm[9]?6813 | |
| 3938 | −N: bcm[9]?6846 | |
| 3939 | −N: bcm[9]?6855 | |
| 3940 | −N: bcm[9]?6856 | |
| 3941 | −N: bcm[9]?6858 | |
| 3942 | −N: bcm[9]?6878 | |
| 3943 | − | |
| 3944 | 3909 | BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE |
| 3945 | 3910 | M: Florian Fainelli <f.fainelli@gmail.com> |
| 3946 | 3911 | R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> |
| @@ -4038,11 +4003,39 @@ N: brcmstb · 91 unmodified lines | ||
| 4038 | 4003 | N: bcm7038 |
| 4039 | 4004 | N: bcm7120 |
| 4040 | 4005 | |
| 4006 | +BROADCOM BCMBCA ARM ARCHITECTURE | |
| 4007 | +M: William Zhang <william.zhang@broadcom.com> | |
| 4008 | +M: Anand Gore <anand.gore@broadcom.com> | |
| 4009 | +M: Kursad Oney <kursad.oney@broadcom.com> | |
| 4010 | +M: Florian Fainelli <f.fainelli@gmail.com> | |
| 4011 | +M: Rafał Miłecki <rafal@milecki.pl> | |
| 4012 | +R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> | |
| 4013 | +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 4014 | +S: Maintained | |
| 4015 | +T: git https://github.com/broadcom/stblinux.git | |
| 4016 | +F: Documentation/devicetree/bindings/arm/bcm/brcm,bcmbca.yaml | |
| 4017 | +F: arch/arm64/boot/dts/broadcom/bcmbca/* | |
| 4018 | +N: bcmbca | |
| 4019 | +N: bcm[9]?47622 | |
| 4020 | +N: bcm[9]?4912 | |
| 4021 | +N: bcm[9]?63138 | |
| 4022 | +N: bcm[9]?63146 | |
| 4023 | +N: bcm[9]?63148 | |
| 4024 | +N: bcm[9]?63158 | |
| 4025 | +N: bcm[9]?63178 | |
| 4026 | +N: bcm[9]?6756 | |
| 4027 | +N: bcm[9]?6813 | |
| 4028 | +N: bcm[9]?6846 | |
| 4029 | +N: bcm[9]?6855 | |
| 4030 | +N: bcm[9]?6856 | |
| 4031 | +N: bcm[9]?6858 | |
| 4032 | +N: bcm[9]?6878 | |
| 4033 | + | |
| 4041 | 4034 | BROADCOM BDC DRIVER |
| 4042 | 4035 | M: Justin Chen <justinpopo6@gmail.com> |
| 4043 | 4036 | M: Al Cooper <alcooperx@gmail.com> |
| 4044 | −L: linux-usb@vger.kernel.org | |
| 4045 | 4037 | R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> |
| 4038 | +L: linux-usb@vger.kernel.org | |
| 4046 | 4039 | S: Maintained |
| 4047 | 4040 | F: Documentation/devicetree/bindings/usb/brcm,bdc.yaml |
| 4048 | 4041 | F: drivers/usb/gadget/udc/bdc/ |
| @@ -4064,10 +4057,10 @@ F: arch/mips/bmips/* · 15 unmodified lines | ||
| 4064 | 4057 | F: arch/mips/boot/dts/brcm/bcm*.dts* |
| 4065 | 4058 | F: arch/mips/include/asm/mach-bmips/* |
| 4066 | 4059 | F: arch/mips/kernel/*bmips* |
| 4067 | −F: drivers/soc/bcm/bcm63xx | |
| 4068 | 4060 | F: drivers/irqchip/irq-bcm63* |
| 4069 | 4061 | F: drivers/irqchip/irq-bcm7* |
| 4070 | 4062 | F: drivers/irqchip/irq-brcmstb* |
| 4063 | +F: drivers/soc/bcm/bcm63xx | |
| 4071 | 4064 | F: include/linux/bcm963xx_nvram.h |
| 4072 | 4065 | F: include/linux/bcm963xx_tag.h |
| 4073 | 4066 | |
| @@ -4349,9 +4342,9 @@ M: Florian Fainelli <f.fainelli@gmail.com> · 275 unmodified lines | ||
| 4349 | 4342 | R: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com> |
| 4350 | 4343 | L: netdev@vger.kernel.org |
| 4351 | 4344 | S: Supported |
| 4345 | +F: Documentation/devicetree/bindings/net/brcm,systemport.yaml | |
| 4352 | 4346 | F: drivers/net/ethernet/broadcom/bcmsysport.* |
| 4353 | 4347 | F: drivers/net/ethernet/broadcom/unimac.h |
| 4354 | −F: Documentation/devicetree/bindings/net/brcm,systemport.yaml | |
| 4355 | 4348 | |
| 4356 | 4349 | BROADCOM TG3 GIGABIT ETHERNET DRIVER |
| 4357 | 4350 | M: Siva Reddy Kallam <siva.kallam@broadcom.com> |
| @@ -4483,29 +4476,6 @@ W: https://github.com/Cascoda/ca8210-linux.git · 125 unmodified lines | ||
| 4483 | 4476 | F: Documentation/devicetree/bindings/net/ieee802154/ca8210.txt |
| 4484 | 4477 | F: drivers/net/ieee802154/ca8210.c |
| 4485 | 4478 | |
| 4486 | −CANAAN/KENDRYTE K210 SOC FPIOA DRIVER | |
| 4487 | −M: Damien Le Moal <dlemoal@kernel.org> | |
| 4488 | −L: linux-riscv@lists.infradead.org | |
| 4489 | −L: linux-gpio@vger.kernel.org (pinctrl driver) | |
| 4490 | −F: Documentation/devicetree/bindings/pinctrl/canaan,k210-fpioa.yaml | |
| 4491 | −F: drivers/pinctrl/pinctrl-k210.c | |
| 4492 | − | |
| 4493 | −CANAAN/KENDRYTE K210 SOC RESET CONTROLLER DRIVER | |
| 4494 | −M: Damien Le Moal <dlemoal@kernel.org> | |
| 4495 | −L: linux-kernel@vger.kernel.org | |
| 4496 | −L: linux-riscv@lists.infradead.org | |
| 4497 | −S: Maintained | |
| 4498 | −F: Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml | |
| 4499 | −F: drivers/reset/reset-k210.c | |
| 4500 | − | |
| 4501 | −CANAAN/KENDRYTE K210 SOC SYSTEM CONTROLLER DRIVER | |
| 4502 | −M: Damien Le Moal <dlemoal@kernel.org> | |
| 4503 | −L: linux-riscv@lists.infradead.org | |
| 4504 | −S: Maintained | |
| 4505 | −F: Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml | |
| 4506 | −F: drivers/soc/canaan/ | |
| 4507 | −F: include/soc/canaan/ | |
| 4508 | − | |
| 4509 | 4479 | CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS |
| 4510 | 4480 | M: David Howells <dhowells@redhat.com> |
| 4511 | 4481 | L: linux-cachefs@redhat.com (moderated for non-subscribers) |
| @@ -4627,6 +4597,29 @@ F: Documentation/networking/j1939.rst · 115 unmodified lines | ||
| 4627 | 4597 | F: include/uapi/linux/can/j1939.h |
| 4628 | 4598 | F: net/can/j1939/ |
| 4629 | 4599 | |
| 4600 | +CANAAN/KENDRYTE K210 SOC FPIOA DRIVER | |
| 4601 | +M: Damien Le Moal <dlemoal@kernel.org> | |
| 4602 | +L: linux-riscv@lists.infradead.org | |
| 4603 | +L: linux-gpio@vger.kernel.org (pinctrl driver) | |
| 4604 | +F: Documentation/devicetree/bindings/pinctrl/canaan,k210-fpioa.yaml | |
| 4605 | +F: drivers/pinctrl/pinctrl-k210.c | |
| 4606 | + | |
| 4607 | +CANAAN/KENDRYTE K210 SOC RESET CONTROLLER DRIVER | |
| 4608 | +M: Damien Le Moal <dlemoal@kernel.org> | |
| 4609 | +L: linux-kernel@vger.kernel.org | |
| 4610 | +L: linux-riscv@lists.infradead.org | |
| 4611 | +S: Maintained | |
| 4612 | +F: Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml | |
| 4613 | +F: drivers/reset/reset-k210.c | |
| 4614 | + | |
| 4615 | +CANAAN/KENDRYTE K210 SOC SYSTEM CONTROLLER DRIVER | |
| 4616 | +M: Damien Le Moal <dlemoal@kernel.org> | |
| 4617 | +L: linux-riscv@lists.infradead.org | |
| 4618 | +S: Maintained | |
| 4619 | +F: Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml | |
| 4620 | +F: drivers/soc/canaan/ | |
| 4621 | +F: include/soc/canaan/ | |
| 4622 | + | |
| 4630 | 4623 | CAPABILITIES |
| 4631 | 4624 | M: Serge Hallyn <serge@hallyn.com> |
| 4632 | 4625 | L: linux-security-module@vger.kernel.org |
| @@ -4686,8 +4679,8 @@ F: arch/arm64/boot/dts/cavium/thunder2-99xx* · 53 unmodified lines | ||
| 4686 | 4679 | |
| 4687 | 4680 | CBS/ETF/TAPRIO QDISCS |
| 4688 | 4681 | M: Vinicius Costa Gomes <vinicius.gomes@intel.com> |
| 4689 | −S: Maintained | |
| 4690 | 4682 | L: netdev@vger.kernel.org |
| 4683 | +S: Maintained | |
| 4691 | 4684 | F: net/sched/sch_cbs.c |
| 4692 | 4685 | F: net/sched/sch_etf.c |
| 4693 | 4686 | F: net/sched/sch_taprio.c |
| @@ -4710,10 +4703,10 @@ CCTRNG ARM TRUSTZONE CRYPTOCELL TRUE RANDOM NUMBER GENERATOR (TRNG) DRIVER · 16 unmodified lines | ||
| 4710 | 4703 | M: Hadar Gat <hadar.gat@arm.com> |
| 4711 | 4704 | L: linux-crypto@vger.kernel.org |
| 4712 | 4705 | S: Supported |
| 4706 | +W: https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family | |
| 4707 | +F: Documentation/devicetree/bindings/rng/arm-cctrng.yaml | |
| 4713 | 4708 | F: drivers/char/hw_random/cctrng.c |
| 4714 | 4709 | F: drivers/char/hw_random/cctrng.h |
| 4715 | −F: Documentation/devicetree/bindings/rng/arm-cctrng.yaml | |
| 4716 | −W: https://developer.arm.com/products/system-ip/trustzone-cryptocell/cryptocell-700-family | |
| 4717 | 4710 | |
| 4718 | 4711 | CEC FRAMEWORK |
| 4719 | 4712 | M: Hans Verkuil <hverkuil-cisco@xs4all.nl> |
| @@ -4873,13 +4866,6 @@ S: Maintained · 153 unmodified lines | ||
| 4873 | 4866 | F: Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml |
| 4874 | 4867 | F: sound/soc/codecs/cros_ec_codec.* |
| 4875 | 4868 | |
| 4876 | −CHROMEOS EC UART DRIVER | |
| 4877 | −M: Bhanu Prakash Maiya <bhanumaiya@chromium.org> | |
| 4878 | −R: Benson Leung <bleung@chromium.org> | |
| 4879 | −R: Tzung-Bi Shih <tzungbi@kernel.org> | |
| 4880 | −S: Maintained | |
| 4881 | −F: drivers/platform/chrome/cros_ec_uart.c | |
| 4882 | − | |
| 4883 | 4869 | CHROMEOS EC SUBDRIVERS |
| 4884 | 4870 | M: Benson Leung <bleung@chromium.org> |
| 4885 | 4871 | R: Guenter Roeck <groeck@chromium.org> |
| @@ -4889,13 +4875,12 @@ F: drivers/power/supply/cros_usbpd-charger.c · 3 unmodified lines | ||
| 4889 | 4875 | N: cros_ec |
| 4890 | 4876 | N: cros-ec |
| 4891 | 4877 | |
| 4892 | −CHROMEOS EC USB TYPE-C DRIVER | |
| 4893 | −M: Prashant Malani <pmalani@chromium.org> | |
| 4894 | −L: chrome-platform@lists.linux.dev | |
| 4878 | +CHROMEOS EC UART DRIVER | |
| 4879 | +M: Bhanu Prakash Maiya <bhanumaiya@chromium.org> | |
| 4880 | +R: Benson Leung <bleung@chromium.org> | |
| 4881 | +R: Tzung-Bi Shih <tzungbi@kernel.org> | |
| 4895 | 4882 | S: Maintained |
| 4896 | −F: drivers/platform/chrome/cros_ec_typec.* | |
| 4897 | −F: drivers/platform/chrome/cros_typec_switch.c | |
| 4898 | −F: drivers/platform/chrome/cros_typec_vdm.* | |
| 4883 | +F: drivers/platform/chrome/cros_ec_uart.c | |
| 4899 | 4884 | |
| 4900 | 4885 | CHROMEOS EC USB PD NOTIFY DRIVER |
| 4901 | 4886 | M: Prashant Malani <pmalani@chromium.org> |
| @@ -4904,6 +4889,14 @@ S: Maintained · 2 unmodified lines | ||
| 4904 | 4889 | F: drivers/platform/chrome/cros_usbpd_notify.c |
| 4905 | 4890 | F: include/linux/platform_data/cros_usbpd_notify.h |
| 4906 | 4891 | |
| 4892 | +CHROMEOS EC USB TYPE-C DRIVER | |
| 4893 | +M: Prashant Malani <pmalani@chromium.org> | |
| 4894 | +L: chrome-platform@lists.linux.dev | |
| 4895 | +S: Maintained | |
| 4896 | +F: drivers/platform/chrome/cros_ec_typec.* | |
| 4897 | +F: drivers/platform/chrome/cros_typec_switch.c | |
| 4898 | +F: drivers/platform/chrome/cros_typec_vdm.* | |
| 4899 | + | |
| 4907 | 4900 | CHROMEOS HPS DRIVER |
| 4908 | 4901 | M: Dan Callaghan <dcallagh@chromium.org> |
| 4909 | 4902 | R: Sami Kyöstilä <skyostil@chromium.org> |
| @@ -5021,6 +5014,18 @@ M: Nelson Escobar <neescoba@cisco.com> · 111 unmodified lines | ||
| 5021 | 5014 | S: Supported |
| 5022 | 5015 | F: drivers/infiniband/hw/usnic/ |
| 5023 | 5016 | |
| 5017 | +CLANG CONTROL FLOW INTEGRITY SUPPORT | |
| 5018 | +M: Sami Tolvanen <samitolvanen@google.com> | |
| 5019 | +M: Kees Cook <keescook@chromium.org> | |
| 5020 | +R: Nathan Chancellor <nathan@kernel.org> | |
| 5021 | +R: Nick Desaulniers <ndesaulniers@google.com> | |
| 5022 | +L: llvm@lists.linux.dev | |
| 5023 | +S: Supported | |
| 5024 | +B: https://github.com/ClangBuiltLinux/linux/issues | |
| 5025 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening | |
| 5026 | +F: include/linux/cfi.h | |
| 5027 | +F: kernel/cfi.c | |
| 5028 | + | |
| 5024 | 5029 | CLANG-FORMAT FILE |
| 5025 | 5030 | M: Miguel Ojeda <ojeda@kernel.org> |
| 5026 | 5031 | S: Maintained |
| @@ -5041,18 +5046,6 @@ F: scripts/Makefile.clang · 14 unmodified lines | ||
| 5041 | 5046 | F: scripts/clang-tools/ |
| 5042 | 5047 | K: \b(?i:clang|llvm)\b |
| 5043 | 5048 | |
| 5044 | −CLANG CONTROL FLOW INTEGRITY SUPPORT | |
| 5045 | −M: Sami Tolvanen <samitolvanen@google.com> | |
| 5046 | −M: Kees Cook <keescook@chromium.org> | |
| 5047 | −R: Nathan Chancellor <nathan@kernel.org> | |
| 5048 | −R: Nick Desaulniers <ndesaulniers@google.com> | |
| 5049 | −L: llvm@lists.linux.dev | |
| 5050 | −S: Supported | |
| 5051 | −B: https://github.com/ClangBuiltLinux/linux/issues | |
| 5052 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening | |
| 5053 | −F: include/linux/cfi.h | |
| 5054 | −F: kernel/cfi.c | |
| 5055 | − | |
| 5056 | 5049 | CLK API |
| 5057 | 5050 | M: Russell King <linux@armlinux.org.uk> |
| 5058 | 5051 | L: linux-clk@vger.kernel.org |
| @@ -5223,8 +5216,8 @@ CONTEXT TRACKING · 164 unmodified lines | ||
| 5223 | 5216 | M: Frederic Weisbecker <frederic@kernel.org> |
| 5224 | 5217 | M: "Paul E. McKenney" <paulmck@kernel.org> |
| 5225 | 5218 | S: Maintained |
| 5226 | −F: kernel/context_tracking.c | |
| 5227 | 5219 | F: include/linux/context_tracking* |
| 5220 | +F: kernel/context_tracking.c | |
| 5228 | 5221 | |
| 5229 | 5222 | CONTROL GROUP (CGROUP) |
| 5230 | 5223 | M: Tejun Heo <tj@kernel.org> |
| @@ -5385,8 +5378,8 @@ F: drivers/cpuidle/cpuidle-big_little.c · 154 unmodified lines | ||
| 5385 | 5378 | |
| 5386 | 5379 | CPUIDLE DRIVER - ARM EXYNOS |
| 5387 | 5380 | M: Daniel Lezcano <daniel.lezcano@linaro.org> |
| 5388 | −R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | |
| 5389 | 5381 | M: Kukjin Kim <kgene@kernel.org> |
| 5382 | +R: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | |
| 5390 | 5383 | L: linux-pm@vger.kernel.org |
| 5391 | 5384 | L: linux-samsung-soc@vger.kernel.org |
| 5392 | 5385 | S: Supported |
| @@ -5407,8 +5400,8 @@ M: Ulf Hansson <ulf.hansson@linaro.org> · 14 unmodified lines | ||
| 5407 | 5400 | L: linux-pm@vger.kernel.org |
| 5408 | 5401 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 5409 | 5402 | S: Supported |
| 5410 | −F: drivers/cpuidle/cpuidle-psci.h | |
| 5411 | 5403 | F: drivers/cpuidle/cpuidle-psci-domain.c |
| 5404 | +F: drivers/cpuidle/cpuidle-psci.h | |
| 5412 | 5405 | |
| 5413 | 5406 | CPUIDLE DRIVER - DT IDLE PM DOMAIN |
| 5414 | 5407 | M: Ulf Hansson <ulf.hansson@linaro.org> |
| @@ -5552,19 +5545,19 @@ S: Supported · 137 unmodified lines | ||
| 5552 | 5545 | W: http://www.chelsio.com |
| 5553 | 5546 | F: drivers/crypto/chelsio |
| 5554 | 5547 | |
| 5555 | −CXGB4 INLINE CRYPTO DRIVER | |
| 5556 | −M: Ayush Sawal <ayush.sawal@chelsio.com> | |
| 5548 | +CXGB4 ETHERNET DRIVER (CXGB4) | |
| 5549 | +M: Raju Rangoju <rajur@chelsio.com> | |
| 5557 | 5550 | L: netdev@vger.kernel.org |
| 5558 | 5551 | S: Supported |
| 5559 | 5552 | W: http://www.chelsio.com |
| 5560 | −F: drivers/net/ethernet/chelsio/inline_crypto/ | |
| 5553 | +F: drivers/net/ethernet/chelsio/cxgb4/ | |
| 5561 | 5554 | |
| 5562 | −CXGB4 ETHERNET DRIVER (CXGB4) | |
| 5563 | −M: Raju Rangoju <rajur@chelsio.com> | |
| 5555 | +CXGB4 INLINE CRYPTO DRIVER | |
| 5556 | +M: Ayush Sawal <ayush.sawal@chelsio.com> | |
| 5564 | 5557 | L: netdev@vger.kernel.org |
| 5565 | 5558 | S: Supported |
| 5566 | 5559 | W: http://www.chelsio.com |
| 5567 | −F: drivers/net/ethernet/chelsio/cxgb4/ | |
| 5560 | +F: drivers/net/ethernet/chelsio/inline_crypto/ | |
| 5568 | 5561 | |
| 5569 | 5562 | CXGB4 ISCSI DRIVER (CXGB4I) |
| 5570 | 5563 | M: Varun Prakash <varun@chelsio.com> |
| @@ -5621,16 +5614,6 @@ CYCLADES PC300 DRIVER · 50 unmodified lines | ||
| 5621 | 5614 | S: Orphan |
| 5622 | 5615 | F: drivers/net/wan/pc300* |
| 5623 | 5616 | |
| 5624 | −CYPRESS_FIRMWARE MEDIA DRIVER | |
| 5625 | −M: Antti Palosaari <crope@iki.fi> | |
| 5626 | −L: linux-media@vger.kernel.org | |
| 5627 | −S: Maintained | |
| 5628 | −W: https://linuxtv.org | |
| 5629 | −W: http://palosaari.fi/linux/ | |
| 5630 | −Q: http://patchwork.linuxtv.org/project/linux-media/list/ | |
| 5631 | −T: git git://linuxtv.org/anttip/media_tree.git | |
| 5632 | −F: drivers/media/common/cypress_firmware* | |
| 5633 | − | |
| 5634 | 5617 | CYPRESS CY8C95X0 PINCTRL DRIVER |
| 5635 | 5618 | M: Patrick Rudolph <patrick.rudolph@9elements.com> |
| 5636 | 5619 | L: linux-gpio@vger.kernel.org |
| @@ -5650,6 +5633,16 @@ S: Maintained · 13 unmodified lines | ||
| 5650 | 5633 | F: Documentation/devicetree/bindings/input/cypress-sf.yaml |
| 5651 | 5634 | F: drivers/input/keyboard/cypress-sf.c |
| 5652 | 5635 | |
| 5636 | +CYPRESS_FIRMWARE MEDIA DRIVER | |
| 5637 | +M: Antti Palosaari <crope@iki.fi> | |
| 5638 | +L: linux-media@vger.kernel.org | |
| 5639 | +S: Maintained | |
| 5640 | +W: https://linuxtv.org | |
| 5641 | +W: http://palosaari.fi/linux/ | |
| 5642 | +Q: http://patchwork.linuxtv.org/project/linux-media/list/ | |
| 5643 | +T: git git://linuxtv.org/anttip/media_tree.git | |
| 5644 | +F: drivers/media/common/cypress_firmware* | |
| 5645 | + | |
| 5653 | 5646 | CYTTSP TOUCHSCREEN DRIVER |
| 5654 | 5647 | M: Linus Walleij <linus.walleij@linaro.org> |
| 5655 | 5648 | L: linux-input@vger.kernel.org |
| @@ -5816,11 +5809,6 @@ S: Maintained · 160 unmodified lines | ||
| 5816 | 5809 | F: Documentation/driver-api/dcdbas.rst |
| 5817 | 5810 | F: drivers/platform/x86/dell/dcdbas.* |
| 5818 | 5811 | |
| 5819 | −DELL WMI DESCRIPTOR DRIVER | |
| 5820 | −L: Dell.Client.Kernel@dell.com | |
| 5821 | −S: Maintained | |
| 5822 | −F: drivers/platform/x86/dell/dell-wmi-descriptor.c | |
| 5823 | − | |
| 5824 | 5812 | DELL WMI DDV DRIVER |
| 5825 | 5813 | M: Armin Wolf <W_Armin@gmx.de> |
| 5826 | 5814 | S: Maintained |
| @@ -5828,13 +5816,17 @@ F: Documentation/ABI/testing/debugfs-dell-wmi-ddv · 1 unmodified line | ||
| 5828 | 5816 | F: Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv |
| 5829 | 5817 | F: drivers/platform/x86/dell/dell-wmi-ddv.c |
| 5830 | 5818 | |
| 5831 | −DELL WMI SYSMAN DRIVER | |
| 5832 | −M: Prasanth Ksr <prasanth.ksr@dell.com> | |
| 5819 | +DELL WMI DESCRIPTOR DRIVER | |
| 5820 | +L: Dell.Client.Kernel@dell.com | |
| 5821 | +S: Maintained | |
| 5822 | +F: drivers/platform/x86/dell/dell-wmi-descriptor.c | |
| 5823 | + | |
| 5824 | +DELL WMI HARDWARE PRIVACY SUPPORT | |
| 5825 | +M: Perry Yuan <Perry.Yuan@dell.com> | |
| 5833 | 5826 | L: Dell.Client.Kernel@dell.com |
| 5834 | 5827 | L: platform-driver-x86@vger.kernel.org |
| 5835 | 5828 | S: Maintained |
| 5836 | −F: Documentation/ABI/testing/sysfs-class-firmware-attributes | |
| 5837 | −F: drivers/platform/x86/dell/dell-wmi-sysman/ | |
| 5829 | +F: drivers/platform/x86/dell/dell-wmi-privacy.c | |
| 5838 | 5830 | |
| 5839 | 5831 | DELL WMI NOTIFICATIONS DRIVER |
| 5840 | 5832 | M: Matthew Garrett <mjg59@srcf.ucam.org> |
| @@ -5842,20 +5834,13 @@ M: Pali Rohár <pali@kernel.org> · 1 unmodified line | ||
| 5842 | 5834 | S: Maintained |
| 5843 | 5835 | F: drivers/platform/x86/dell/dell-wmi-base.c |
| 5844 | 5836 | |
| 5845 | −DELL WMI HARDWARE PRIVACY SUPPORT | |
| 5846 | −M: Perry Yuan <Perry.Yuan@dell.com> | |
| 5837 | +DELL WMI SYSMAN DRIVER | |
| 5838 | +M: Prasanth Ksr <prasanth.ksr@dell.com> | |
| 5847 | 5839 | L: Dell.Client.Kernel@dell.com |
| 5848 | 5840 | L: platform-driver-x86@vger.kernel.org |
| 5849 | 5841 | S: Maintained |
| 5850 | −F: drivers/platform/x86/dell/dell-wmi-privacy.c | |
| 5851 | − | |
| 5852 | −DELTA ST MEDIA DRIVER | |
| 5853 | −M: Hugues Fruchet <hugues.fruchet@foss.st.com> | |
| 5854 | −L: linux-media@vger.kernel.org | |
| 5855 | −S: Supported | |
| 5856 | −W: https://linuxtv.org | |
| 5857 | −T: git git://linuxtv.org/media_tree.git | |
| 5858 | −F: drivers/media/platform/st/sti/delta | |
| 5842 | +F: Documentation/ABI/testing/sysfs-class-firmware-attributes | |
| 5843 | +F: drivers/platform/x86/dell/dell-wmi-sysman/ | |
| 5859 | 5844 | |
| 5860 | 5845 | DELTA AHE-50DC FAN CONTROL MODULE DRIVER |
| 5861 | 5846 | M: Zev Weiss <zev@bewilderbeest.net> |
| @@ -5879,6 +5864,14 @@ F: Documentation/devicetree/bindings/reset/delta,tn48m-reset.yaml · 17 unmodified lines | ||
| 5879 | 5864 | F: drivers/gpio/gpio-tn48m.c |
| 5880 | 5865 | F: include/dt-bindings/reset/delta,tn48m-reset.h |
| 5881 | 5866 | |
| 5867 | +DELTA ST MEDIA DRIVER | |
| 5868 | +M: Hugues Fruchet <hugues.fruchet@foss.st.com> | |
| 5869 | +L: linux-media@vger.kernel.org | |
| 5870 | +S: Supported | |
| 5871 | +W: https://linuxtv.org | |
| 5872 | +T: git git://linuxtv.org/media_tree.git | |
| 5873 | +F: drivers/media/platform/st/sti/delta | |
| 5874 | + | |
| 5882 | 5875 | DENALI NAND DRIVER |
| 5883 | 5876 | L: linux-mtd@lists.infradead.org |
| 5884 | 5877 | S: Orphan |
| @@ -5891,13 +5884,6 @@ S: Maintained · 6 unmodified lines | ||
| 5891 | 5884 | F: drivers/dma/dw-edma/ |
| 5892 | 5885 | F: include/linux/dma/edma.h |
| 5893 | 5886 | |
| 5894 | −DESIGNWARE XDATA IP DRIVER | |
| 5895 | −M: Gustavo Pimentel <gustavo.pimentel@synopsys.com> | |
| 5896 | −L: linux-pci@vger.kernel.org | |
| 5897 | −S: Maintained | |
| 5898 | −F: Documentation/misc-devices/dw-xdata-pcie.rst | |
| 5899 | −F: drivers/misc/dw-xdata-pcie.c | |
| 5900 | − | |
| 5901 | 5887 | DESIGNWARE USB2 DRD IP DRIVER |
| 5902 | 5888 | M: Minas Harutyunyan <hminas@synopsys.com> |
| 5903 | 5889 | L: linux-usb@vger.kernel.org |
| @@ -5911,6 +5897,13 @@ L: linux-usb@vger.kernel.org · 7 unmodified lines | ||
| 5911 | 5897 | S: Maintained |
| 5912 | 5898 | F: drivers/usb/dwc3/ |
| 5913 | 5899 | |
| 5900 | +DESIGNWARE XDATA IP DRIVER | |
| 5901 | +M: Gustavo Pimentel <gustavo.pimentel@synopsys.com> | |
| 5902 | +L: linux-pci@vger.kernel.org | |
| 5903 | +S: Maintained | |
| 5904 | +F: Documentation/misc-devices/dw-xdata-pcie.rst | |
| 5905 | +F: drivers/misc/dw-xdata-pcie.c | |
| 5906 | + | |
| 5914 | 5907 | DEVANTECH SRF ULTRASONIC RANGER IIO DRIVER |
| 5915 | 5908 | M: Andreas Klinger <ak@it-klinger.de> |
| 5916 | 5909 | L: linux-iio@vger.kernel.org |
| @@ -6020,8 +6013,8 @@ F: Documentation/devicetree/bindings/input/da90??-onkey.txt · 103 unmodified lines | ||
| 6020 | 6013 | F: Documentation/devicetree/bindings/input/dlg,da72??.txt |
| 6021 | 6014 | F: Documentation/devicetree/bindings/mfd/da90*.txt |
| 6022 | 6015 | F: Documentation/devicetree/bindings/mfd/da90*.yaml |
| 6023 | −F: Documentation/devicetree/bindings/regulator/dlg,da9*.yaml | |
| 6024 | 6016 | F: Documentation/devicetree/bindings/regulator/da92*.txt |
| 6017 | +F: Documentation/devicetree/bindings/regulator/dlg,da9*.yaml | |
| 6025 | 6018 | F: Documentation/devicetree/bindings/regulator/slg51000.txt |
| 6026 | 6019 | F: Documentation/devicetree/bindings/sound/da[79]*.txt |
| 6027 | 6020 | F: Documentation/devicetree/bindings/thermal/da90??-thermal.txt |
| @@ -6140,6 +6133,12 @@ F: include/linux/dma/ · 112 unmodified lines | ||
| 6140 | 6133 | F: include/linux/dmaengine.h |
| 6141 | 6134 | F: include/linux/of_dma.h |
| 6142 | 6135 | |
| 6136 | +DMA MAPPING BENCHMARK | |
| 6137 | +M: Xiang Chen <chenxiang66@hisilicon.com> | |
| 6138 | +L: iommu@lists.linux.dev | |
| 6139 | +F: kernel/dma/map_benchmark.c | |
| 6140 | +F: tools/testing/selftests/dma/ | |
| 6141 | + | |
| 6143 | 6142 | DMA MAPPING HELPERS |
| 6144 | 6143 | M: Christoph Hellwig <hch@lst.de> |
| 6145 | 6144 | M: Marek Szyprowski <m.szyprowski@samsung.com> |
| @@ -6150,17 +6149,11 @@ W: http://git.infradead.org/users/hch/dma-mapping.git · 4 unmodified lines | ||
| 6150 | 6149 | T: git git://git.infradead.org/users/hch/dma-mapping.git |
| 6151 | 6150 | F: include/asm-generic/dma-mapping.h |
| 6152 | 6151 | F: include/linux/dma-direct.h |
| 6153 | −F: include/linux/dma-mapping.h | |
| 6154 | 6152 | F: include/linux/dma-map-ops.h |
| 6153 | +F: include/linux/dma-mapping.h | |
| 6155 | 6154 | F: include/linux/swiotlb.h |
| 6156 | 6155 | F: kernel/dma/ |
| 6157 | 6156 | |
| 6158 | −DMA MAPPING BENCHMARK | |
| 6159 | −M: Xiang Chen <chenxiang66@hisilicon.com> | |
| 6160 | −L: iommu@lists.linux.dev | |
| 6161 | −F: kernel/dma/map_benchmark.c | |
| 6162 | −F: tools/testing/selftests/dma/ | |
| 6163 | − | |
| 6164 | 6157 | DMA-BUF HEAPS FRAMEWORK |
| 6165 | 6158 | M: Sumit Semwal <sumit.semwal@linaro.org> |
| 6166 | 6159 | R: Benjamin Gaignard <benjamin.gaignard@collabora.com> |
| @@ -6350,6 +6343,25 @@ S: Maintained · 183 unmodified lines | ||
| 6350 | 6343 | F: drivers/soc/ti/smartreflex.c |
| 6351 | 6344 | F: include/linux/power/smartreflex.h |
| 6352 | 6345 | |
| 6346 | +DRM ACCEL DRIVERS FOR INTEL VPU | |
| 6347 | +M: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | |
| 6348 | +M: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | |
| 6349 | +L: dri-devel@lists.freedesktop.org | |
| 6350 | +S: Supported | |
| 6351 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6352 | +F: drivers/accel/ivpu/ | |
| 6353 | +F: include/uapi/drm/ivpu_accel.h | |
| 6354 | + | |
| 6355 | +DRM COMPUTE ACCELERATORS DRIVERS AND FRAMEWORK | |
| 6356 | +M: Oded Gabbay <ogabbay@kernel.org> | |
| 6357 | +L: dri-devel@lists.freedesktop.org | |
| 6358 | +S: Maintained | |
| 6359 | +C: irc://irc.oftc.net/dri-devel | |
| 6360 | +T: git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git | |
| 6361 | +F: Documentation/accel/ | |
| 6362 | +F: drivers/accel/ | |
| 6363 | +F: include/drm/drm_accel.h | |
| 6364 | + | |
| 6353 | 6365 | DRM DRIVER FOR ALLWINNER DE2 AND DE3 ENGINE |
| 6354 | 6366 | M: Maxime Ripard <mripard@kernel.org> |
| 6355 | 6367 | M: Chen-Yu Tsai <wens@csie.org> |
| @@ -6432,6 +6444,21 @@ S: Maintained · 76 unmodified lines | ||
| 6432 | 6444 | F: Documentation/devicetree/bindings/display/panel/feiyang,fy07024di26a30d.yaml |
| 6433 | 6445 | F: drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c |
| 6434 | 6446 | |
| 6447 | +DRM DRIVER FOR FIRMWARE FRAMEBUFFERS | |
| 6448 | +M: Thomas Zimmermann <tzimmermann@suse.de> | |
| 6449 | +M: Javier Martinez Canillas <javierm@redhat.com> | |
| 6450 | +L: dri-devel@lists.freedesktop.org | |
| 6451 | +S: Maintained | |
| 6452 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6453 | +F: drivers/gpu/drm/drm_aperture.c | |
| 6454 | +F: drivers/gpu/drm/tiny/ofdrm.c | |
| 6455 | +F: drivers/gpu/drm/tiny/simpledrm.c | |
| 6456 | +F: drivers/video/aperture.c | |
| 6457 | +F: drivers/video/nomodeset.c | |
| 6458 | +F: include/drm/drm_aperture.h | |
| 6459 | +F: include/linux/aperture.h | |
| 6460 | +F: include/video/nomodeset.h | |
| 6461 | + | |
| 6435 | 6462 | DRM DRIVER FOR GENERIC EDP PANELS |
| 6436 | 6463 | R: Douglas Anderson <dianders@chromium.org> |
| 6437 | 6464 | F: Documentation/devicetree/bindings/display/panel/panel-edp.yaml |
| @@ -6466,6 +6493,14 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 28 unmodified lines | ||
| 6466 | 6493 | F: Documentation/devicetree/bindings/display/himax,hx8357d.txt |
| 6467 | 6494 | F: drivers/gpu/drm/tiny/hx8357d.c |
| 6468 | 6495 | |
| 6496 | +DRM DRIVER FOR HYPERV SYNTHETIC VIDEO DEVICE | |
| 6497 | +M: Deepak Rawat <drawat.floss@gmail.com> | |
| 6498 | +L: linux-hyperv@vger.kernel.org | |
| 6499 | +L: dri-devel@lists.freedesktop.org | |
| 6500 | +S: Maintained | |
| 6501 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6502 | +F: drivers/gpu/drm/hyperv | |
| 6503 | + | |
| 6469 | 6504 | DRM DRIVER FOR ILITEK ILI9225 PANELS |
| 6470 | 6505 | M: David Lechner <david@lechnology.com> |
| 6471 | 6506 | S: Maintained |
| @@ -6495,11 +6530,11 @@ F: drivers/gpu/drm/logicvc/ · 23 unmodified lines | ||
| 6495 | 6530 | DRM DRIVER FOR LVDS PANELS |
| 6496 | 6531 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| 6497 | 6532 | L: dri-devel@lists.freedesktop.org |
| 6498 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6499 | 6533 | S: Maintained |
| 6500 | −F: drivers/gpu/drm/panel/panel-lvds.c | |
| 6534 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6501 | 6535 | F: Documentation/devicetree/bindings/display/lvds.yaml |
| 6502 | 6536 | F: Documentation/devicetree/bindings/display/panel/panel-lvds.yaml |
| 6537 | +F: drivers/gpu/drm/panel/panel-lvds.c | |
| 6503 | 6538 | |
| 6504 | 6539 | DRM DRIVER FOR MANTIX MLAF057WE51 PANELS |
| 6505 | 6540 | M: Guido Günther <agx@sigxcpu.org> |
| @@ -6608,13 +6643,6 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 102 unmodified lines | ||
| 6608 | 6643 | F: Documentation/devicetree/bindings/display/repaper.txt |
| 6609 | 6644 | F: drivers/gpu/drm/tiny/repaper.c |
| 6610 | 6645 | |
| 6611 | −DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS | |
| 6612 | −M: Javier Martinez Canillas <javierm@redhat.com> | |
| 6613 | −S: Maintained | |
| 6614 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6615 | −F: Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml | |
| 6616 | −F: drivers/gpu/drm/solomon/ssd130x* | |
| 6617 | − | |
| 6618 | 6646 | DRM DRIVER FOR QEMU'S CIRRUS DEVICE |
| 6619 | 6647 | M: Dave Airlie <airlied@redhat.com> |
| 6620 | 6648 | M: Gerd Hoffmann <kraxel@redhat.com> |
| @@ -6663,28 +6691,11 @@ S: Maintained · 42 unmodified lines | ||
| 6663 | 6691 | F: Documentation/devicetree/bindings/display/panel/samsung,s6d27a1.yaml |
| 6664 | 6692 | F: drivers/gpu/drm/panel/panel-samsung-s6d27a1.c |
| 6665 | 6693 | |
| 6666 | −DRM DRIVER FOR SITRONIX ST7703 PANELS | |
| 6667 | −M: Guido Günther <agx@sigxcpu.org> | |
| 6668 | −R: Purism Kernel Team <kernel@puri.sm> | |
| 6669 | −R: Ondrej Jirman <megous@megous.com> | |
| 6670 | −S: Maintained | |
| 6671 | −F: Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | |
| 6672 | −F: drivers/gpu/drm/panel/panel-sitronix-st7703.c | |
| 6673 | − | |
| 6674 | −DRM DRIVER FOR FIRMWARE FRAMEBUFFERS | |
| 6675 | −M: Thomas Zimmermann <tzimmermann@suse.de> | |
| 6676 | −M: Javier Martinez Canillas <javierm@redhat.com> | |
| 6677 | −L: dri-devel@lists.freedesktop.org | |
| 6694 | +DRM DRIVER FOR SAMSUNG S6D7AA0 PANELS | |
| 6695 | +M: Artur Weber <aweber.kernel@gmail.com> | |
| 6678 | 6696 | S: Maintained |
| 6679 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6680 | −F: drivers/gpu/drm/drm_aperture.c | |
| 6681 | −F: drivers/gpu/drm/tiny/ofdrm.c | |
| 6682 | −F: drivers/gpu/drm/tiny/simpledrm.c | |
| 6683 | −F: drivers/video/aperture.c | |
| 6684 | −F: drivers/video/nomodeset.c | |
| 6685 | −F: include/drm/drm_aperture.h | |
| 6686 | −F: include/linux/aperture.h | |
| 6687 | −F: include/video/nomodeset.h | |
| 6697 | +F: Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml | |
| 6698 | +F: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | |
| 6688 | 6699 | |
| 6689 | 6700 | DRM DRIVER FOR SITRONIX ST7586 PANELS |
| 6690 | 6701 | M: David Lechner <david@lechnology.com> |
| @@ -6699,6 +6710,14 @@ S: Maintained · 8 unmodified lines | ||
| 6699 | 6710 | F: Documentation/devicetree/bindings/display/panel/sitronix,st7701.yaml |
| 6700 | 6711 | F: drivers/gpu/drm/panel/panel-sitronix-st7701.c |
| 6701 | 6712 | |
| 6713 | +DRM DRIVER FOR SITRONIX ST7703 PANELS | |
| 6714 | +M: Guido Günther <agx@sigxcpu.org> | |
| 6715 | +R: Purism Kernel Team <kernel@puri.sm> | |
| 6716 | +R: Ondrej Jirman <megous@megous.com> | |
| 6717 | +S: Maintained | |
| 6718 | +F: Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml | |
| 6719 | +F: drivers/gpu/drm/panel/panel-sitronix-st7703.c | |
| 6720 | + | |
| 6702 | 6721 | DRM DRIVER FOR SITRONIX ST7735R PANELS |
| 6703 | 6722 | M: David Lechner <david@lechnology.com> |
| 6704 | 6723 | S: Maintained |
| @@ -6706,6 +6725,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 1 unmodified line | ||
| 6706 | 6725 | F: Documentation/devicetree/bindings/display/sitronix,st7735r.yaml |
| 6707 | 6726 | F: drivers/gpu/drm/tiny/st7735r.c |
| 6708 | 6727 | |
| 6728 | +DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS | |
| 6729 | +M: Javier Martinez Canillas <javierm@redhat.com> | |
| 6730 | +S: Maintained | |
| 6731 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6732 | +F: Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml | |
| 6733 | +F: drivers/gpu/drm/solomon/ssd130x* | |
| 6734 | + | |
| 6709 | 6735 | DRM DRIVER FOR ST-ERICSSON MCDE |
| 6710 | 6736 | M: Linus Walleij <linus.walleij@linaro.org> |
| 6711 | 6737 | S: Maintained |
| @@ -6743,6 +6769,7 @@ F: drivers/gpu/drm/udl/ · 31 unmodified lines | ||
| 6743 | 6769 | DRM DRIVER FOR VIRTUAL KERNEL MODESETTING (VKMS) |
| 6744 | 6770 | M: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> |
| 6745 | 6771 | M: Melissa Wen <melissa.srw@gmail.com> |
| 6772 | +M: Maíra Canal <mairacanal@riseup.net> | |
| 6746 | 6773 | R: Haneen Mohammed <hamohammed.sa@gmail.com> |
| 6747 | 6774 | R: Daniel Vetter <daniel@ffwll.ch> |
| 6748 | 6775 | L: dri-devel@lists.freedesktop.org |
| @@ -6804,25 +6831,6 @@ F: include/drm/drm* · 55 unmodified lines | ||
| 6804 | 6831 | F: include/linux/vga* |
| 6805 | 6832 | F: include/uapi/drm/drm* |
| 6806 | 6833 | |
| 6807 | −DRM COMPUTE ACCELERATORS DRIVERS AND FRAMEWORK | |
| 6808 | −M: Oded Gabbay <ogabbay@kernel.org> | |
| 6809 | −L: dri-devel@lists.freedesktop.org | |
| 6810 | −S: Maintained | |
| 6811 | −C: irc://irc.oftc.net/dri-devel | |
| 6812 | −T: git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git | |
| 6813 | −F: Documentation/accel/ | |
| 6814 | −F: drivers/accel/ | |
| 6815 | −F: include/drm/drm_accel.h | |
| 6816 | − | |
| 6817 | −DRM ACCEL DRIVERS FOR INTEL VPU | |
| 6818 | −M: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> | |
| 6819 | −M: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | |
| 6820 | −L: dri-devel@lists.freedesktop.org | |
| 6821 | −S: Supported | |
| 6822 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6823 | −F: drivers/accel/ivpu/ | |
| 6824 | −F: include/uapi/drm/ivpu_accel.h | |
| 6825 | − | |
| 6826 | 6834 | DRM DRIVERS FOR ALLWINNER A10 |
| 6827 | 6835 | M: Maxime Ripard <mripard@kernel.org> |
| 6828 | 6836 | M: Chen-Yu Tsai <wens@csie.org> |
| @@ -6864,6 +6872,7 @@ S: Maintained · 35 unmodified lines | ||
| 6864 | 6872 | T: git git://anongit.freedesktop.org/drm/drm-misc |
| 6865 | 6873 | F: Documentation/devicetree/bindings/display/bridge/ |
| 6866 | 6874 | F: drivers/gpu/drm/bridge/ |
| 6875 | +F: drivers/gpu/drm/drm_bridge.c | |
| 6867 | 6876 | F: include/drm/drm_bridge.h |
| 6868 | 6877 | |
| 6869 | 6878 | DRM DRIVERS FOR EXYNOS |
| @@ -6926,14 +6935,6 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 56 unmodified lines | ||
| 6926 | 6935 | F: Documentation/devicetree/bindings/display/hisilicon/ |
| 6927 | 6936 | F: drivers/gpu/drm/hisilicon/ |
| 6928 | 6937 | |
| 6929 | −DRM DRIVER FOR HYPERV SYNTHETIC VIDEO DEVICE | |
| 6930 | −M: Deepak Rawat <drawat.floss@gmail.com> | |
| 6931 | −L: linux-hyperv@vger.kernel.org | |
| 6932 | −L: dri-devel@lists.freedesktop.org | |
| 6933 | −S: Maintained | |
| 6934 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 6935 | −F: drivers/gpu/drm/hyperv | |
| 6936 | − | |
| 6937 | 6938 | DRM DRIVERS FOR LIMA |
| 6938 | 6939 | M: Qiang Yu <yuq825@gmail.com> |
| 6939 | 6940 | L: dri-devel@lists.freedesktop.org |
| @@ -7085,6 +7086,14 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 145 unmodified lines | ||
| 7085 | 7086 | F: Documentation/devicetree/bindings/display/xlnx/ |
| 7086 | 7087 | F: drivers/gpu/drm/xlnx/ |
| 7087 | 7088 | |
| 7089 | +DRM GPU SCHEDULER | |
| 7090 | +M: Luben Tuikov <luben.tuikov@amd.com> | |
| 7091 | +L: dri-devel@lists.freedesktop.org | |
| 7092 | +S: Maintained | |
| 7093 | +T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 7094 | +F: drivers/gpu/drm/scheduler/ | |
| 7095 | +F: include/drm/gpu_scheduler.h | |
| 7096 | + | |
| 7088 | 7097 | DRM PANEL DRIVERS |
| 7089 | 7098 | M: Neil Armstrong <neil.armstrong@linaro.org> |
| 7090 | 7099 | R: Sam Ravnborg <sam@ravnborg.org> |
| @@ -7113,14 +7122,6 @@ T: git git://anongit.freedesktop.org/drm/drm-misc · 22 unmodified lines | ||
| 7113 | 7122 | F: drivers/gpu/drm/ttm/ |
| 7114 | 7123 | F: include/drm/ttm/ |
| 7115 | 7124 | |
| 7116 | −DRM GPU SCHEDULER | |
| 7117 | −M: Luben Tuikov <luben.tuikov@amd.com> | |
| 7118 | −L: dri-devel@lists.freedesktop.org | |
| 7119 | −S: Maintained | |
| 7120 | −T: git git://anongit.freedesktop.org/drm/drm-misc | |
| 7121 | −F: drivers/gpu/drm/scheduler/ | |
| 7122 | −F: include/drm/gpu_scheduler.h | |
| 7123 | − | |
| 7124 | 7125 | DSBR100 USB FM RADIO DRIVER |
| 7125 | 7126 | M: Alexey Klimov <klimov.linux@gmail.com> |
| 7126 | 7127 | L: linux-media@vger.kernel.org |
| @@ -7248,10 +7249,10 @@ F: drivers/media/usb/dvb-usb-v2/usb_urb.c · 121 unmodified lines | ||
| 7248 | 7249 | |
| 7249 | 7250 | DYNAMIC DEBUG |
| 7250 | 7251 | M: Jason Baron <jbaron@akamai.com> |
| 7252 | +M: Jim Cromie <jim.cromie@gmail.com> | |
| 7251 | 7253 | S: Maintained |
| 7252 | 7254 | F: include/linux/dynamic_debug.h |
| 7253 | 7255 | F: lib/dynamic_debug.c |
| 7254 | −M: Jim Cromie <jim.cromie@gmail.com> | |
| 7255 | 7256 | F: lib/test_dynamic_debug.c |
| 7256 | 7257 | |
| 7257 | 7258 | DYNAMIC INTERRUPT MODERATION |
| @@ -7261,6 +7262,15 @@ F: Documentation/networking/net_dim.rst · 3 unmodified lines | ||
| 7261 | 7262 | F: include/linux/dim.h |
| 7262 | 7263 | F: lib/dim/ |
| 7263 | 7264 | |
| 7265 | +DYNAMIC THERMAL POWER MANAGEMENT (DTPM) | |
| 7266 | +M: Daniel Lezcano <daniel.lezcano@kernel.org> | |
| 7267 | +L: linux-pm@vger.kernel.org | |
| 7268 | +S: Supported | |
| 7269 | +B: https://bugzilla.kernel.org | |
| 7270 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm | |
| 7271 | +F: drivers/powercap/dtpm* | |
| 7272 | +F: include/linux/dtpm.h | |
| 7273 | + | |
| 7264 | 7274 | DZ DECSTATION DZ11 SERIAL DRIVER |
| 7265 | 7275 | M: "Maciej W. Rozycki" <macro@orcam.me.uk> |
| 7266 | 7276 | S: Maintained |
| @@ -7599,22 +7609,22 @@ W: http://www.broadcom.com · 332 unmodified lines | ||
| 7599 | 7609 | F: drivers/infiniband/hw/ocrdma/ |
| 7600 | 7610 | F: include/uapi/rdma/ocrdma-abi.h |
| 7601 | 7611 | |
| 7602 | −EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER | |
| 7612 | +EMULEX/BROADCOM EFCT FC/FCOE SCSI TARGET DRIVER | |
| 7603 | 7613 | M: James Smart <james.smart@broadcom.com> |
| 7604 | −M: Dick Kennedy <dick.kennedy@broadcom.com> | |
| 7614 | +M: Ram Vegesna <ram.vegesna@broadcom.com> | |
| 7605 | 7615 | L: linux-scsi@vger.kernel.org |
| 7616 | +L: target-devel@vger.kernel.org | |
| 7606 | 7617 | S: Supported |
| 7607 | 7618 | W: http://www.broadcom.com |
| 7608 | −F: drivers/scsi/lpfc/ | |
| 7619 | +F: drivers/scsi/elx/ | |
| 7609 | 7620 | |
| 7610 | −EMULEX/BROADCOM EFCT FC/FCOE SCSI TARGET DRIVER | |
| 7621 | +EMULEX/BROADCOM LPFC FC/FCOE SCSI DRIVER | |
| 7611 | 7622 | M: James Smart <james.smart@broadcom.com> |
| 7612 | −M: Ram Vegesna <ram.vegesna@broadcom.com> | |
| 7623 | +M: Dick Kennedy <dick.kennedy@broadcom.com> | |
| 7613 | 7624 | L: linux-scsi@vger.kernel.org |
| 7614 | −L: target-devel@vger.kernel.org | |
| 7615 | 7625 | S: Supported |
| 7616 | 7626 | W: http://www.broadcom.com |
| 7617 | −F: drivers/scsi/elx/ | |
| 7627 | +F: drivers/scsi/lpfc/ | |
| 7618 | 7628 | |
| 7619 | 7629 | ENE CB710 FLASH CARD READER DRIVER |
| 7620 | 7630 | M: Michał Mirosław <mirq-linux@rere.qmqm.pl> |
| @@ -7707,8 +7717,8 @@ F: drivers/net/mdio/of_mdio.c · 86 unmodified lines | ||
| 7707 | 7717 | F: drivers/net/pcs/ |
| 7708 | 7718 | F: drivers/net/phy/ |
| 7709 | 7719 | F: include/dt-bindings/net/qca-ar803x.h |
| 7710 | −F: include/linux/linkmode.h | |
| 7711 | 7720 | F: include/linux/*mdio*.h |
| 7721 | +F: include/linux/linkmode.h | |
| 7712 | 7722 | F: include/linux/mdio/*.h |
| 7713 | 7723 | F: include/linux/mii.h |
| 7714 | 7724 | F: include/linux/of_net.h |
| @@ -7771,8 +7781,8 @@ M: Mimi Zohar <zohar@linux.ibm.com> · 56 unmodified lines | ||
| 7771 | 7781 | L: linux-integrity@vger.kernel.org |
| 7772 | 7782 | S: Supported |
| 7773 | 7783 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git |
| 7774 | −F: security/integrity/evm/ | |
| 7775 | 7784 | F: security/integrity/ |
| 7785 | +F: security/integrity/evm/ | |
| 7776 | 7786 | |
| 7777 | 7787 | EXTENSIBLE FIRMWARE INTERFACE (EFI) |
| 7778 | 7788 | M: Ard Biesheuvel <ardb@kernel.org> |
| @@ -7803,8 +7813,8 @@ EXTRA BOOT CONFIG · 24 unmodified lines | ||
| 7803 | 7813 | M: Masami Hiramatsu <mhiramat@kernel.org> |
| 7804 | 7814 | L: linux-kernel@vger.kernel.org |
| 7805 | 7815 | L: linux-trace-kernel@vger.kernel.org |
| 7806 | −Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 7807 | 7816 | S: Maintained |
| 7817 | +Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 7808 | 7818 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git |
| 7809 | 7819 | F: Documentation/admin-guide/bootconfig.rst |
| 7810 | 7820 | F: fs/proc/bootconfig.c |
| @@ -8091,21 +8101,6 @@ F: Documentation/fpga/ · 280 unmodified lines | ||
| 8091 | 8101 | F: drivers/fpga/ |
| 8092 | 8102 | F: include/linux/fpga/ |
| 8093 | 8103 | |
| 8094 | −INTEL MAX10 BMC SECURE UPDATES | |
| 8095 | −M: Russ Weight <russell.h.weight@intel.com> | |
| 8096 | −L: linux-fpga@vger.kernel.org | |
| 8097 | −S: Maintained | |
| 8098 | −F: Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update | |
| 8099 | −F: drivers/fpga/intel-m10-bmc-sec-update.c | |
| 8100 | − | |
| 8101 | −MICROCHIP POLARFIRE FPGA DRIVERS | |
| 8102 | −M: Conor Dooley <conor.dooley@microchip.com> | |
| 8103 | −R: Ivan Bornyakov <i.bornyakov@metrotek.ru> | |
| 8104 | −L: linux-fpga@vger.kernel.org | |
| 8105 | −S: Supported | |
| 8106 | −F: Documentation/devicetree/bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml | |
| 8107 | −F: drivers/fpga/microchip-spi.c | |
| 8108 | − | |
| 8109 | 8104 | FPU EMULATOR |
| 8110 | 8105 | M: Bill Metzenthen <billm@melbpc.org.au> |
| 8111 | 8106 | S: Maintained |
| @@ -8114,9 +8109,9 @@ F: arch/x86/math-emu/ · 2 unmodified lines | ||
| 8114 | 8109 | |
| 8115 | 8110 | FRAMEBUFFER CORE |
| 8116 | 8111 | M: Daniel Vetter <daniel@ffwll.ch> |
| 8117 | −F: drivers/video/fbdev/core/ | |
| 8118 | 8112 | S: Odd Fixes |
| 8119 | 8113 | T: git git://anongit.freedesktop.org/drm/drm-misc |
| 8114 | +F: drivers/video/fbdev/core/ | |
| 8120 | 8115 | |
| 8121 | 8116 | FRAMEBUFFER LAYER |
| 8122 | 8117 | M: Helge Deller <deller@gmx.de> |
| @@ -8493,15 +8488,15 @@ M: Masami Hiramatsu <mhiramat@kernel.org> · 370 unmodified lines | ||
| 8493 | 8488 | R: Mark Rutland <mark.rutland@arm.com> |
| 8494 | 8489 | L: linux-kernel@vger.kernel.org |
| 8495 | 8490 | L: linux-trace-kernel@vger.kernel.org |
| 8496 | −Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 8497 | 8491 | S: Maintained |
| 8492 | +Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 8498 | 8493 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git |
| 8499 | 8494 | F: Documentation/trace/ftrace* |
| 8500 | −F: kernel/trace/ftrace* | |
| 8501 | −F: kernel/trace/fgraph.c | |
| 8502 | 8495 | F: arch/*/*/*/*ftrace* |
| 8503 | 8496 | F: arch/*/*/*ftrace* |
| 8504 | 8497 | F: include/*/ftrace.h |
| 8498 | +F: kernel/trace/fgraph.c | |
| 8499 | +F: kernel/trace/ftrace* | |
| 8505 | 8500 | F: samples/ftrace |
| 8506 | 8501 | |
| 8507 | 8502 | FUNGIBLE ETHERNET DRIVERS |
| @@ -8542,10 +8537,10 @@ GATEWORKS SYSTEM CONTROLLER (GSC) DRIVER · 34 unmodified lines | ||
| 8542 | 8537 | M: Tim Harvey <tharvey@gateworks.com> |
| 8543 | 8538 | S: Maintained |
| 8544 | 8539 | F: Documentation/devicetree/bindings/mfd/gateworks-gsc.yaml |
| 8545 | −F: drivers/mfd/gateworks-gsc.c | |
| 8546 | −F: include/linux/mfd/gsc.h | |
| 8547 | 8540 | F: Documentation/hwmon/gsc-hwmon.rst |
| 8548 | 8541 | F: drivers/hwmon/gsc-hwmon.c |
| 8542 | +F: drivers/mfd/gateworks-gsc.c | |
| 8543 | +F: include/linux/mfd/gsc.h | |
| 8549 | 8544 | F: include/linux/platform_data/gsc_hwmon.h |
| 8550 | 8545 | |
| 8551 | 8546 | GCC PLUGINS |
| @@ -8673,8 +8668,8 @@ R: Andy Shevchenko <andy@kernel.org> · 121 unmodified lines | ||
| 8673 | 8668 | S: Maintained |
| 8674 | 8669 | F: lib/string.c |
| 8675 | 8670 | F: lib/string_helpers.c |
| 8676 | −F: lib/test_string.c | |
| 8677 | 8671 | F: lib/test-string_helpers.c |
| 8672 | +F: lib/test_string.c | |
| 8678 | 8673 | |
| 8679 | 8674 | GENERIC UIO DRIVER FOR PCI DEVICES |
| 8680 | 8675 | M: "Michael S. Tsirkin" <mst@redhat.com> |
| @@ -9157,12 +9152,11 @@ L: linux-input@vger.kernel.org · 476 unmodified lines | ||
| 9157 | 9152 | S: Maintained |
| 9158 | 9153 | F: drivers/hid/hid-logitech-* |
| 9159 | 9154 | |
| 9160 | −HID++ LOGITECH DRIVERS | |
| 9161 | −R: Filipe Laíns <lains@riseup.net> | |
| 9162 | −R: Bastien Nocera <hadess@hadess.net> | |
| 9155 | +HID PHOENIX RC FLIGHT CONTROLLER | |
| 9156 | +M: Marcus Folkesson <marcus.folkesson@gmail.com> | |
| 9163 | 9157 | L: linux-input@vger.kernel.org |
| 9164 | 9158 | S: Maintained |
| 9165 | −F: drivers/hid/hid-logitech-hidpp.c | |
| 9159 | +F: drivers/hid/hid-pxrc.c | |
| 9166 | 9160 | |
| 9167 | 9161 | HID PLAYSTATION DRIVER |
| 9168 | 9162 | M: Roderick Colenbrander <roderick.colenbrander@sony.com> |
| @@ -9170,12 +9164,6 @@ L: linux-input@vger.kernel.org · 1 unmodified line | ||
| 9170 | 9164 | S: Supported |
| 9171 | 9165 | F: drivers/hid/hid-playstation.c |
| 9172 | 9166 | |
| 9173 | −HID PHOENIX RC FLIGHT CONTROLLER | |
| 9174 | −M: Marcus Folkesson <marcus.folkesson@gmail.com> | |
| 9175 | −L: linux-input@vger.kernel.org | |
| 9176 | −S: Maintained | |
| 9177 | −F: drivers/hid/hid-pxrc.c | |
| 9178 | − | |
| 9179 | 9167 | HID SENSOR HUB DRIVERS |
| 9180 | 9168 | M: Jiri Kosina <jikos@kernel.org> |
| 9181 | 9169 | M: Jonathan Cameron <jic23@kernel.org> |
| @@ -9202,6 +9190,13 @@ S: Maintained · 20 unmodified lines | ||
| 9202 | 9190 | F: drivers/hid/wacom.h |
| 9203 | 9191 | F: drivers/hid/wacom_* |
| 9204 | 9192 | |
| 9193 | +HID++ LOGITECH DRIVERS | |
| 9194 | +R: Filipe Laíns <lains@riseup.net> | |
| 9195 | +R: Bastien Nocera <hadess@hadess.net> | |
| 9196 | +L: linux-input@vger.kernel.org | |
| 9197 | +S: Maintained | |
| 9198 | +F: drivers/hid/hid-logitech-hidpp.c | |
| 9199 | + | |
| 9205 | 9200 | HIGH-RESOLUTION TIMERS, CLOCKEVENTS |
| 9206 | 9201 | M: Thomas Gleixner <tglx@linutronix.de> |
| 9207 | 9202 | L: linux-kernel@vger.kernel.org |
| @@ -9226,6 +9221,12 @@ W: http://www.highpoint-tech.com · 18 unmodified lines | ||
| 9226 | 9221 | F: Documentation/scsi/hptiop.rst |
| 9227 | 9222 | F: drivers/scsi/hptiop.c |
| 9228 | 9223 | |
| 9224 | +HIKEY960 ONBOARD USB GPIO HUB DRIVER | |
| 9225 | +M: John Stultz <jstultz@google.com> | |
| 9226 | +L: linux-kernel@vger.kernel.org | |
| 9227 | +S: Maintained | |
| 9228 | +F: drivers/misc/hisi_hikey_usb.c | |
| 9229 | + | |
| 9229 | 9230 | HIMAX HX83112B TOUCHSCREEN SUPPORT |
| 9230 | 9231 | M: Job Noorman <job@noorman.info> |
| 9231 | 9232 | L: linux-input@vger.kernel.org |
| @@ -9274,6 +9275,12 @@ F: drivers/crypto/hisilicon/hpre/hpre.h · 42 unmodified lines | ||
| 9274 | 9275 | F: drivers/crypto/hisilicon/hpre/hpre_crypto.c |
| 9275 | 9276 | F: drivers/crypto/hisilicon/hpre/hpre_main.c |
| 9276 | 9277 | |
| 9278 | +HISILICON HNS3 PMU DRIVER | |
| 9279 | +M: Guangbin Huang <huangguangbin2@huawei.com> | |
| 9280 | +S: Supported | |
| 9281 | +F: Documentation/admin-guide/perf/hns3-pmu.rst | |
| 9282 | +F: drivers/perf/hisilicon/hns3_pmu.c | |
| 9283 | + | |
| 9277 | 9284 | HISILICON I2C CONTROLLER DRIVER |
| 9278 | 9285 | M: Yicong Yang <yangyicong@hisilicon.com> |
| 9279 | 9286 | L: linux-i2c@vger.kernel.org |
| @@ -9306,12 +9313,6 @@ W: http://www.hisilicon.com · 26 unmodified lines | ||
| 9306 | 9313 | F: Documentation/devicetree/bindings/net/hisilicon*.txt |
| 9307 | 9314 | F: drivers/net/ethernet/hisilicon/ |
| 9308 | 9315 | |
| 9309 | −HIKEY960 ONBOARD USB GPIO HUB DRIVER | |
| 9310 | −M: John Stultz <jstultz@google.com> | |
| 9311 | −L: linux-kernel@vger.kernel.org | |
| 9312 | −S: Maintained | |
| 9313 | −F: drivers/misc/hisi_hikey_usb.c | |
| 9314 | − | |
| 9315 | 9316 | HISILICON PMU DRIVER |
| 9316 | 9317 | M: Shaokun Zhang <zhangshaokun@hisilicon.com> |
| 9317 | 9318 | M: Jonathan Cameron <jonathan.cameron@huawei.com> |
| @@ -9321,12 +9322,6 @@ F: Documentation/admin-guide/perf/hisi-pcie-pmu.rst · 3 unmodified lines | ||
| 9321 | 9322 | F: Documentation/admin-guide/perf/hisi-pmu.rst |
| 9322 | 9323 | F: drivers/perf/hisilicon |
| 9323 | 9324 | |
| 9324 | −HISILICON HNS3 PMU DRIVER | |
| 9325 | −M: Guangbin Huang <huangguangbin2@huawei.com> | |
| 9326 | −S: Supported | |
| 9327 | −F: Documentation/admin-guide/perf/hns3-pmu.rst | |
| 9328 | −F: drivers/perf/hisilicon/hns3_pmu.c | |
| 9329 | − | |
| 9330 | 9325 | HISILICON PTT DRIVER |
| 9331 | 9326 | M: Yicong Yang <yangyicong@hisilicon.com> |
| 9332 | 9327 | M: Jonathan Cameron <jonathan.cameron@huawei.com> |
| @@ -9350,14 +9345,6 @@ F: drivers/crypto/hisilicon/qm.c · 17 unmodified lines | ||
| 9350 | 9345 | F: drivers/crypto/hisilicon/sgl.c |
| 9351 | 9346 | F: include/linux/hisi_acc_qm.h |
| 9352 | 9347 | |
| 9353 | −HISILICON ZIP Controller DRIVER | |
| 9354 | −M: Yang Shen <shenyang39@huawei.com> | |
| 9355 | −M: Zhou Wang <wangzhou1@hisilicon.com> | |
| 9356 | −L: linux-crypto@vger.kernel.org | |
| 9357 | −S: Maintained | |
| 9358 | −F: Documentation/ABI/testing/debugfs-hisi-zip | |
| 9359 | −F: drivers/crypto/hisilicon/zip/ | |
| 9360 | − | |
| 9361 | 9348 | HISILICON ROCE DRIVER |
| 9362 | 9349 | M: Haoyue Xu <xuhaoyue1@hisilicon.com> |
| 9363 | 9350 | M: Wenpeng Liang <liangwenpeng@huawei.com> |
| @@ -9416,6 +9403,14 @@ S: Maintained · 52 unmodified lines | ||
| 9416 | 9403 | W: http://www.hisilicon.com |
| 9417 | 9404 | F: drivers/spi/spi-hisi-sfc-v3xx.c |
| 9418 | 9405 | |
| 9406 | +HISILICON ZIP Controller DRIVER | |
| 9407 | +M: Yang Shen <shenyang39@huawei.com> | |
| 9408 | +M: Zhou Wang <wangzhou1@hisilicon.com> | |
| 9409 | +L: linux-crypto@vger.kernel.org | |
| 9410 | +S: Maintained | |
| 9411 | +F: Documentation/ABI/testing/debugfs-hisi-zip | |
| 9412 | +F: drivers/crypto/hisilicon/zip/ | |
| 9413 | + | |
| 9419 | 9414 | HMM - Heterogeneous Memory Management |
| 9420 | 9415 | M: Jérôme Glisse <jglisse@redhat.com> |
| 9421 | 9416 | L: linux-mm@kvack.org |
| @@ -9492,9 +9487,9 @@ F: drivers/input/touchscreen/htcpen.c · 70 unmodified lines | ||
| 9492 | 9487 | HTE SUBSYSTEM |
| 9493 | 9488 | M: Dipen Patel <dipenp@nvidia.com> |
| 9494 | 9489 | L: timestamp@lists.linux.dev |
| 9495 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux.git | |
| 9496 | −Q: https://patchwork.kernel.org/project/timestamp/list/ | |
| 9497 | 9490 | S: Maintained |
| 9491 | +Q: https://patchwork.kernel.org/project/timestamp/list/ | |
| 9492 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux.git | |
| 9498 | 9493 | F: Documentation/devicetree/bindings/timestamp/ |
| 9499 | 9494 | F: Documentation/driver-api/hte/ |
| 9500 | 9495 | F: drivers/hte/ |
| @@ -9589,8 +9584,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git · 88 unmodified lines | ||
| 9589 | 9584 | F: Documentation/ABI/stable/sysfs-bus-vmbus |
| 9590 | 9585 | F: Documentation/ABI/testing/debugfs-hyperv |
| 9591 | 9586 | F: Documentation/devicetree/bindings/bus/microsoft,vmbus.yaml |
| 9592 | −F: Documentation/virt/hyperv | |
| 9593 | 9587 | F: Documentation/networking/device_drivers/ethernet/microsoft/netvsc.rst |
| 9588 | +F: Documentation/virt/hyperv | |
| 9594 | 9589 | F: arch/arm64/hyperv |
| 9595 | 9590 | F: arch/arm64/include/asm/hyperv-tlfs.h |
| 9596 | 9591 | F: arch/arm64/include/asm/mshyperv.h |
| @@ -9772,6 +9767,12 @@ L: linux-i2c@vger.kernel.org · 175 unmodified lines | ||
| 9772 | 9767 | S: Maintained |
| 9773 | 9768 | F: drivers/i2c/i2c-stub.c |
| 9774 | 9769 | |
| 9770 | +I3C DRIVER FOR ASPEED AST2600 | |
| 9771 | +M: Jeremy Kerr <jk@codeconstruct.com.au> | |
| 9772 | +S: Maintained | |
| 9773 | +F: Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml | |
| 9774 | +F: drivers/i3c/master/ast2600-i3c-master.c | |
| 9775 | + | |
| 9775 | 9776 | I3C DRIVER FOR CADENCE I3C MASTER IP |
| 9776 | 9777 | M: Przemysław Gaj <pgaj@cadence.com> |
| 9777 | 9778 | S: Maintained |
| @@ -9783,12 +9784,6 @@ S: Orphan · 5 unmodified lines | ||
| 9783 | 9784 | F: Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml |
| 9784 | 9785 | F: drivers/i3c/master/dw* |
| 9785 | 9786 | |
| 9786 | −I3C DRIVER FOR ASPEED AST2600 | |
| 9787 | −M: Jeremy Kerr <jk@codeconstruct.com.au> | |
| 9788 | −S: Maintained | |
| 9789 | −F: Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml | |
| 9790 | −F: drivers/i3c/master/ast2600-i3c-master.c | |
| 9791 | − | |
| 9792 | 9787 | I3C SUBSYSTEM |
| 9793 | 9788 | M: Alexandre Belloni <alexandre.belloni@bootlin.com> |
| 9794 | 9789 | L: linux-i3c@lists.infradead.org (moderated for non-subscribers) |
| @@ -9867,6 +9862,11 @@ L: netdev@vger.kernel.org · 72 unmodified lines | ||
| 9867 | 9862 | S: Supported |
| 9868 | 9863 | F: drivers/net/ethernet/ibm/ibmvnic.* |
| 9869 | 9864 | |
| 9865 | +IBM Power VFIO Support | |
| 9866 | +M: Timothy Pearson <tpearson@raptorengineering.com> | |
| 9867 | +S: Supported | |
| 9868 | +F: drivers/vfio/vfio_iommu_spapr_tce.c | |
| 9869 | + | |
| 9870 | 9870 | IBM Power Virtual Ethernet Device Driver |
| 9871 | 9871 | M: Nick Child <nnac123@linux.ibm.com> |
| 9872 | 9872 | L: netdev@vger.kernel.org |
| @@ -9912,11 +9912,6 @@ F: drivers/crypto/vmx/ghash* · 39 unmodified lines | ||
| 9912 | 9912 | F: drivers/crypto/vmx/ppc-xlate.pl |
| 9913 | 9913 | F: drivers/crypto/vmx/vmx.c |
| 9914 | 9914 | |
| 9915 | −IBM Power VFIO Support | |
| 9916 | −M: Timothy Pearson <tpearson@raptorengineering.com> | |
| 9917 | −S: Supported | |
| 9918 | −F: drivers/vfio/vfio_iommu_spapr_tce.c | |
| 9919 | − | |
| 9920 | 9915 | IBM ServeRAID RAID DRIVER |
| 9921 | 9916 | S: Orphan |
| 9922 | 9917 | F: drivers/scsi/ips.* |
| @@ -9984,6 +9979,10 @@ F: include/net/nl802154.h · 61 unmodified lines | ||
| 9984 | 9979 | F: net/ieee802154/ |
| 9985 | 9980 | F: net/mac802154/ |
| 9986 | 9981 | |
| 9982 | +IFCVF VIRTIO DATA PATH ACCELERATOR | |
| 9983 | +R: Zhu Lingshan <lingshan.zhu@intel.com> | |
| 9984 | +F: drivers/vdpa/ifcvf/ | |
| 9985 | + | |
| 9987 | 9986 | IFE PROTOCOL |
| 9988 | 9987 | M: Yotam Gigi <yotam.gi@gmail.com> |
| 9989 | 9988 | M: Jamal Hadi Salim <jhs@mojatatu.com> |
| @@ -10248,8 +10247,8 @@ M: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> · 258 unmodified lines | ||
| 10248 | 10247 | L: linux-integrity@vger.kernel.org |
| 10249 | 10248 | S: Supported |
| 10250 | 10249 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git |
| 10251 | −F: security/integrity/ima/ | |
| 10252 | 10250 | F: security/integrity/ |
| 10251 | +F: security/integrity/ima/ | |
| 10253 | 10252 | |
| 10254 | 10253 | INTEL 810/815 FRAMEBUFFER DRIVER |
| 10255 | 10254 | M: Antonino Daplas <adaplas@gmail.com> |
| @@ -10403,14 +10402,6 @@ S: Supported · 147 unmodified lines | ||
| 10403 | 10402 | Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ |
| 10404 | 10403 | F: drivers/dma/ioat* |
| 10405 | 10404 | |
| 10406 | −INTEL IDXD DRIVER | |
| 10407 | −M: Fenghua Yu <fenghua.yu@intel.com> | |
| 10408 | −M: Dave Jiang <dave.jiang@intel.com> | |
| 10409 | −L: dmaengine@vger.kernel.org | |
| 10410 | −S: Supported | |
| 10411 | −F: drivers/dma/idxd/* | |
| 10412 | −F: include/uapi/linux/idxd.h | |
| 10413 | − | |
| 10414 | 10405 | INTEL IDLE DRIVER |
| 10415 | 10406 | M: Jacob Pan <jacob.jun.pan@linux.intel.com> |
| 10416 | 10407 | M: Len Brown <lenb@kernel.org> |
| @@ -10420,6 +10411,14 @@ B: https://bugzilla.kernel.org · 3 unmodified lines | ||
| 10420 | 10411 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git |
| 10421 | 10412 | F: drivers/idle/intel_idle.c |
| 10422 | 10413 | |
| 10414 | +INTEL IDXD DRIVER | |
| 10415 | +M: Fenghua Yu <fenghua.yu@intel.com> | |
| 10416 | +M: Dave Jiang <dave.jiang@intel.com> | |
| 10417 | +L: dmaengine@vger.kernel.org | |
| 10418 | +S: Supported | |
| 10419 | +F: drivers/dma/idxd/* | |
| 10420 | +F: include/uapi/linux/idxd.h | |
| 10421 | + | |
| 10423 | 10422 | INTEL IN FIELD SCAN (IFS) DEVICE |
| 10424 | 10423 | M: Jithu Joseph <jithu.joseph@intel.com> |
| 10425 | 10424 | R: Ashok Raj <ashok.raj@intel.com> |
| @@ -10466,18 +10465,18 @@ F: Documentation/admin-guide/media/ipu3_rcb.svg · 40 unmodified lines | ||
| 10466 | 10465 | F: Documentation/userspace-api/media/v4l/pixfmt-meta-intel-ipu3.rst |
| 10467 | 10466 | F: drivers/staging/media/ipu3/ |
| 10468 | 10467 | |
| 10469 | −INTEL IXP4XX CRYPTO SUPPORT | |
| 10470 | −M: Corentin Labbe <clabbe@baylibre.com> | |
| 10471 | −L: linux-crypto@vger.kernel.org | |
| 10472 | −S: Maintained | |
| 10473 | −F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | |
| 10474 | − | |
| 10475 | 10468 | INTEL ISHTP ECLITE DRIVER |
| 10476 | 10469 | M: Sumesh K Naduvalath <sumesh.k.naduvalath@intel.com> |
| 10477 | 10470 | L: platform-driver-x86@vger.kernel.org |
| 10478 | 10471 | S: Supported |
| 10479 | 10472 | F: drivers/platform/x86/intel/ishtp_eclite.c |
| 10480 | 10473 | |
| 10474 | +INTEL IXP4XX CRYPTO SUPPORT | |
| 10475 | +M: Corentin Labbe <clabbe@baylibre.com> | |
| 10476 | +L: linux-crypto@vger.kernel.org | |
| 10477 | +S: Maintained | |
| 10478 | +F: drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | |
| 10479 | + | |
| 10481 | 10480 | INTEL IXP4XX QMGR, NPE, ETHERNET and HSS SUPPORT |
| 10482 | 10481 | M: Krzysztof Halasa <khalasa@piap.pl> |
| 10483 | 10482 | S: Maintained |
| @@ -10556,6 +10555,13 @@ F: drivers/hwmon/intel-m10-bmc-hwmon.c · 72 unmodified lines | ||
| 10556 | 10555 | F: drivers/mfd/intel-m10-bmc* |
| 10557 | 10556 | F: include/linux/mfd/intel-m10-bmc.h |
| 10558 | 10557 | |
| 10558 | +INTEL MAX10 BMC SECURE UPDATES | |
| 10559 | +M: Russ Weight <russell.h.weight@intel.com> | |
| 10560 | +L: linux-fpga@vger.kernel.org | |
| 10561 | +S: Maintained | |
| 10562 | +F: Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-sec-update | |
| 10563 | +F: drivers/fpga/intel-m10-bmc-sec-update.c | |
| 10564 | + | |
| 10559 | 10565 | INTEL P-Unit IPC DRIVER |
| 10560 | 10566 | M: Zha Qipeng <qipeng.zha@intel.com> |
| 10561 | 10567 | L: platform-driver-x86@vger.kernel.org |
| @@ -10603,6 +10609,13 @@ L: linux-pm@vger.kernel.org · 41 unmodified lines | ||
| 10603 | 10609 | S: Supported |
| 10604 | 10610 | F: drivers/cpufreq/intel_pstate.c |
| 10605 | 10611 | |
| 10612 | +INTEL PTP DFL ToD DRIVER | |
| 10613 | +M: Tianfei Zhang <tianfei.zhang@intel.com> | |
| 10614 | +L: linux-fpga@vger.kernel.org | |
| 10615 | +L: netdev@vger.kernel.org | |
| 10616 | +S: Maintained | |
| 10617 | +F: drivers/ptp/ptp_dfl_tod.c | |
| 10618 | + | |
| 10606 | 10619 | INTEL QUADRATURE ENCODER PERIPHERAL DRIVER |
| 10607 | 10620 | M: Jarkko Nikula <jarkko.nikula@linux.intel.com> |
| 10608 | 10621 | L: linux-iio@vger.kernel.org |
| @@ -10621,6 +10634,21 @@ F: drivers/platform/x86/intel/sdsi.c · 12 unmodified lines | ||
| 10621 | 10634 | F: tools/arch/x86/intel_sdsi/ |
| 10622 | 10635 | F: tools/testing/selftests/drivers/sdsi/ |
| 10623 | 10636 | |
| 10637 | +INTEL SGX | |
| 10638 | +M: Jarkko Sakkinen <jarkko@kernel.org> | |
| 10639 | +R: Dave Hansen <dave.hansen@linux.intel.com> | |
| 10640 | +L: linux-sgx@vger.kernel.org | |
| 10641 | +S: Supported | |
| 10642 | +Q: https://patchwork.kernel.org/project/intel-sgx/list/ | |
| 10643 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/sgx | |
| 10644 | +F: Documentation/arch/x86/sgx.rst | |
| 10645 | +F: arch/x86/entry/vdso/vsgx.S | |
| 10646 | +F: arch/x86/include/asm/sgx.h | |
| 10647 | +F: arch/x86/include/uapi/asm/sgx.h | |
| 10648 | +F: arch/x86/kernel/cpu/sgx/* | |
| 10649 | +F: tools/testing/selftests/sgx/* | |
| 10650 | +K: \bSGX_ | |
| 10651 | + | |
| 10624 | 10652 | INTEL SKYLAKE INT3472 ACPI DEVICE DRIVER |
| 10625 | 10653 | M: Daniel Scally <djrscally@gmail.com> |
| 10626 | 10654 | S: Maintained |
| @@ -10638,13 +10666,13 @@ INTEL STRATIX10 FIRMWARE DRIVERS · 11 unmodified lines | ||
| 10638 | 10666 | M: Dinh Nguyen <dinguyen@kernel.org> |
| 10639 | 10667 | L: linux-kernel@vger.kernel.org |
| 10640 | 10668 | S: Maintained |
| 10669 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git | |
| 10641 | 10670 | F: Documentation/ABI/testing/sysfs-devices-platform-stratix10-rsu |
| 10642 | 10671 | F: Documentation/devicetree/bindings/firmware/intel,stratix10-svc.txt |
| 10643 | 10672 | F: drivers/firmware/stratix10-rsu.c |
| 10644 | 10673 | F: drivers/firmware/stratix10-svc.c |
| 10645 | 10674 | F: include/linux/firmware/intel/stratix10-smc.h |
| 10646 | 10675 | F: include/linux/firmware/intel/stratix10-svc-client.h |
| 10647 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git | |
| 10648 | 10676 | |
| 10649 | 10677 | INTEL TELEMETRY DRIVER |
| 10650 | 10678 | M: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com> |
| @@ -10729,21 +10757,6 @@ F: Documentation/arch/x86/intel_txt.rst · 78 unmodified lines | ||
| 10729 | 10757 | F: arch/x86/kernel/tboot.c |
| 10730 | 10758 | F: include/linux/tboot.h |
| 10731 | 10759 | |
| 10732 | −INTEL SGX | |
| 10733 | −M: Jarkko Sakkinen <jarkko@kernel.org> | |
| 10734 | −R: Dave Hansen <dave.hansen@linux.intel.com> | |
| 10735 | −L: linux-sgx@vger.kernel.org | |
| 10736 | −S: Supported | |
| 10737 | −Q: https://patchwork.kernel.org/project/intel-sgx/list/ | |
| 10738 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/sgx | |
| 10739 | −F: Documentation/arch/x86/sgx.rst | |
| 10740 | −F: arch/x86/entry/vdso/vsgx.S | |
| 10741 | −F: arch/x86/include/asm/sgx.h | |
| 10742 | −F: arch/x86/include/uapi/asm/sgx.h | |
| 10743 | −F: arch/x86/kernel/cpu/sgx/* | |
| 10744 | −F: tools/testing/selftests/sgx/* | |
| 10745 | −K: \bSGX_ | |
| 10746 | − | |
| 10747 | 10760 | INTERCONNECT API |
| 10748 | 10761 | M: Georgi Djakov <djakov@kernel.org> |
| 10749 | 10762 | L: linux-pm@vger.kernel.org |
| @@ -10812,18 +10825,6 @@ F: drivers/iommu/dma-iommu.h · 62 unmodified lines | ||
| 10812 | 10825 | F: drivers/iommu/iova.c |
| 10813 | 10826 | F: include/linux/iova.h |
| 10814 | 10827 | |
| 10815 | −IOMMUFD | |
| 10816 | −M: Jason Gunthorpe <jgg@nvidia.com> | |
| 10817 | −M: Kevin Tian <kevin.tian@intel.com> | |
| 10818 | −L: iommu@lists.linux.dev | |
| 10819 | −S: Maintained | |
| 10820 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git | |
| 10821 | −F: Documentation/userspace-api/iommufd.rst | |
| 10822 | −F: drivers/iommu/iommufd/ | |
| 10823 | −F: include/linux/iommufd.h | |
| 10824 | −F: include/uapi/linux/iommufd.h | |
| 10825 | −F: tools/testing/selftests/iommu/ | |
| 10826 | − | |
| 10827 | 10828 | IOMMU SUBSYSTEM |
| 10828 | 10829 | M: Joerg Roedel <joro@8bytes.org> |
| 10829 | 10830 | M: Will Deacon <will@kernel.org> |
| @@ -10839,6 +10840,18 @@ F: include/linux/iova.h · 9 unmodified lines | ||
| 10839 | 10840 | F: include/linux/of_iommu.h |
| 10840 | 10841 | F: include/uapi/linux/iommu.h |
| 10841 | 10842 | |
| 10843 | +IOMMUFD | |
| 10844 | +M: Jason Gunthorpe <jgg@nvidia.com> | |
| 10845 | +M: Kevin Tian <kevin.tian@intel.com> | |
| 10846 | +L: iommu@lists.linux.dev | |
| 10847 | +S: Maintained | |
| 10848 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git | |
| 10849 | +F: Documentation/userspace-api/iommufd.rst | |
| 10850 | +F: drivers/iommu/iommufd/ | |
| 10851 | +F: include/linux/iommufd.h | |
| 10852 | +F: include/uapi/linux/iommufd.h | |
| 10853 | +F: tools/testing/selftests/iommu/ | |
| 10854 | + | |
| 10842 | 10855 | IOSYS-MAP HELPERS |
| 10843 | 10856 | M: Thomas Zimmermann <tzimmermann@suse.de> |
| 10844 | 10857 | L: dri-devel@lists.freedesktop.org |
| @@ -10853,11 +10866,11 @@ L: io-uring@vger.kernel.org · 8 unmodified lines | ||
| 10853 | 10866 | S: Maintained |
| 10854 | 10867 | T: git git://git.kernel.dk/linux-block |
| 10855 | 10868 | T: git git://git.kernel.dk/liburing |
| 10856 | −F: io_uring/ | |
| 10857 | 10869 | F: include/linux/io_uring.h |
| 10858 | 10870 | F: include/linux/io_uring_types.h |
| 10859 | 10871 | F: include/trace/events/io_uring.h |
| 10860 | 10872 | F: include/uapi/linux/io_uring.h |
| 10873 | +F: io_uring/ | |
| 10861 | 10874 | F: tools/io_uring/ |
| 10862 | 10875 | |
| 10863 | 10876 | IPMI SUBSYSTEM |
| @@ -10866,8 +10879,8 @@ L: openipmi-developer@lists.sourceforge.net (moderated for non-subscribers) · 2 unmodified lines | ||
| 10866 | 10879 | S: Supported |
| 10867 | 10880 | W: http://openipmi.sourceforge.net/ |
| 10868 | 10881 | T: git https://github.com/cminyard/linux-ipmi.git for-next |
| 10869 | −F: Documentation/driver-api/ipmi.rst | |
| 10870 | 10882 | F: Documentation/devicetree/bindings/ipmi/ |
| 10883 | +F: Documentation/driver-api/ipmi.rst | |
| 10871 | 10884 | F: drivers/char/ipmi/ |
| 10872 | 10885 | F: include/linux/ipmi* |
| 10873 | 10886 | F: include/uapi/linux/ipmi* |
| @@ -10919,8 +10932,8 @@ M: Thomas Gleixner <tglx@linutronix.de> · 45 unmodified lines | ||
| 10919 | 10932 | L: linux-kernel@vger.kernel.org |
| 10920 | 10933 | S: Maintained |
| 10921 | 10934 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core |
| 10922 | −F: kernel/irq/ | |
| 10923 | 10935 | F: include/linux/group_cpus.h |
| 10936 | +F: kernel/irq/ | |
| 10924 | 10937 | F: lib/group_cpus.c |
| 10925 | 10938 | |
| 10926 | 10939 | IRQCHIP DRIVERS |
| @@ -11258,6 +11271,7 @@ L: linux-nfs@vger.kernel.org · 331 unmodified lines | ||
| 11258 | 11271 | S: Supported |
| 11259 | 11272 | W: http://nfs.sourceforge.net/ |
| 11260 | 11273 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git |
| 11274 | +F: Documentation/filesystems/nfs/ | |
| 11261 | 11275 | F: fs/exportfs/ |
| 11262 | 11276 | F: fs/lockd/ |
| 11263 | 11277 | F: fs/nfs_common/ |
| @@ -11273,7 +11287,6 @@ F: include/trace/misc/sunrpc.h · 9 unmodified lines | ||
| 11273 | 11287 | F: include/uapi/linux/nfsd/ |
| 11274 | 11288 | F: include/uapi/linux/sunrpc/ |
| 11275 | 11289 | F: net/sunrpc/ |
| 11276 | −F: Documentation/filesystems/nfs/ | |
| 11277 | 11290 | |
| 11278 | 11291 | KERNEL REGRESSIONS |
| 11279 | 11292 | M: Thorsten Leemhuis <linux@leemhuis.info> |
| @@ -11388,83 +11401,42 @@ F: arch/riscv/include/asm/kvm* · 108 unmodified lines | ||
| 11388 | 11401 | F: arch/riscv/include/uapi/asm/kvm* |
| 11389 | 11402 | F: arch/riscv/kvm/ |
| 11390 | 11403 | F: tools/testing/selftests/kvm/*/riscv/ |
| 11391 | − | |
| 11392 | −KERNEL VIRTUAL MACHINE for s390 (KVM/s390) | |
| 11393 | −M: Christian Borntraeger <borntraeger@linux.ibm.com> | |
| 11394 | −M: Janosch Frank <frankja@linux.ibm.com> | |
| 11395 | −M: Claudio Imbrenda <imbrenda@linux.ibm.com> | |
| 11396 | −R: David Hildenbrand <david@redhat.com> | |
| 11397 | −L: kvm@vger.kernel.org | |
| 11398 | −S: Supported | |
| 11399 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git | |
| 11400 | −F: Documentation/virt/kvm/s390* | |
| 11401 | −F: arch/s390/include/asm/gmap.h | |
| 11402 | −F: arch/s390/include/asm/kvm* | |
| 11403 | −F: arch/s390/include/uapi/asm/kvm* | |
| 11404 | −F: arch/s390/include/uapi/asm/uvdevice.h | |
| 11405 | −F: arch/s390/kernel/uv.c | |
| 11406 | −F: arch/s390/kvm/ | |
| 11407 | −F: arch/s390/mm/gmap.c | |
| 11408 | −F: drivers/s390/char/uvdevice.c | |
| 11409 | −F: tools/testing/selftests/drivers/s390x/uvdevice/ | |
| 11410 | −F: tools/testing/selftests/kvm/*/s390x/ | |
| 11411 | −F: tools/testing/selftests/kvm/s390x/ | |
| 11412 | − | |
| 11413 | −KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86) | |
| 11414 | −M: Sean Christopherson <seanjc@google.com> | |
| 11415 | −M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11416 | −L: kvm@vger.kernel.org | |
| 11417 | −S: Supported | |
| 11418 | −T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11419 | −F: arch/x86/include/asm/kvm* | |
| 11420 | −F: arch/x86/include/asm/svm.h | |
| 11421 | −F: arch/x86/include/asm/vmx*.h | |
| 11422 | −F: arch/x86/include/uapi/asm/kvm* | |
| 11423 | −F: arch/x86/include/uapi/asm/svm.h | |
| 11424 | −F: arch/x86/include/uapi/asm/vmx.h | |
| 11425 | −F: arch/x86/kvm/ | |
| 11426 | −F: arch/x86/kvm/*/ | |
| 11427 | − | |
| 11428 | −KVM PARAVIRT (KVM/paravirt) | |
| 11429 | −M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11430 | −R: Wanpeng Li <wanpengli@tencent.com> | |
| 11431 | −R: Vitaly Kuznetsov <vkuznets@redhat.com> | |
| 11432 | −L: kvm@vger.kernel.org | |
| 11433 | −S: Supported | |
| 11434 | −T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11435 | −F: arch/x86/kernel/kvm.c | |
| 11436 | −F: arch/x86/kernel/kvmclock.c | |
| 11437 | −F: arch/x86/include/asm/pvclock-abi.h | |
| 11438 | −F: include/linux/kvm_para.h | |
| 11439 | −F: include/uapi/linux/kvm_para.h | |
| 11440 | −F: include/uapi/asm-generic/kvm_para.h | |
| 11441 | −F: include/asm-generic/kvm_para.h | |
| 11442 | −F: arch/um/include/asm/kvm_para.h | |
| 11443 | −F: arch/x86/include/asm/kvm_para.h | |
| 11444 | −F: arch/x86/include/uapi/asm/kvm_para.h | |
| 11445 | − | |
| 11446 | −KVM X86 HYPER-V (KVM/hyper-v) | |
| 11447 | −M: Vitaly Kuznetsov <vkuznets@redhat.com> | |
| 11448 | −M: Sean Christopherson <seanjc@google.com> | |
| 11449 | −M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11404 | + | |
| 11405 | +KERNEL VIRTUAL MACHINE for s390 (KVM/s390) | |
| 11406 | +M: Christian Borntraeger <borntraeger@linux.ibm.com> | |
| 11407 | +M: Janosch Frank <frankja@linux.ibm.com> | |
| 11408 | +M: Claudio Imbrenda <imbrenda@linux.ibm.com> | |
| 11409 | +R: David Hildenbrand <david@redhat.com> | |
| 11450 | 11410 | L: kvm@vger.kernel.org |
| 11451 | 11411 | S: Supported |
| 11452 | −T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11453 | −F: arch/x86/kvm/hyperv.* | |
| 11454 | −F: arch/x86/kvm/kvm_onhyperv.* | |
| 11455 | −F: arch/x86/kvm/svm/hyperv.* | |
| 11456 | −F: arch/x86/kvm/svm/svm_onhyperv.* | |
| 11457 | −F: arch/x86/kvm/vmx/hyperv.* | |
| 11412 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git | |
| 11413 | +F: Documentation/virt/kvm/s390* | |
| 11414 | +F: arch/s390/include/asm/gmap.h | |
| 11415 | +F: arch/s390/include/asm/kvm* | |
| 11416 | +F: arch/s390/include/uapi/asm/kvm* | |
| 11417 | +F: arch/s390/include/uapi/asm/uvdevice.h | |
| 11418 | +F: arch/s390/kernel/uv.c | |
| 11419 | +F: arch/s390/kvm/ | |
| 11420 | +F: arch/s390/mm/gmap.c | |
| 11421 | +F: drivers/s390/char/uvdevice.c | |
| 11422 | +F: tools/testing/selftests/drivers/s390x/uvdevice/ | |
| 11423 | +F: tools/testing/selftests/kvm/*/s390x/ | |
| 11424 | +F: tools/testing/selftests/kvm/s390x/ | |
| 11458 | 11425 | |
| 11459 | −KVM X86 Xen (KVM/Xen) | |
| 11460 | −M: David Woodhouse <dwmw2@infradead.org> | |
| 11461 | −M: Paul Durrant <paul@xen.org> | |
| 11426 | +KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86) | |
| 11462 | 11427 | M: Sean Christopherson <seanjc@google.com> |
| 11463 | 11428 | M: Paolo Bonzini <pbonzini@redhat.com> |
| 11464 | 11429 | L: kvm@vger.kernel.org |
| 11465 | 11430 | S: Supported |
| 11466 | 11431 | T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git |
| 11467 | −F: arch/x86/kvm/xen.* | |
| 11432 | +F: arch/x86/include/asm/kvm* | |
| 11433 | +F: arch/x86/include/asm/svm.h | |
| 11434 | +F: arch/x86/include/asm/vmx*.h | |
| 11435 | +F: arch/x86/include/uapi/asm/kvm* | |
| 11436 | +F: arch/x86/include/uapi/asm/svm.h | |
| 11437 | +F: arch/x86/include/uapi/asm/vmx.h | |
| 11438 | +F: arch/x86/kvm/ | |
| 11439 | +F: arch/x86/kvm/*/ | |
| 11468 | 11440 | |
| 11469 | 11441 | KERNFS |
| 11470 | 11442 | M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| @@ -11504,14 +11476,6 @@ F: include/keys/trusted-type.h · 33 unmodified lines | ||
| 11504 | 11476 | F: include/keys/trusted_tpm.h |
| 11505 | 11477 | F: security/keys/trusted-keys/ |
| 11506 | 11478 | |
| 11507 | −KEYS-TRUSTED-TEE | |
| 11508 | −M: Sumit Garg <sumit.garg@linaro.org> | |
| 11509 | −L: linux-integrity@vger.kernel.org | |
| 11510 | −L: keyrings@vger.kernel.org | |
| 11511 | −S: Supported | |
| 11512 | −F: include/keys/trusted_tee.h | |
| 11513 | −F: security/keys/trusted-keys/trusted_tee.c | |
| 11514 | − | |
| 11515 | 11479 | KEYS-TRUSTED-CAAM |
| 11516 | 11480 | M: Ahmad Fatoum <a.fatoum@pengutronix.de> |
| 11517 | 11481 | R: Pengutronix Kernel Team <kernel@pengutronix.de> |
| @@ -11521,6 +11485,14 @@ S: Maintained · 3 unmodified lines | ||
| 11521 | 11485 | F: include/keys/trusted_caam.h |
| 11522 | 11486 | F: security/keys/trusted-keys/trusted_caam.c |
| 11523 | 11487 | |
| 11488 | +KEYS-TRUSTED-TEE | |
| 11489 | +M: Sumit Garg <sumit.garg@linaro.org> | |
| 11490 | +L: linux-integrity@vger.kernel.org | |
| 11491 | +L: keyrings@vger.kernel.org | |
| 11492 | +S: Supported | |
| 11493 | +F: include/keys/trusted_tee.h | |
| 11494 | +F: security/keys/trusted-keys/trusted_tee.c | |
| 11495 | + | |
| 11524 | 11496 | KEYS/KEYRINGS |
| 11525 | 11497 | M: David Howells <dhowells@redhat.com> |
| 11526 | 11498 | M: Jarkko Sakkinen <jarkko@kernel.org> |
| @@ -11583,8 +11555,8 @@ L: linux-amlogic@lists.infradead.org · 56 unmodified lines | ||
| 11583 | 11555 | S: Maintained |
| 11584 | 11556 | F: Documentation/devicetree/bindings/mfd/khadas,mcu.yaml |
| 11585 | 11557 | F: drivers/mfd/khadas-mcu.c |
| 11586 | −F: include/linux/mfd/khadas-mcu.h | |
| 11587 | 11558 | F: drivers/thermal/khadas_mcu_fan.c |
| 11559 | +F: include/linux/mfd/khadas-mcu.h | |
| 11588 | 11560 | |
| 11589 | 11561 | KIONIX/ROHM KX022A ACCELEROMETER |
| 11590 | 11562 | M: Matti Vaittinen <mazziesaccount@gmail.com> |
| @@ -11621,8 +11593,8 @@ M: "David S. Miller" <davem@davemloft.net> · 30 unmodified lines | ||
| 11621 | 11593 | M: Masami Hiramatsu <mhiramat@kernel.org> |
| 11622 | 11594 | L: linux-kernel@vger.kernel.org |
| 11623 | 11595 | L: linux-trace-kernel@vger.kernel.org |
| 11624 | −Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 11625 | 11596 | S: Maintained |
| 11597 | +Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 11626 | 11598 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git |
| 11627 | 11599 | F: Documentation/trace/kprobes.rst |
| 11628 | 11600 | F: include/asm-generic/kprobes.h |
| @@ -11656,6 +11628,47 @@ S: Maintained · 27 unmodified lines | ||
| 11656 | 11628 | F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml |
| 11657 | 11629 | F: drivers/video/backlight/ktz8866.c |
| 11658 | 11630 | |
| 11631 | +KVM PARAVIRT (KVM/paravirt) | |
| 11632 | +M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11633 | +R: Wanpeng Li <wanpengli@tencent.com> | |
| 11634 | +R: Vitaly Kuznetsov <vkuznets@redhat.com> | |
| 11635 | +L: kvm@vger.kernel.org | |
| 11636 | +S: Supported | |
| 11637 | +T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11638 | +F: arch/um/include/asm/kvm_para.h | |
| 11639 | +F: arch/x86/include/asm/kvm_para.h | |
| 11640 | +F: arch/x86/include/asm/pvclock-abi.h | |
| 11641 | +F: arch/x86/include/uapi/asm/kvm_para.h | |
| 11642 | +F: arch/x86/kernel/kvm.c | |
| 11643 | +F: arch/x86/kernel/kvmclock.c | |
| 11644 | +F: include/asm-generic/kvm_para.h | |
| 11645 | +F: include/linux/kvm_para.h | |
| 11646 | +F: include/uapi/asm-generic/kvm_para.h | |
| 11647 | +F: include/uapi/linux/kvm_para.h | |
| 11648 | + | |
| 11649 | +KVM X86 HYPER-V (KVM/hyper-v) | |
| 11650 | +M: Vitaly Kuznetsov <vkuznets@redhat.com> | |
| 11651 | +M: Sean Christopherson <seanjc@google.com> | |
| 11652 | +M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11653 | +L: kvm@vger.kernel.org | |
| 11654 | +S: Supported | |
| 11655 | +T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11656 | +F: arch/x86/kvm/hyperv.* | |
| 11657 | +F: arch/x86/kvm/kvm_onhyperv.* | |
| 11658 | +F: arch/x86/kvm/svm/hyperv.* | |
| 11659 | +F: arch/x86/kvm/svm/svm_onhyperv.* | |
| 11660 | +F: arch/x86/kvm/vmx/hyperv.* | |
| 11661 | + | |
| 11662 | +KVM X86 Xen (KVM/Xen) | |
| 11663 | +M: David Woodhouse <dwmw2@infradead.org> | |
| 11664 | +M: Paul Durrant <paul@xen.org> | |
| 11665 | +M: Sean Christopherson <seanjc@google.com> | |
| 11666 | +M: Paolo Bonzini <pbonzini@redhat.com> | |
| 11667 | +L: kvm@vger.kernel.org | |
| 11668 | +S: Supported | |
| 11669 | +T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git | |
| 11670 | +F: arch/x86/kvm/xen.* | |
| 11671 | + | |
| 11659 | 11672 | L3MDEV |
| 11660 | 11673 | M: David Ahern <dsahern@kernel.org> |
| 11661 | 11674 | L: netdev@vger.kernel.org |
| @@ -11897,9 +11910,9 @@ F: scripts/spdxexclude · 235 unmodified lines | ||
| 11897 | 11910 | LINEAR RANGES HELPERS |
| 11898 | 11911 | M: Mark Brown <broonie@kernel.org> |
| 11899 | 11912 | R: Matti Vaittinen <mazziesaccount@gmail.com> |
| 11913 | +F: include/linux/linear_range.h | |
| 11900 | 11914 | F: lib/linear_ranges.c |
| 11901 | 11915 | F: lib/test_linear_ranges.c |
| 11902 | −F: include/linux/linear_range.h | |
| 11903 | 11916 | |
| 11904 | 11917 | LINUX FOR POWER MACINTOSH |
| 11905 | 11918 | M: Benjamin Herrenschmidt <benh@kernel.crashing.org> |
| @@ -12026,11 +12039,11 @@ M: Joel Stanley <joel@jms.id.au> · 120 unmodified lines | ||
| 12026 | 12039 | S: Maintained |
| 12027 | 12040 | F: Documentation/devicetree/bindings/*/litex,*.yaml |
| 12028 | 12041 | F: arch/openrisc/boot/dts/or1klitex.dts |
| 12029 | −F: include/linux/litex.h | |
| 12030 | −F: drivers/tty/serial/liteuart.c | |
| 12031 | −F: drivers/soc/litex/* | |
| 12032 | −F: drivers/net/ethernet/litex/* | |
| 12033 | 12042 | F: drivers/mmc/host/litex_mmc.c |
| 12043 | +F: drivers/net/ethernet/litex/* | |
| 12044 | +F: drivers/soc/litex/* | |
| 12045 | +F: drivers/tty/serial/liteuart.c | |
| 12046 | +F: include/linux/litex.h | |
| 12034 | 12047 | N: litex |
| 12035 | 12048 | |
| 12036 | 12049 | LIVE PATCHING |
| @@ -12159,10 +12172,17 @@ R: WANG Xuerui <kernel@xen0n.name> · 122 unmodified lines | ||
| 12159 | 12172 | L: loongarch@lists.linux.dev |
| 12160 | 12173 | S: Maintained |
| 12161 | 12174 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git |
| 12162 | −F: arch/loongarch/ | |
| 12163 | −F: drivers/*/*loongarch* | |
| 12164 | 12175 | F: Documentation/loongarch/ |
| 12165 | 12176 | F: Documentation/translations/zh_CN/loongarch/ |
| 12177 | +F: arch/loongarch/ | |
| 12178 | +F: drivers/*/*loongarch* | |
| 12179 | + | |
| 12180 | +LOONGSON GPIO DRIVER | |
| 12181 | +M: Yinbo Zhu <zhuyinbo@loongson.cn> | |
| 12182 | +L: linux-gpio@vger.kernel.org | |
| 12183 | +S: Maintained | |
| 12184 | +F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml | |
| 12185 | +F: drivers/gpio/gpio-loongson-64bit.c | |
| 12166 | 12186 | |
| 12167 | 12187 | LOONGSON LS2X I2C DRIVER |
| 12168 | 12188 | M: Binbin Zhou <zhoubinbin@loongson.cn> |
| @@ -12171,6 +12191,14 @@ S: Maintained · 2 unmodified lines | ||
| 12171 | 12191 | F: Documentation/devicetree/bindings/i2c/loongson,ls2x-i2c.yaml |
| 12172 | 12192 | F: drivers/i2c/busses/i2c-ls2x.c |
| 12173 | 12193 | |
| 12194 | +LOONGSON-2 SOC SERIES CLOCK DRIVER | |
| 12195 | +M: Yinbo Zhu <zhuyinbo@loongson.cn> | |
| 12196 | +L: linux-clk@vger.kernel.org | |
| 12197 | +S: Maintained | |
| 12198 | +F: Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml | |
| 12199 | +F: drivers/clk/clk-loongson2.c | |
| 12200 | +F: include/dt-bindings/clock/loongson,ls2k-clk.h | |
| 12201 | + | |
| 12174 | 12202 | LOONGSON-2 SOC SERIES GUTS DRIVER |
| 12175 | 12203 | M: Yinbo Zhu <zhuyinbo@loongson.cn> |
| 12176 | 12204 | L: loongarch@lists.linux.dev |
| @@ -12186,21 +12214,6 @@ S: Maintained · 9 unmodified lines | ||
| 12186 | 12214 | F: Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml |
| 12187 | 12215 | F: drivers/pinctrl/pinctrl-loongson2.c |
| 12188 | 12216 | |
| 12189 | −LOONGSON GPIO DRIVER | |
| 12190 | −M: Yinbo Zhu <zhuyinbo@loongson.cn> | |
| 12191 | −L: linux-gpio@vger.kernel.org | |
| 12192 | −S: Maintained | |
| 12193 | −F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml | |
| 12194 | −F: drivers/gpio/gpio-loongson-64bit.c | |
| 12195 | − | |
| 12196 | −LOONGSON-2 SOC SERIES CLOCK DRIVER | |
| 12197 | −M: Yinbo Zhu <zhuyinbo@loongson.cn> | |
| 12198 | −L: linux-clk@vger.kernel.org | |
| 12199 | −S: Maintained | |
| 12200 | −F: Documentation/devicetree/bindings/clock/loongson,ls2k-clk.yaml | |
| 12201 | −F: drivers/clk/clk-loongson2.c | |
| 12202 | −F: include/dt-bindings/clock/loongson,ls2k-clk.h | |
| 12203 | − | |
| 12204 | 12217 | LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI) |
| 12205 | 12218 | M: Sathya Prakash <sathya.prakash@broadcom.com> |
| 12206 | 12219 | M: Sreekanth Reddy <sreekanth.reddy@broadcom.com> |
| @@ -12361,20 +12374,26 @@ MAILBOX API · 154 unmodified lines | ||
| 12361 | 12374 | M: Jassi Brar <jassisinghbrar@gmail.com> |
| 12362 | 12375 | L: linux-kernel@vger.kernel.org |
| 12363 | 12376 | S: Maintained |
| 12377 | +F: Documentation/devicetree/bindings/mailbox/ | |
| 12364 | 12378 | F: drivers/mailbox/ |
| 12379 | +F: include/dt-bindings/mailbox/ | |
| 12365 | 12380 | F: include/linux/mailbox_client.h |
| 12366 | 12381 | F: include/linux/mailbox_controller.h |
| 12367 | −F: include/dt-bindings/mailbox/ | |
| 12368 | −F: Documentation/devicetree/bindings/mailbox/ | |
| 12369 | 12382 | |
| 12370 | 12383 | MAILBOX ARM MHUv2 |
| 12371 | 12384 | M: Viresh Kumar <viresh.kumar@linaro.org> |
| 12372 | 12385 | M: Tushar Khandelwal <Tushar.Khandelwal@arm.com> |
| 12373 | 12386 | L: linux-kernel@vger.kernel.org |
| 12374 | 12387 | S: Maintained |
| 12388 | +F: Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml | |
| 12375 | 12389 | F: drivers/mailbox/arm_mhuv2.c |
| 12376 | 12390 | F: include/linux/mailbox/arm_mhuv2_message.h |
| 12377 | −F: Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml | |
| 12391 | + | |
| 12392 | +MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 | |
| 12393 | +M: Michael Kerrisk <mtk.manpages@gmail.com> | |
| 12394 | +L: linux-man@vger.kernel.org | |
| 12395 | +S: Maintained | |
| 12396 | +W: http://www.kernel.org/doc/man-pages | |
| 12378 | 12397 | |
| 12379 | 12398 | MANAGEMENT COMPONENT TRANSPORT PROTOCOL (MCTP) |
| 12380 | 12399 | M: Jeremy Kerr <jk@codeconstruct.com.au> |
| @@ -12388,12 +12407,6 @@ F: include/net/mctpdevice.h · 7 unmodified lines | ||
| 12388 | 12407 | F: include/net/netns/mctp.h |
| 12389 | 12408 | F: net/mctp/ |
| 12390 | 12409 | |
| 12391 | −MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 | |
| 12392 | −M: Michael Kerrisk <mtk.manpages@gmail.com> | |
| 12393 | −L: linux-man@vger.kernel.org | |
| 12394 | −S: Maintained | |
| 12395 | −W: http://www.kernel.org/doc/man-pages | |
| 12396 | − | |
| 12397 | 12410 | MAPLE TREE |
| 12398 | 12411 | M: Liam R. Howlett <Liam.Howlett@oracle.com> |
| 12399 | 12412 | L: linux-mm@kvack.org |
| @@ -12425,8 +12438,8 @@ F: include/linux/platform_data/mv88e6xxx.h · 25 unmodified lines | ||
| 12425 | 12438 | MARVELL ARMADA 3700 PHY DRIVERS |
| 12426 | 12439 | M: Miquel Raynal <miquel.raynal@bootlin.com> |
| 12427 | 12440 | S: Maintained |
| 12428 | −F: Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt | |
| 12429 | 12441 | F: Documentation/devicetree/bindings/phy/marvell,armada-3700-utmi-phy.yaml |
| 12442 | +F: Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt | |
| 12430 | 12443 | F: drivers/phy/marvell/phy-mvebu-a3700-comphy.c |
| 12431 | 12444 | F: drivers/phy/marvell/phy-mvebu-a3700-utmi.c |
| 12432 | 12445 | |
| @@ -12528,6 +12541,13 @@ S: Maintained · 95 unmodified lines | ||
| 12528 | 12541 | F: Documentation/devicetree/bindings/mtd/marvell-nand.txt |
| 12529 | 12542 | F: drivers/mtd/nand/raw/marvell_nand.c |
| 12530 | 12543 | |
| 12544 | +MARVELL OCTEON ENDPOINT DRIVER | |
| 12545 | +M: Veerasenareddy Burru <vburru@marvell.com> | |
| 12546 | +M: Abhijit Ayarekar <aayarekar@marvell.com> | |
| 12547 | +L: netdev@vger.kernel.org | |
| 12548 | +S: Supported | |
| 12549 | +F: drivers/net/ethernet/marvell/octeon_ep | |
| 12550 | + | |
| 12531 | 12551 | MARVELL OCTEONTX2 PHYSICAL FUNCTION DRIVER |
| 12532 | 12552 | M: Sunil Goutham <sgoutham@marvell.com> |
| 12533 | 12553 | M: Geetha sowjanya <gakula@marvell.com> |
| @@ -12575,13 +12595,6 @@ S: Supported · 41 unmodified lines | ||
| 12575 | 12595 | F: Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml |
| 12576 | 12596 | F: drivers/mmc/host/sdhci-xenon* |
| 12577 | 12597 | |
| 12578 | −MARVELL OCTEON ENDPOINT DRIVER | |
| 12579 | −M: Veerasenareddy Burru <vburru@marvell.com> | |
| 12580 | −M: Abhijit Ayarekar <aayarekar@marvell.com> | |
| 12581 | −L: netdev@vger.kernel.org | |
| 12582 | −S: Supported | |
| 12583 | −F: drivers/net/ethernet/marvell/octeon_ep | |
| 12584 | − | |
| 12585 | 12598 | MATROX FRAMEBUFFER DRIVER |
| 12586 | 12599 | L: linux-fbdev@vger.kernel.org |
| 12587 | 12600 | S: Orphan |
| @@ -12781,12 +12794,6 @@ L: netdev@vger.kernel.org · 193 unmodified lines | ||
| 12781 | 12794 | S: Supported |
| 12782 | 12795 | F: drivers/net/phy/mxl-gpy.c |
| 12783 | 12796 | |
| 12784 | −MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER | |
| 12785 | −R: Yasushi SHOJI <yashi@spacecubics.com> | |
| 12786 | −L: linux-can@vger.kernel.org | |
| 12787 | −S: Maintained | |
| 12788 | −F: drivers/net/can/usb/mcba_usb.c | |
| 12789 | − | |
| 12790 | 12797 | MCAN MMIO DEVICE DRIVER |
| 12791 | 12798 | M: Chandrasekar Ramakrishnan <rcsekar@samsung.com> |
| 12792 | 12799 | L: linux-can@vger.kernel.org |
| @@ -12796,6 +12803,12 @@ F: drivers/net/can/m_can/m_can.c · 3 unmodified lines | ||
| 12796 | 12803 | F: drivers/net/can/m_can/m_can.h |
| 12797 | 12804 | F: drivers/net/can/m_can/m_can_platform.c |
| 12798 | 12805 | |
| 12806 | +MCBA MICROCHIP CAN BUS ANALYZER TOOL DRIVER | |
| 12807 | +R: Yasushi SHOJI <yashi@spacecubics.com> | |
| 12808 | +L: linux-can@vger.kernel.org | |
| 12809 | +S: Maintained | |
| 12810 | +F: drivers/net/can/usb/mcba_usb.c | |
| 12811 | + | |
| 12799 | 12812 | MCP2221A MICROCHIP USB-HID TO I2C BRIDGE DRIVER |
| 12800 | 12813 | M: Rishi Gupta <gupt21@gmail.com> |
| 12801 | 12814 | L: linux-i2c@vger.kernel.org |
| @@ -13204,13 +13217,6 @@ S: Maintained · 402 unmodified lines | ||
| 13204 | 13217 | F: Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml |
| 13205 | 13218 | F: drivers/clk/ralink/clk-mt7621.c |
| 13206 | 13219 | |
| 13207 | −MEDIATEK MT7621/28/88 I2C DRIVER | |
| 13208 | −M: Stefan Roese <sr@denx.de> | |
| 13209 | −L: linux-i2c@vger.kernel.org | |
| 13210 | −S: Maintained | |
| 13211 | −F: Documentation/devicetree/bindings/i2c/mediatek,mt7621-i2c.yaml | |
| 13212 | −F: drivers/i2c/busses/i2c-mt7621.c | |
| 13213 | − | |
| 13214 | 13220 | MEDIATEK MT7621 PCIE CONTROLLER DRIVER |
| 13215 | 13221 | M: Sergio Paracuellos <sergio.paracuellos@gmail.com> |
| 13216 | 13222 | S: Maintained |
| @@ -13223,6 +13229,13 @@ S: Maintained · 6 unmodified lines | ||
| 13223 | 13229 | F: Documentation/devicetree/bindings/phy/mediatek,mt7621-pci-phy.yaml |
| 13224 | 13230 | F: drivers/phy/ralink/phy-mt7621-pci.c |
| 13225 | 13231 | |
| 13232 | +MEDIATEK MT7621/28/88 I2C DRIVER | |
| 13233 | +M: Stefan Roese <sr@denx.de> | |
| 13234 | +L: linux-i2c@vger.kernel.org | |
| 13235 | +S: Maintained | |
| 13236 | +F: Documentation/devicetree/bindings/i2c/mediatek,mt7621-i2c.yaml | |
| 13237 | +F: drivers/i2c/busses/i2c-mt7621.c | |
| 13238 | + | |
| 13226 | 13239 | MEDIATEK NAND CONTROLLER DRIVER |
| 13227 | 13240 | L: linux-mtd@lists.infradead.org |
| 13228 | 13241 | S: Orphan |
| @@ -13482,10 +13495,22 @@ MEMORY FREQUENCY SCALING DRIVERS FOR NVIDIA TEGRA · 253 unmodified lines | ||
| 13482 | 13495 | M: Dmitry Osipenko <digetx@gmail.com> |
| 13483 | 13496 | L: linux-pm@vger.kernel.org |
| 13484 | 13497 | L: linux-tegra@vger.kernel.org |
| 13485 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git | |
| 13486 | 13498 | S: Maintained |
| 13499 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git | |
| 13487 | 13500 | F: drivers/devfreq/tegra30-devfreq.c |
| 13488 | 13501 | |
| 13502 | +MEMORY HOT(UN)PLUG | |
| 13503 | +M: David Hildenbrand <david@redhat.com> | |
| 13504 | +M: Oscar Salvador <osalvador@suse.de> | |
| 13505 | +L: linux-mm@kvack.org | |
| 13506 | +S: Maintained | |
| 13507 | +F: Documentation/admin-guide/mm/memory-hotplug.rst | |
| 13508 | +F: Documentation/core-api/memory-hotplug.rst | |
| 13509 | +F: drivers/base/memory.c | |
| 13510 | +F: include/linux/memory_hotplug.h | |
| 13511 | +F: mm/memory_hotplug.c | |
| 13512 | +F: tools/testing/selftests/memory-hotplug/ | |
| 13513 | + | |
| 13489 | 13514 | MEMORY MANAGEMENT |
| 13490 | 13515 | M: Andrew Morton <akpm@linux-foundation.org> |
| 13491 | 13516 | L: linux-mm@kvack.org |
| @@ -13504,30 +13529,6 @@ F: mm/ · 12 unmodified lines | ||
| 13504 | 13529 | F: tools/mm/ |
| 13505 | 13530 | F: tools/testing/selftests/mm/ |
| 13506 | 13531 | |
| 13507 | −VMALLOC | |
| 13508 | −M: Andrew Morton <akpm@linux-foundation.org> | |
| 13509 | −R: Uladzislau Rezki <urezki@gmail.com> | |
| 13510 | −R: Christoph Hellwig <hch@infradead.org> | |
| 13511 | −R: Lorenzo Stoakes <lstoakes@gmail.com> | |
| 13512 | −L: linux-mm@kvack.org | |
| 13513 | −S: Maintained | |
| 13514 | −W: http://www.linux-mm.org | |
| 13515 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm | |
| 13516 | −F: include/linux/vmalloc.h | |
| 13517 | −F: mm/vmalloc.c | |
| 13518 | − | |
| 13519 | −MEMORY HOT(UN)PLUG | |
| 13520 | −M: David Hildenbrand <david@redhat.com> | |
| 13521 | −M: Oscar Salvador <osalvador@suse.de> | |
| 13522 | −L: linux-mm@kvack.org | |
| 13523 | −S: Maintained | |
| 13524 | −F: Documentation/admin-guide/mm/memory-hotplug.rst | |
| 13525 | −F: Documentation/core-api/memory-hotplug.rst | |
| 13526 | −F: drivers/base/memory.c | |
| 13527 | −F: include/linux/memory_hotplug.h | |
| 13528 | −F: mm/memory_hotplug.c | |
| 13529 | −F: tools/testing/selftests/memory-hotplug/ | |
| 13530 | − | |
| 13531 | 13532 | MEMORY TECHNOLOGY DEVICES (MTD) |
| 13532 | 13533 | M: Miquel Raynal <miquel.raynal@bootlin.com> |
| 13533 | 13534 | M: Richard Weinberger <richard@nod.at> |
| @@ -13638,6 +13639,12 @@ W: http://www.monstr.eu/fdt/ · 104 unmodified lines | ||
| 13638 | 13639 | T: git git://git.monstr.eu/linux-2.6-microblaze.git |
| 13639 | 13640 | F: arch/microblaze/ |
| 13640 | 13641 | |
| 13642 | +MICROBLAZE TMR INJECT | |
| 13643 | +M: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com> | |
| 13644 | +S: Supported | |
| 13645 | +F: Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml | |
| 13646 | +F: drivers/misc/xilinx_tmr_inject.c | |
| 13647 | + | |
| 13641 | 13648 | MICROBLAZE TMR MANAGER |
| 13642 | 13649 | M: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com> |
| 13643 | 13650 | S: Supported |
| @@ -13645,12 +13652,6 @@ F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager · 1 unmodified line | ||
| 13645 | 13652 | F: Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml |
| 13646 | 13653 | F: drivers/misc/xilinx_tmr_manager.c |
| 13647 | 13654 | |
| 13648 | −MICROBLAZE TMR INJECT | |
| 13649 | −M: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com> | |
| 13650 | −S: Supported | |
| 13651 | −F: Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml | |
| 13652 | −F: drivers/misc/xilinx_tmr_inject.c | |
| 13653 | − | |
| 13654 | 13655 | MICROCHIP AT91 DMA DRIVERS |
| 13655 | 13656 | M: Ludovic Desroches <ludovic.desroches@microchip.com> |
| 13656 | 13657 | M: Tudor Ambarus <tudor.ambarus@linaro.org> |
| @@ -13725,11 +13726,11 @@ M: Eugen Hristev <eugen.hristev@microchip.com> · 68 unmodified lines | ||
| 13725 | 13726 | L: linux-media@vger.kernel.org |
| 13726 | 13727 | S: Supported |
| 13727 | 13728 | F: Documentation/devicetree/bindings/media/atmel,isc.yaml |
| 13728 | −F: Documentation/devicetree/bindings/media/microchip,xisc.yaml | |
| 13729 | −F: drivers/staging/media/deprecated/atmel/atmel-isc* | |
| 13730 | −F: drivers/staging/media/deprecated/atmel/atmel-sama*-isc* | |
| 13729 | +F: Documentation/devicetree/bindings/media/microchip,xisc.yaml | |
| 13731 | 13730 | F: drivers/media/platform/microchip/microchip-isc* |
| 13732 | 13731 | F: drivers/media/platform/microchip/microchip-sama*-isc* |
| 13732 | +F: drivers/staging/media/deprecated/atmel/atmel-isc* | |
| 13733 | +F: drivers/staging/media/deprecated/atmel/atmel-sama*-isc* | |
| 13733 | 13734 | F: include/linux/atmel-isc-media.h |
| 13734 | 13735 | |
| 13735 | 13736 | MICROCHIP ISI DRIVER |
| @@ -13751,13 +13752,6 @@ F: include/linux/dsa/ksz_common.h · 15 unmodified lines | ||
| 13751 | 13752 | F: include/linux/platform_data/microchip-ksz.h |
| 13752 | 13753 | F: net/dsa/tag_ksz.c |
| 13753 | 13754 | |
| 13754 | −MICROCHIP LAN87xx/LAN937x T1 PHY DRIVER | |
| 13755 | −M: Arun Ramadoss <arun.ramadoss@microchip.com> | |
| 13756 | −R: UNGLinuxDriver@microchip.com | |
| 13757 | −L: netdev@vger.kernel.org | |
| 13758 | −S: Maintained | |
| 13759 | −F: drivers/net/phy/microchip_t1.c | |
| 13760 | − | |
| 13761 | 13755 | MICROCHIP LAN743X ETHERNET DRIVER |
| 13762 | 13756 | M: Bryan Whitehead <bryan.whitehead@microchip.com> |
| 13763 | 13757 | M: UNGLinuxDriver@microchip.com |
| @@ -13765,6 +13759,13 @@ L: netdev@vger.kernel.org · 1 unmodified line | ||
| 13765 | 13759 | S: Maintained |
| 13766 | 13760 | F: drivers/net/ethernet/microchip/lan743x_* |
| 13767 | 13761 | |
| 13762 | +MICROCHIP LAN87xx/LAN937x T1 PHY DRIVER | |
| 13763 | +M: Arun Ramadoss <arun.ramadoss@microchip.com> | |
| 13764 | +R: UNGLinuxDriver@microchip.com | |
| 13765 | +L: netdev@vger.kernel.org | |
| 13766 | +S: Maintained | |
| 13767 | +F: drivers/net/phy/microchip_t1.c | |
| 13768 | + | |
| 13768 | 13769 | MICROCHIP LAN966X ETHERNET DRIVER |
| 13769 | 13770 | M: Horatiu Vultur <horatiu.vultur@microchip.com> |
| 13770 | 13771 | M: UNGLinuxDriver@microchip.com |
| @@ -13806,14 +13807,6 @@ S: Supported · 35 unmodified lines | ||
| 13806 | 13807 | F: Documentation/devicetree/bindings/mtd/atmel-nand.txt |
| 13807 | 13808 | F: drivers/mtd/nand/raw/atmel/* |
| 13808 | 13809 | |
| 13809 | −MICROCHIP PCI1XXXX GP DRIVER | |
| 13810 | −M: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com> | |
| 13811 | −L: linux-gpio@vger.kernel.org | |
| 13812 | −S: Supported | |
| 13813 | −F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | |
| 13814 | −F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.h | |
| 13815 | −F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | |
| 13816 | − | |
| 13817 | 13810 | MICROCHIP OTPC DRIVER |
| 13818 | 13811 | M: Claudiu Beznea <claudiu.beznea@microchip.com> |
| 13819 | 13812 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -13822,6 +13815,14 @@ F: Documentation/devicetree/bindings/nvmem/microchip,sama7g5-otpc.yaml · 2 unmodified lines | ||
| 13822 | 13815 | F: drivers/nvmem/microchip-otpc.c |
| 13823 | 13816 | F: include/dt-bindings/nvmem/microchip,sama7g5-otpc.h |
| 13824 | 13817 | |
| 13818 | +MICROCHIP PCI1XXXX GP DRIVER | |
| 13819 | +M: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com> | |
| 13820 | +L: linux-gpio@vger.kernel.org | |
| 13821 | +S: Supported | |
| 13822 | +F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c | |
| 13823 | +F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.h | |
| 13824 | +F: drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gpio.c | |
| 13825 | + | |
| 13825 | 13826 | MICROCHIP PCI1XXXX I2C DRIVER |
| 13826 | 13827 | M: Tharun Kumar P <tharunkumar.pasumarthi@microchip.com> |
| 13827 | 13828 | M: Kumaravel Thiagarajan <kumaravel.thiagarajan@microchip.com> |
| @@ -13837,6 +13838,14 @@ L: linux-serial@vger.kernel.org · 9 unmodified lines | ||
| 13837 | 13838 | S: Maintained |
| 13838 | 13839 | F: drivers/tty/serial/8250/8250_pci1xxxx.c |
| 13839 | 13840 | |
| 13841 | +MICROCHIP POLARFIRE FPGA DRIVERS | |
| 13842 | +M: Conor Dooley <conor.dooley@microchip.com> | |
| 13843 | +R: Ivan Bornyakov <i.bornyakov@metrotek.ru> | |
| 13844 | +L: linux-fpga@vger.kernel.org | |
| 13845 | +S: Supported | |
| 13846 | +F: Documentation/devicetree/bindings/fpga/microchip,mpf-spi-fpga-mgr.yaml | |
| 13847 | +F: drivers/fpga/microchip-spi.c | |
| 13848 | + | |
| 13840 | 13849 | MICROCHIP PWM DRIVER |
| 13841 | 13850 | M: Claudiu Beznea <claudiu.beznea@microchip.com> |
| 13842 | 13851 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| @@ -13858,6 +13867,12 @@ M: Claudiu Beznea <claudiu.beznea@microchip.com> · 15 unmodified lines | ||
| 13858 | 13867 | S: Supported |
| 13859 | 13868 | F: drivers/power/reset/at91-sama5d2_shdwc.c |
| 13860 | 13869 | |
| 13870 | +MICROCHIP SOC DRIVERS | |
| 13871 | +M: Conor Dooley <conor@kernel.org> | |
| 13872 | +S: Supported | |
| 13873 | +T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/ | |
| 13874 | +F: drivers/soc/microchip/ | |
| 13875 | + | |
| 13861 | 13876 | MICROCHIP SPI DRIVER |
| 13862 | 13877 | M: Tudor Ambarus <tudor.ambarus@linaro.org> |
| 13863 | 13878 | S: Supported |
| @@ -13871,11 +13886,12 @@ F: Documentation/devicetree/bindings/misc/atmel-ssc.txt · 7 unmodified lines | ||
| 13871 | 13886 | F: drivers/misc/atmel-ssc.c |
| 13872 | 13887 | F: include/linux/atmel-ssc.h |
| 13873 | 13888 | |
| 13874 | −MICROCHIP SOC DRIVERS | |
| 13875 | −M: Conor Dooley <conor@kernel.org> | |
| 13876 | −S: Supported | |
| 13877 | −T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/ | |
| 13878 | −F: drivers/soc/microchip/ | |
| 13889 | +Microchip Timer Counter Block (TCB) Capture Driver | |
| 13890 | +M: Kamel Bouhara <kamel.bouhara@bootlin.com> | |
| 13891 | +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 13892 | +L: linux-iio@vger.kernel.org | |
| 13893 | +S: Maintained | |
| 13894 | +F: drivers/counter/microchip-tcb-capture.c | |
| 13879 | 13895 | |
| 13880 | 13896 | MICROCHIP USB251XB DRIVER |
| 13881 | 13897 | M: Richard Leitner <richard.leitner@skidata.com> |
| @@ -13992,6 +14008,12 @@ L: platform-driver-x86@vger.kernel.org · 110 unmodified lines | ||
| 13992 | 14008 | S: Supported |
| 13993 | 14009 | F: drivers/platform/surface/surfacepro3_button.c |
| 13994 | 14010 | |
| 14011 | +MICROSOFT SURFACE SYSTEM AGGREGATOR HUB DRIVER | |
| 14012 | +M: Maximilian Luz <luzmaximilian@gmail.com> | |
| 14013 | +L: platform-driver-x86@vger.kernel.org | |
| 14014 | +S: Maintained | |
| 14015 | +F: drivers/platform/surface/surface_aggregator_hub.c | |
| 14016 | + | |
| 13995 | 14017 | MICROSOFT SURFACE SYSTEM AGGREGATOR SUBSYSTEM |
| 13996 | 14018 | M: Maximilian Luz <luzmaximilian@gmail.com> |
| 13997 | 14019 | L: platform-driver-x86@vger.kernel.org |
| @@ -14007,12 +14029,6 @@ F: include/linux/surface_acpi_notify.h · 9 unmodified lines | ||
| 14007 | 14029 | F: include/linux/surface_aggregator/ |
| 14008 | 14030 | F: include/uapi/linux/surface_aggregator/ |
| 14009 | 14031 | |
| 14010 | −MICROSOFT SURFACE SYSTEM AGGREGATOR HUB DRIVER | |
| 14011 | −M: Maximilian Luz <luzmaximilian@gmail.com> | |
| 14012 | −L: platform-driver-x86@vger.kernel.org | |
| 14013 | −S: Maintained | |
| 14014 | −F: drivers/platform/surface/surface_aggregator_hub.c | |
| 14015 | − | |
| 14016 | 14032 | MICROTEK X6 SCANNER |
| 14017 | 14033 | M: Oliver Neukum <oliver@neukum.org> |
| 14018 | 14034 | S: Maintained |
| @@ -14178,11 +14194,11 @@ L: linux-modules@vger.kernel.org · 159 unmodified lines | ||
| 14178 | 14194 | L: linux-kernel@vger.kernel.org |
| 14179 | 14195 | S: Maintained |
| 14180 | 14196 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git modules-next |
| 14181 | −F: include/linux/module.h | |
| 14182 | 14197 | F: include/linux/kmod.h |
| 14198 | +F: include/linux/module.h | |
| 14183 | 14199 | F: kernel/module/ |
| 14184 | −F: scripts/module* | |
| 14185 | 14200 | F: lib/test_kmod.c |
| 14201 | +F: scripts/module* | |
| 14186 | 14202 | F: tools/testing/selftests/kmod/ |
| 14187 | 14203 | |
| 14188 | 14204 | MONOLITHIC POWER SYSTEM PMIC DRIVER |
| @@ -14771,6 +14787,7 @@ L: linux-nfs@vger.kernel.org · 582 unmodified lines | ||
| 14771 | 14787 | S: Maintained |
| 14772 | 14788 | W: http://client.linux-nfs.org |
| 14773 | 14789 | T: git git://git.linux-nfs.org/projects/trondmy/linux-nfs.git |
| 14790 | +F: Documentation/filesystems/nfs/ | |
| 14774 | 14791 | F: fs/lockd/ |
| 14775 | 14792 | F: fs/nfs/ |
| 14776 | 14793 | F: fs/nfs_common/ |
| @@ -14780,7 +14797,6 @@ F: include/linux/sunrpc/ · 3 unmodified lines | ||
| 14780 | 14797 | F: include/uapi/linux/nfs* |
| 14781 | 14798 | F: include/uapi/linux/sunrpc/ |
| 14782 | 14799 | F: net/sunrpc/ |
| 14783 | −F: Documentation/filesystems/nfs/ | |
| 14784 | 14800 | |
| 14785 | 14801 | NILFS2 FILESYSTEM |
| 14786 | 14802 | M: Ryusuke Konishi <konishi.ryusuke@gmail.com> |
| @@ -14984,12 +15000,6 @@ F: drivers/nvme/target/auth.c · 197 unmodified lines | ||
| 14984 | 15000 | F: drivers/nvme/target/fabrics-cmd-auth.c |
| 14985 | 15001 | F: include/linux/nvme-auth.h |
| 14986 | 15002 | |
| 14987 | −NVM EXPRESS HARDWARE MONITORING SUPPORT | |
| 14988 | −M: Guenter Roeck <linux@roeck-us.net> | |
| 14989 | −L: linux-nvme@lists.infradead.org | |
| 14990 | −S: Supported | |
| 14991 | −F: drivers/nvme/host/hwmon.c | |
| 14992 | − | |
| 14993 | 15003 | NVM EXPRESS FC TRANSPORT DRIVERS |
| 14994 | 15004 | M: James Smart <james.smart@broadcom.com> |
| 14995 | 15005 | L: linux-nvme@lists.infradead.org |
| @@ -15000,6 +15010,12 @@ F: drivers/nvme/target/fcloop.c · 4 unmodified lines | ||
| 15000 | 15010 | F: include/linux/nvme-fc-driver.h |
| 15001 | 15011 | F: include/linux/nvme-fc.h |
| 15002 | 15012 | |
| 15013 | +NVM EXPRESS HARDWARE MONITORING SUPPORT | |
| 15014 | +M: Guenter Roeck <linux@roeck-us.net> | |
| 15015 | +L: linux-nvme@lists.infradead.org | |
| 15016 | +S: Supported | |
| 15017 | +F: drivers/nvme/host/hwmon.c | |
| 15018 | + | |
| 15003 | 15019 | NVM EXPRESS TARGET DRIVER |
| 15004 | 15020 | M: Christoph Hellwig <hch@lst.de> |
| 15005 | 15021 | M: Sagi Grimberg <sagi@grimberg.me> |
| @@ -15020,6 +15036,13 @@ F: drivers/nvmem/ · 14 unmodified lines | ||
| 15020 | 15036 | F: include/linux/nvmem-consumer.h |
| 15021 | 15037 | F: include/linux/nvmem-provider.h |
| 15022 | 15038 | |
| 15039 | +NXP BLUETOOTH WIRELESS DRIVERS | |
| 15040 | +M: Amitkumar Karwar <amitkumar.karwar@nxp.com> | |
| 15041 | +M: Neeraj Kale <neeraj.sanjaykale@nxp.com> | |
| 15042 | +S: Maintained | |
| 15043 | +F: Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | |
| 15044 | +F: drivers/bluetooth/btnxpuart.c | |
| 15045 | + | |
| 15023 | 15046 | NXP C45 TJA11XX PHY DRIVER |
| 15024 | 15047 | M: Radu Pirea <radu-nicolae.pirea@oss.nxp.com> |
| 15025 | 15048 | L: netdev@vger.kernel.org |
| @@ -15045,16 +15068,17 @@ F: drivers/iio/gyro/fxas21002c_core.c · 19 unmodified lines | ||
| 15045 | 15068 | F: drivers/iio/gyro/fxas21002c_i2c.c |
| 15046 | 15069 | F: drivers/iio/gyro/fxas21002c_spi.c |
| 15047 | 15070 | |
| 15048 | −NXP i.MX CLOCK DRIVERS | |
| 15049 | −M: Abel Vesa <abelvesa@kernel.org> | |
| 15050 | −R: Peng Fan <peng.fan@nxp.com> | |
| 15051 | −L: linux-clk@vger.kernel.org | |
| 15071 | +NXP i.MX 7D/6SX/6UL/93 AND VF610 ADC DRIVER | |
| 15072 | +M: Haibo Chen <haibo.chen@nxp.com> | |
| 15073 | +L: linux-iio@vger.kernel.org | |
| 15052 | 15074 | L: linux-imx@nxp.com |
| 15053 | 15075 | S: Maintained |
| 15054 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git clk/imx | |
| 15055 | −F: Documentation/devicetree/bindings/clock/imx* | |
| 15056 | −F: drivers/clk/imx/ | |
| 15057 | −F: include/dt-bindings/clock/imx* | |
| 15076 | +F: Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml | |
| 15077 | +F: Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml | |
| 15078 | +F: Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml | |
| 15079 | +F: drivers/iio/adc/imx7d_adc.c | |
| 15080 | +F: drivers/iio/adc/imx93_adc.c | |
| 15081 | +F: drivers/iio/adc/vf610_adc.c | |
| 15058 | 15082 | |
| 15059 | 15083 | NXP i.MX 8M ISI DRIVER |
| 15060 | 15084 | M: Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
| @@ -15063,6 +15087,15 @@ S: Maintained · 2 unmodified lines | ||
| 15063 | 15087 | F: Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml |
| 15064 | 15088 | F: drivers/media/platform/nxp/imx8-isi/ |
| 15065 | 15089 | |
| 15090 | +NXP i.MX 8MP DW100 V4L2 DRIVER | |
| 15091 | +M: Xavier Roumegue <xavier.roumegue@oss.nxp.com> | |
| 15092 | +L: linux-media@vger.kernel.org | |
| 15093 | +S: Maintained | |
| 15094 | +F: Documentation/devicetree/bindings/media/nxp,dw100.yaml | |
| 15095 | +F: Documentation/userspace-api/media/drivers/dw100.rst | |
| 15096 | +F: drivers/media/platform/nxp/dw100/ | |
| 15097 | +F: include/uapi/linux/dw100.h | |
| 15098 | + | |
| 15066 | 15099 | NXP i.MX 8MQ DCSS DRIVER |
| 15067 | 15100 | M: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com> |
| 15068 | 15101 | R: Lucas Stach <l.stach@pengutronix.de> |
| @@ -15080,17 +15113,24 @@ S: Maintained · 11 unmodified lines | ||
| 15080 | 15113 | F: Documentation/devicetree/bindings/iio/adc/nxp,imx8qxp-adc.yaml |
| 15081 | 15114 | F: drivers/iio/adc/imx8qxp-adc.c |
| 15082 | 15115 | |
| 15083 | −NXP i.MX 7D/6SX/6UL/93 AND VF610 ADC DRIVER | |
| 15084 | −M: Haibo Chen <haibo.chen@nxp.com> | |
| 15085 | −L: linux-iio@vger.kernel.org | |
| 15116 | +NXP i.MX 8QXP/8QM JPEG V4L2 DRIVER | |
| 15117 | +M: Mirela Rabulea <mirela.rabulea@nxp.com> | |
| 15118 | +R: NXP Linux Team <linux-imx@nxp.com> | |
| 15119 | +L: linux-media@vger.kernel.org | |
| 15120 | +S: Maintained | |
| 15121 | +F: Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml | |
| 15122 | +F: drivers/media/platform/nxp/imx-jpeg | |
| 15123 | + | |
| 15124 | +NXP i.MX CLOCK DRIVERS | |
| 15125 | +M: Abel Vesa <abelvesa@kernel.org> | |
| 15126 | +R: Peng Fan <peng.fan@nxp.com> | |
| 15127 | +L: linux-clk@vger.kernel.org | |
| 15086 | 15128 | L: linux-imx@nxp.com |
| 15087 | 15129 | S: Maintained |
| 15088 | −F: Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml | |
| 15089 | −F: Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml | |
| 15090 | −F: Documentation/devicetree/bindings/iio/adc/nxp,imx93-adc.yaml | |
| 15091 | −F: drivers/iio/adc/imx7d_adc.c | |
| 15092 | −F: drivers/iio/adc/imx93_adc.c | |
| 15093 | −F: drivers/iio/adc/vf610_adc.c | |
| 15130 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux.git clk/imx | |
| 15131 | +F: Documentation/devicetree/bindings/clock/imx* | |
| 15132 | +F: drivers/clk/imx/ | |
| 15133 | +F: include/dt-bindings/clock/imx* | |
| 15094 | 15134 | |
| 15095 | 15135 | NXP PF8100/PF8121A/PF8200 PMIC REGULATOR DEVICE DRIVER |
| 15096 | 15136 | M: Jagan Teki <jagan@amarulasolutions.com> |
| @@ -15136,34 +15176,17 @@ S: Maintained · 39 unmodified lines | ||
| 15136 | 15176 | F: Documentation/devicetree/bindings/sound/tfa9879.txt |
| 15137 | 15177 | F: sound/soc/codecs/tfa9879* |
| 15138 | 15178 | |
| 15139 | −NXP/Goodix TFA989X (TFA1) DRIVER | |
| 15140 | −M: Stephan Gerhold <stephan@gerhold.net> | |
| 15141 | −L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 15142 | −S: Maintained | |
| 15143 | −F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml | |
| 15144 | −F: sound/soc/codecs/tfa989x.c | |
| 15145 | − | |
| 15146 | 15179 | NXP-NCI NFC DRIVER |
| 15147 | 15180 | S: Orphan |
| 15148 | 15181 | F: Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml |
| 15149 | 15182 | F: drivers/nfc/nxp-nci |
| 15150 | 15183 | |
| 15151 | −NXP i.MX 8MP DW100 V4L2 DRIVER | |
| 15152 | −M: Xavier Roumegue <xavier.roumegue@oss.nxp.com> | |
| 15153 | −L: linux-media@vger.kernel.org | |
| 15154 | −S: Maintained | |
| 15155 | −F: Documentation/devicetree/bindings/media/nxp,dw100.yaml | |
| 15156 | −F: Documentation/userspace-api/media/drivers/dw100.rst | |
| 15157 | −F: drivers/media/platform/nxp/dw100/ | |
| 15158 | −F: include/uapi/linux/dw100.h | |
| 15159 | − | |
| 15160 | −NXP i.MX 8QXP/8QM JPEG V4L2 DRIVER | |
| 15161 | −M: Mirela Rabulea <mirela.rabulea@nxp.com> | |
| 15162 | −R: NXP Linux Team <linux-imx@nxp.com> | |
| 15163 | −L: linux-media@vger.kernel.org | |
| 15184 | +NXP/Goodix TFA989X (TFA1) DRIVER | |
| 15185 | +M: Stephan Gerhold <stephan@gerhold.net> | |
| 15186 | +L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 15164 | 15187 | S: Maintained |
| 15165 | −F: Documentation/devicetree/bindings/media/nxp,imx8-jpeg.yaml | |
| 15166 | −F: drivers/media/platform/nxp/imx-jpeg | |
| 15188 | +F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml | |
| 15189 | +F: sound/soc/codecs/tfa989x.c | |
| 15167 | 15190 | |
| 15168 | 15191 | NZXT-KRAKEN2 HARDWARE MONITORING DRIVER |
| 15169 | 15192 | M: Jonas Malaco <jonas@protocubo.io> |
| @@ -15689,8 +15712,8 @@ M: Rob Herring <robh+dt@kernel.org> · 519 unmodified lines | ||
| 15689 | 15712 | M: Frank Rowand <frowand.list@gmail.com> |
| 15690 | 15713 | L: devicetree@vger.kernel.org |
| 15691 | 15714 | S: Maintained |
| 15692 | −C: irc://irc.libera.chat/devicetree | |
| 15693 | 15715 | W: http://www.devicetree.org/ |
| 15716 | +C: irc://irc.libera.chat/devicetree | |
| 15694 | 15717 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git |
| 15695 | 15718 | F: Documentation/ABI/testing/sysfs-firmware-ofw |
| 15696 | 15719 | F: drivers/of/ |
| @@ -15706,8 +15729,8 @@ M: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> · 9 unmodified lines | ||
| 15706 | 15729 | M: Conor Dooley <conor+dt@kernel.org> |
| 15707 | 15730 | L: devicetree@vger.kernel.org |
| 15708 | 15731 | S: Maintained |
| 15709 | −C: irc://irc.libera.chat/devicetree | |
| 15710 | 15732 | Q: http://patchwork.ozlabs.org/project/devicetree-bindings/list/ |
| 15733 | +C: irc://irc.libera.chat/devicetree | |
| 15711 | 15734 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git |
| 15712 | 15735 | F: Documentation/devicetree/ |
| 15713 | 15736 | F: arch/*/boot/dts/ |
| @@ -15720,13 +15743,6 @@ L: netdev@vger.kernel.org · 6 unmodified lines | ||
| 15720 | 15743 | S: Maintained |
| 15721 | 15744 | F: drivers/ptp/ptp_ocp.c |
| 15722 | 15745 | |
| 15723 | −INTEL PTP DFL ToD DRIVER | |
| 15724 | −M: Tianfei Zhang <tianfei.zhang@intel.com> | |
| 15725 | −L: linux-fpga@vger.kernel.org | |
| 15726 | −L: netdev@vger.kernel.org | |
| 15727 | −S: Maintained | |
| 15728 | −F: drivers/ptp/ptp_dfl_tod.c | |
| 15729 | − | |
| 15730 | 15746 | OPENCORES I2C BUS DRIVER |
| 15731 | 15747 | M: Peter Korsgaard <peter@korsgaard.com> |
| 15732 | 15748 | M: Andrew Lunn <andrew@lunn.ch> |
| @@ -15745,8 +15761,8 @@ L: linux-openrisc@vger.kernel.org · 12 unmodified lines | ||
| 15745 | 15761 | S: Maintained |
| 15746 | 15762 | W: http://openrisc.io |
| 15747 | 15763 | T: git https://github.com/openrisc/linux.git |
| 15748 | −F: Documentation/devicetree/bindings/openrisc/ | |
| 15749 | 15764 | F: Documentation/arch/openrisc/ |
| 15765 | +F: Documentation/devicetree/bindings/openrisc/ | |
| 15750 | 15766 | F: arch/openrisc/ |
| 15751 | 15767 | F: drivers/irqchip/irq-ompic.c |
| 15752 | 15768 | F: drivers/irqchip/irq-or1k-* |
| @@ -16062,6 +16078,14 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) · 309 unmodified lines | ||
| 16062 | 16078 | S: Maintained |
| 16063 | 16079 | F: drivers/pci/controller/dwc/*layerscape* |
| 16064 | 16080 | |
| 16081 | +PCI DRIVER FOR FU740 | |
| 16082 | +M: Paul Walmsley <paul.walmsley@sifive.com> | |
| 16083 | +M: Greentime Hu <greentime.hu@sifive.com> | |
| 16084 | +L: linux-pci@vger.kernel.org | |
| 16085 | +S: Maintained | |
| 16086 | +F: Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml | |
| 16087 | +F: drivers/pci/controller/dwc/pcie-fu740.c | |
| 16088 | + | |
| 16065 | 16089 | PCI DRIVER FOR GENERIC OF HOSTS |
| 16066 | 16090 | M: Will Deacon <will@kernel.org> |
| 16067 | 16091 | L: linux-pci@vger.kernel.org |
| @@ -16082,14 +16106,6 @@ F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml · 14 unmodified lines | ||
| 16082 | 16106 | F: Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml |
| 16083 | 16107 | F: drivers/pci/controller/dwc/*imx6* |
| 16084 | 16108 | |
| 16085 | −PCI DRIVER FOR FU740 | |
| 16086 | −M: Paul Walmsley <paul.walmsley@sifive.com> | |
| 16087 | −M: Greentime Hu <greentime.hu@sifive.com> | |
| 16088 | −L: linux-pci@vger.kernel.org | |
| 16089 | −S: Maintained | |
| 16090 | −F: Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml | |
| 16091 | −F: drivers/pci/controller/dwc/pcie-fu740.c | |
| 16092 | − | |
| 16093 | 16109 | PCI DRIVER FOR INTEL IXP4XX |
| 16094 | 16110 | M: Linus Walleij <linus.walleij@linaro.org> |
| 16095 | 16111 | S: Maintained |
| @@ -16169,8 +16185,8 @@ M: Jingoo Han <jingoohan1@gmail.com> · 73 unmodified lines | ||
| 16169 | 16185 | M: Gustavo Pimentel <gustavo.pimentel@synopsys.com> |
| 16170 | 16186 | L: linux-pci@vger.kernel.org |
| 16171 | 16187 | S: Maintained |
| 16172 | −F: Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml | |
| 16173 | 16188 | F: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml |
| 16189 | +F: Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml | |
| 16174 | 16190 | F: drivers/pci/controller/dwc/*designware* |
| 16175 | 16191 | |
| 16176 | 16192 | PCI DRIVER FOR TI DRA7XX/J721E |
| @@ -16190,6 +16206,14 @@ S: Maintained · 13 unmodified lines | ||
| 16190 | 16206 | F: Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt |
| 16191 | 16207 | F: drivers/pci/controller/pci-v3-semi.c |
| 16192 | 16208 | |
| 16209 | +PCI DRIVER FOR XILINX VERSAL CPM | |
| 16210 | +M: Bharat Kumar Gogada <bharat.kumar.gogada@amd.com> | |
| 16211 | +M: Michal Simek <michal.simek@amd.com> | |
| 16212 | +L: linux-pci@vger.kernel.org | |
| 16213 | +S: Maintained | |
| 16214 | +F: Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | |
| 16215 | +F: drivers/pci/controller/pcie-xilinx-cpm.c | |
| 16216 | + | |
| 16193 | 16217 | PCI ENDPOINT SUBSYSTEM |
| 16194 | 16218 | M: Lorenzo Pieralisi <lpieralisi@kernel.org> |
| 16195 | 16219 | M: Krzysztof Wilczyński <kw@linux.com> |
| @@ -16227,19 +16251,6 @@ L: linux-pci@vger.kernel.org · 31 unmodified lines | ||
| 16227 | 16251 | S: Supported |
| 16228 | 16252 | F: Documentation/PCI/pci-error-recovery.rst |
| 16229 | 16253 | |
| 16230 | −PCI PEER-TO-PEER DMA (P2PDMA) | |
| 16231 | −M: Bjorn Helgaas <bhelgaas@google.com> | |
| 16232 | −M: Logan Gunthorpe <logang@deltatee.com> | |
| 16233 | −L: linux-pci@vger.kernel.org | |
| 16234 | −S: Supported | |
| 16235 | −Q: https://patchwork.kernel.org/project/linux-pci/list/ | |
| 16236 | −B: https://bugzilla.kernel.org | |
| 16237 | −C: irc://irc.oftc.net/linux-pci | |
| 16238 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git | |
| 16239 | −F: Documentation/driver-api/pci/p2pdma.rst | |
| 16240 | −F: drivers/pci/p2pdma.c | |
| 16241 | −F: include/linux/pci-p2pdma.h | |
| 16242 | − | |
| 16243 | 16254 | PCI MSI DRIVER FOR ALTERA MSI IP |
| 16244 | 16255 | M: Joyce Ooi <joyce.ooi@intel.com> |
| 16245 | 16256 | L: linux-pci@vger.kernel.org |
| @@ -16270,6 +16281,19 @@ F: drivers/pci/controller/ · 24 unmodified lines | ||
| 16270 | 16281 | F: drivers/pci/pci-bridge-emul.c |
| 16271 | 16282 | F: drivers/pci/pci-bridge-emul.h |
| 16272 | 16283 | |
| 16284 | +PCI PEER-TO-PEER DMA (P2PDMA) | |
| 16285 | +M: Bjorn Helgaas <bhelgaas@google.com> | |
| 16286 | +M: Logan Gunthorpe <logang@deltatee.com> | |
| 16287 | +L: linux-pci@vger.kernel.org | |
| 16288 | +S: Supported | |
| 16289 | +Q: https://patchwork.kernel.org/project/linux-pci/list/ | |
| 16290 | +B: https://bugzilla.kernel.org | |
| 16291 | +C: irc://irc.oftc.net/linux-pci | |
| 16292 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git | |
| 16293 | +F: Documentation/driver-api/pci/p2pdma.rst | |
| 16294 | +F: drivers/pci/p2pdma.c | |
| 16295 | +F: include/linux/pci-p2pdma.h | |
| 16296 | + | |
| 16273 | 16297 | PCI SUBSYSTEM |
| 16274 | 16298 | M: Bjorn Helgaas <bhelgaas@google.com> |
| 16275 | 16299 | L: linux-pci@vger.kernel.org |
| @@ -16378,14 +16402,6 @@ L: linux-arm-msm@vger.kernel.org · 102 unmodified lines | ||
| 16378 | 16402 | S: Maintained |
| 16379 | 16403 | F: drivers/pci/controller/dwc/pcie-qcom.c |
| 16380 | 16404 | |
| 16381 | −PCIE ENDPOINT DRIVER FOR QUALCOMM | |
| 16382 | −M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | |
| 16383 | −L: linux-pci@vger.kernel.org | |
| 16384 | −L: linux-arm-msm@vger.kernel.org | |
| 16385 | −S: Maintained | |
| 16386 | −F: Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | |
| 16387 | −F: drivers/pci/controller/dwc/pcie-qcom-ep.c | |
| 16388 | − | |
| 16389 | 16405 | PCIE DRIVER FOR ROCKCHIP |
| 16390 | 16406 | M: Shawn Lin <shawn.lin@rock-chips.com> |
| 16391 | 16407 | L: linux-pci@vger.kernel.org |
| @@ -16407,13 +16423,13 @@ L: linux-pci@vger.kernel.org · 15 unmodified lines | ||
| 16407 | 16423 | S: Maintained |
| 16408 | 16424 | F: drivers/pci/controller/dwc/*spear* |
| 16409 | 16425 | |
| 16410 | −PCI DRIVER FOR XILINX VERSAL CPM | |
| 16411 | −M: Bharat Kumar Gogada <bharat.kumar.gogada@amd.com> | |
| 16412 | −M: Michal Simek <michal.simek@amd.com> | |
| 16426 | +PCIE ENDPOINT DRIVER FOR QUALCOMM | |
| 16427 | +M: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | |
| 16413 | 16428 | L: linux-pci@vger.kernel.org |
| 16429 | +L: linux-arm-msm@vger.kernel.org | |
| 16414 | 16430 | S: Maintained |
| 16415 | −F: Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml | |
| 16416 | −F: drivers/pci/controller/pcie-xilinx-cpm.c | |
| 16431 | +F: Documentation/devicetree/bindings/pci/qcom,pcie-ep.yaml | |
| 16432 | +F: drivers/pci/controller/dwc/pcie-qcom-ep.c | |
| 16417 | 16433 | |
| 16418 | 16434 | PCMCIA SUBSYSTEM |
| 16419 | 16435 | M: Dominik Brodowski <linux@dominikbrodowski.net> |
| @@ -16683,9 +16699,9 @@ R: Alim Akhtar <alim.akhtar@samsung.com> · 263 unmodified lines | ||
| 16683 | 16699 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
| 16684 | 16700 | L: linux-samsung-soc@vger.kernel.org |
| 16685 | 16701 | S: Maintained |
| 16686 | −C: irc://irc.libera.chat/linux-exynos | |
| 16687 | 16702 | Q: https://patchwork.kernel.org/project/linux-samsung-soc/list/ |
| 16688 | 16703 | B: mailto:linux-samsung-soc@vger.kernel.org |
| 16704 | +C: irc://irc.libera.chat/linux-exynos | |
| 16689 | 16705 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung.git |
| 16690 | 16706 | F: Documentation/devicetree/bindings/pinctrl/samsung,pinctrl*yaml |
| 16691 | 16707 | F: drivers/pinctrl/samsung/ |
| @@ -16747,13 +16763,6 @@ M: Logan Gunthorpe <logang@deltatee.com> · 55 unmodified lines | ||
| 16747 | 16763 | S: Maintained |
| 16748 | 16764 | F: drivers/dma/plx_dma.c |
| 16749 | 16765 | |
| 16750 | −PM6764TR DRIVER | |
| 16751 | −M: Charles Hsu <hsu.yungteng@gmail.com> | |
| 16752 | −L: linux-hwmon@vger.kernel.org | |
| 16753 | −S: Maintained | |
| 16754 | −F: Documentation/hwmon/pm6764tr.rst | |
| 16755 | −F: drivers/hwmon/pmbus/pm6764tr.c | |
| 16756 | − | |
| 16757 | 16766 | PM-GRAPH UTILITY |
| 16758 | 16767 | M: "Todd E Brandt" <todd.e.brandt@linux.intel.com> |
| 16759 | 16768 | L: linux-pm@vger.kernel.org |
| @@ -16763,6 +16772,13 @@ B: https://bugzilla.kernel.org/buglist.cgi?component=pm-graph&product=Tools · 3 unmodified lines | ||
| 16763 | 16772 | T: git git://github.com/intel/pm-graph |
| 16764 | 16773 | F: tools/power/pm-graph |
| 16765 | 16774 | |
| 16775 | +PM6764TR DRIVER | |
| 16776 | +M: Charles Hsu <hsu.yungteng@gmail.com> | |
| 16777 | +L: linux-hwmon@vger.kernel.org | |
| 16778 | +S: Maintained | |
| 16779 | +F: Documentation/hwmon/pm6764tr.rst | |
| 16780 | +F: drivers/hwmon/pmbus/pm6764tr.c | |
| 16781 | + | |
| 16766 | 16782 | PMBUS HARDWARE MONITORING DRIVERS |
| 16767 | 16783 | M: Guenter Roeck <linux@roeck-us.net> |
| 16768 | 16784 | L: linux-hwmon@vger.kernel.org |
| @@ -16843,15 +16859,6 @@ F: include/linux/pm_* · 74 unmodified lines | ||
| 16843 | 16859 | F: include/linux/powercap.h |
| 16844 | 16860 | F: kernel/configs/nopm.config |
| 16845 | 16861 | |
| 16846 | −DYNAMIC THERMAL POWER MANAGEMENT (DTPM) | |
| 16847 | −M: Daniel Lezcano <daniel.lezcano@kernel.org> | |
| 16848 | −L: linux-pm@vger.kernel.org | |
| 16849 | −S: Supported | |
| 16850 | −B: https://bugzilla.kernel.org | |
| 16851 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm | |
| 16852 | −F: drivers/powercap/dtpm* | |
| 16853 | −F: include/linux/dtpm.h | |
| 16854 | − | |
| 16855 | 16862 | POWER STATE COORDINATION INTERFACE (PSCI) |
| 16856 | 16863 | M: Mark Rutland <mark.rutland@arm.com> |
| 16857 | 16864 | M: Lorenzo Pieralisi <lpieralisi@kernel.org> |
| @@ -17010,8 +17017,8 @@ R: Guilherme G. Piccoli <gpiccoli@igalia.com> · 152 unmodified lines | ||
| 17010 | 17017 | L: linux-hardening@vger.kernel.org |
| 17011 | 17018 | S: Supported |
| 17012 | 17019 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore |
| 17013 | −F: Documentation/admin-guide/ramoops.rst | |
| 17014 | 17020 | F: Documentation/admin-guide/pstore-blk.rst |
| 17021 | +F: Documentation/admin-guide/ramoops.rst | |
| 17015 | 17022 | F: Documentation/devicetree/bindings/reserved-memory/ramoops.yaml |
| 17016 | 17023 | F: drivers/acpi/apei/erst.c |
| 17017 | 17024 | F: drivers/firmware/efi/efi-pstore.c |
| @@ -17160,10 +17167,10 @@ F: sound/soc/codecs/lpass-va-macro.c · 142 unmodified lines | ||
| 17160 | 17167 | F: sound/soc/codecs/lpass-wsa-macro.* |
| 17161 | 17168 | F: sound/soc/codecs/msm8916-wcd-analog.c |
| 17162 | 17169 | F: sound/soc/codecs/msm8916-wcd-digital.c |
| 17163 | −F: sound/soc/codecs/wcd9335.* | |
| 17164 | −F: sound/soc/codecs/wcd934x.c | |
| 17165 | 17170 | F: sound/soc/codecs/wcd-clsh-v2.* |
| 17166 | 17171 | F: sound/soc/codecs/wcd-mbhc-v2.* |
| 17172 | +F: sound/soc/codecs/wcd9335.* | |
| 17173 | +F: sound/soc/codecs/wcd934x.c | |
| 17167 | 17174 | F: sound/soc/codecs/wsa881x.c |
| 17168 | 17175 | F: sound/soc/codecs/wsa883x.c |
| 17169 | 17176 | F: sound/soc/qcom/ |
| @@ -17320,14 +17327,21 @@ Q: http://patchwork.linuxtv.org/project/linux-media/list/ · 150 unmodified lines | ||
| 17320 | 17327 | T: git git://linuxtv.org/anttip/media_tree.git |
| 17321 | 17328 | F: drivers/media/tuners/qt1010* |
| 17322 | 17329 | |
| 17330 | +QUALCOMM ATH12K WIRELESS DRIVER | |
| 17331 | +M: Kalle Valo <kvalo@kernel.org> | |
| 17332 | +L: ath12k@lists.infradead.org | |
| 17333 | +S: Supported | |
| 17334 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git | |
| 17335 | +F: drivers/net/wireless/ath/ath12k/ | |
| 17336 | + | |
| 17323 | 17337 | QUALCOMM ATHEROS ATH10K WIRELESS DRIVER |
| 17324 | 17338 | M: Kalle Valo <kvalo@kernel.org> |
| 17325 | 17339 | L: ath10k@lists.infradead.org |
| 17326 | 17340 | S: Supported |
| 17327 | 17341 | W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k |
| 17328 | 17342 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git |
| 17329 | −F: drivers/net/wireless/ath/ath10k/ | |
| 17330 | 17343 | F: Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml |
| 17344 | +F: drivers/net/wireless/ath/ath10k/ | |
| 17331 | 17345 | |
| 17332 | 17346 | QUALCOMM ATHEROS ATH11K WIRELESS DRIVER |
| 17333 | 17347 | M: Kalle Valo <kvalo@kernel.org> |
| @@ -17337,13 +17351,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git · 3 unmodified lines | ||
| 17337 | 17351 | F: Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml |
| 17338 | 17352 | F: drivers/net/wireless/ath/ath11k/ |
| 17339 | 17353 | |
| 17340 | −QUALCOMM ATH12K WIRELESS DRIVER | |
| 17341 | −M: Kalle Valo <kvalo@kernel.org> | |
| 17342 | −L: ath12k@lists.infradead.org | |
| 17343 | −S: Supported | |
| 17344 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git | |
| 17345 | −F: drivers/net/wireless/ath/ath12k/ | |
| 17346 | − | |
| 17347 | 17354 | QUALCOMM ATHEROS ATH9K WIRELESS DRIVER |
| 17348 | 17355 | M: Toke Høiland-Jørgensen <toke@toke.dk> |
| 17349 | 17356 | L: linux-wireless@vger.kernel.org |
| @@ -17440,8 +17447,8 @@ F: include/uapi/misc/fastrpc.h · 90 unmodified lines | ||
| 17440 | 17447 | QUALCOMM HEXAGON ARCHITECTURE |
| 17441 | 17448 | M: Brian Cain <bcain@quicinc.com> |
| 17442 | 17449 | L: linux-hexagon@vger.kernel.org |
| 17443 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git | |
| 17444 | 17450 | S: Supported |
| 17451 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux.git | |
| 17445 | 17452 | F: arch/hexagon/ |
| 17446 | 17453 | |
| 17447 | 17454 | QUALCOMM HIDMA DRIVER |
| @@ -17563,9 +17570,9 @@ M: Christian König <christian.koenig@amd.com> · 115 unmodified lines | ||
| 17563 | 17570 | M: Pan, Xinhui <Xinhui.Pan@amd.com> |
| 17564 | 17571 | L: amd-gfx@lists.freedesktop.org |
| 17565 | 17572 | S: Supported |
| 17566 | −T: git https://gitlab.freedesktop.org/agd5f/linux.git | |
| 17567 | 17573 | B: https://gitlab.freedesktop.org/drm/amd/-/issues |
| 17568 | 17574 | C: irc://irc.oftc.net/radeon |
| 17575 | +T: git https://gitlab.freedesktop.org/agd5f/linux.git | |
| 17569 | 17576 | F: Documentation/gpu/amdgpu/ |
| 17570 | 17577 | F: drivers/gpu/drm/amd/ |
| 17571 | 17578 | F: drivers/gpu/drm/radeon/ |
| @@ -17653,8 +17660,8 @@ F: arch/mips/generic/board-ranchu.c · 81 unmodified lines | ||
| 17653 | 17660 | RANDOM NUMBER DRIVER |
| 17654 | 17661 | M: "Theodore Ts'o" <tytso@mit.edu> |
| 17655 | 17662 | M: Jason A. Donenfeld <Jason@zx2c4.com> |
| 17656 | −T: git https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git | |
| 17657 | 17663 | S: Maintained |
| 17664 | +T: git https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git | |
| 17658 | 17665 | F: drivers/char/random.c |
| 17659 | 17666 | F: drivers/virt/vmgenid.c |
| 17660 | 17667 | |
| @@ -17688,8 +17695,8 @@ T: git git://linuxtv.org/media_tree.git · 27 unmodified lines | ||
| 17688 | 17695 | F: Documentation/driver-api/media/rc-core.rst |
| 17689 | 17696 | F: Documentation/userspace-api/media/rc/ |
| 17690 | 17697 | F: drivers/media/rc/ |
| 17691 | −F: include/media/rc-map.h | |
| 17692 | 17698 | F: include/media/rc-core.h |
| 17699 | +F: include/media/rc-map.h | |
| 17693 | 17700 | F: include/uapi/linux/lirc.h |
| 17694 | 17701 | |
| 17695 | 17702 | RCMM REMOTE CONTROLS DECODER |
| @@ -17806,6 +17813,14 @@ F: include/linux/rtc/ · 110 unmodified lines | ||
| 17806 | 17813 | F: include/uapi/linux/rtc.h |
| 17807 | 17814 | F: tools/testing/selftests/rtc/ |
| 17808 | 17815 | |
| 17816 | +Real-time Linux Analysis (RTLA) tools | |
| 17817 | +M: Daniel Bristot de Oliveira <bristot@kernel.org> | |
| 17818 | +M: Steven Rostedt <rostedt@goodmis.org> | |
| 17819 | +L: linux-trace-devel@vger.kernel.org | |
| 17820 | +S: Maintained | |
| 17821 | +F: Documentation/tools/rtla/ | |
| 17822 | +F: tools/tracing/rtla/ | |
| 17823 | + | |
| 17809 | 17824 | REALTEK AUDIO CODECS |
| 17810 | 17825 | M: Oder Chiou <oder_chiou@realtek.com> |
| 17811 | 17826 | S: Maintained |
| @@ -17929,6 +17944,14 @@ S: Maintained · 117 unmodified lines | ||
| 17929 | 17944 | F: Documentation/devicetree/bindings/sound/renesas,idt821034.yaml |
| 17930 | 17945 | F: sound/soc/codecs/idt821034.c |
| 17931 | 17946 | |
| 17947 | +RENESAS R-CAR GEN3 & RZ/N1 NAND CONTROLLER DRIVER | |
| 17948 | +M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 17949 | +L: linux-mtd@lists.infradead.org | |
| 17950 | +L: linux-renesas-soc@vger.kernel.org | |
| 17951 | +S: Maintained | |
| 17952 | +F: Documentation/devicetree/bindings/mtd/renesas-nandc.yaml | |
| 17953 | +F: drivers/mtd/nand/raw/renesas-nand-controller.c | |
| 17954 | + | |
| 17932 | 17955 | RENESAS R-CAR GYROADC DRIVER |
| 17933 | 17956 | M: Marek Vasut <marek.vasut@gmail.com> |
| 17934 | 17957 | L: linux-iio@vger.kernel.org |
| @@ -17947,9 +17970,9 @@ F: drivers/i2c/busses/i2c-sh_mobile.c · 12 unmodified lines | ||
| 17947 | 17970 | |
| 17948 | 17971 | RENESAS R-CAR SATA DRIVER |
| 17949 | 17972 | R: Sergey Shtylyov <s.shtylyov@omp.ru> |
| 17950 | −S: Supported | |
| 17951 | 17973 | L: linux-ide@vger.kernel.org |
| 17952 | 17974 | L: linux-renesas-soc@vger.kernel.org |
| 17975 | +S: Supported | |
| 17953 | 17976 | F: Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml |
| 17954 | 17977 | F: drivers/ata/sata_rcar.c |
| 17955 | 17978 | |
| @@ -17969,12 +17992,6 @@ S: Supported · 13 unmodified lines | ||
| 17969 | 17992 | F: Documentation/devicetree/bindings/i2c/renesas,riic.yaml |
| 17970 | 17993 | F: drivers/i2c/busses/i2c-riic.c |
| 17971 | 17994 | |
| 17972 | −RENESAS USB PHY DRIVER | |
| 17973 | −M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
| 17974 | −L: linux-renesas-soc@vger.kernel.org | |
| 17975 | −S: Maintained | |
| 17976 | −F: drivers/phy/renesas/phy-rcar-gen3-usb*.c | |
| 17977 | − | |
| 17978 | 17995 | RENESAS RZ/G2L A/D DRIVER |
| 17979 | 17996 | M: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> |
| 17980 | 17997 | L: linux-iio@vger.kernel.org |
| @@ -18020,13 +18037,11 @@ S: Maintained · 39 unmodified lines | ||
| 18020 | 18037 | F: Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml |
| 18021 | 18038 | F: drivers/usb/gadget/udc/renesas_usbf.c |
| 18022 | 18039 | |
| 18023 | −RENESAS R-CAR GEN3 & RZ/N1 NAND CONTROLLER DRIVER | |
| 18024 | −M: Miquel Raynal <miquel.raynal@bootlin.com> | |
| 18025 | −L: linux-mtd@lists.infradead.org | |
| 18040 | +RENESAS USB PHY DRIVER | |
| 18041 | +M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | |
| 18026 | 18042 | L: linux-renesas-soc@vger.kernel.org |
| 18027 | 18043 | S: Maintained |
| 18028 | −F: Documentation/devicetree/bindings/mtd/renesas-nandc.yaml | |
| 18029 | −F: drivers/mtd/nand/raw/renesas-nand-controller.c | |
| 18044 | +F: drivers/phy/renesas/phy-rcar-gen3-usb*.c | |
| 18030 | 18045 | |
| 18031 | 18046 | RENESAS VERSACLOCK 7 CLOCK DRIVER |
| 18032 | 18047 | M: Alex Helms <alexander.helms.jy@renesas.com> |
| @@ -18094,15 +18109,6 @@ S: Maintained · 61 unmodified lines | ||
| 18094 | 18109 | F: drivers/mtd/nand/raw/r852.c |
| 18095 | 18110 | F: drivers/mtd/nand/raw/r852.h |
| 18096 | 18111 | |
| 18097 | −RISC-V PMU DRIVERS | |
| 18098 | −M: Atish Patra <atishp@atishpatra.org> | |
| 18099 | −R: Anup Patel <anup@brainfault.org> | |
| 18100 | −L: linux-riscv@lists.infradead.org | |
| 18101 | −S: Supported | |
| 18102 | −F: drivers/perf/riscv_pmu.c | |
| 18103 | −F: drivers/perf/riscv_pmu_legacy.c | |
| 18104 | −F: drivers/perf/riscv_pmu_sbi.c | |
| 18105 | − | |
| 18106 | 18112 | RISC-V ARCHITECTURE |
| 18107 | 18113 | M: Paul Walmsley <paul.walmsley@sifive.com> |
| 18108 | 18114 | M: Palmer Dabbelt <palmer@dabbelt.com> |
| @@ -18155,6 +18161,15 @@ T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/ · 46 unmodified lines | ||
| 18155 | 18161 | F: Documentation/devicetree/bindings/riscv/ |
| 18156 | 18162 | F: arch/riscv/boot/dts/ |
| 18157 | 18163 | |
| 18164 | +RISC-V PMU DRIVERS | |
| 18165 | +M: Atish Patra <atishp@atishpatra.org> | |
| 18166 | +R: Anup Patel <anup@brainfault.org> | |
| 18167 | +L: linux-riscv@lists.infradead.org | |
| 18168 | +S: Supported | |
| 18169 | +F: drivers/perf/riscv_pmu.c | |
| 18170 | +F: drivers/perf/riscv_pmu_legacy.c | |
| 18171 | +F: drivers/perf/riscv_pmu_sbi.c | |
| 18172 | + | |
| 18158 | 18173 | RNBD BLOCK DRIVERS |
| 18159 | 18174 | M: Md. Haris Iqbal <haris.iqbal@ionos.com> |
| 18160 | 18175 | M: Jack Wang <jinpu.wang@ionos.com> |
| @@ -18459,14 +18474,6 @@ F: drivers/s390/net/*iucv* · 298 unmodified lines | ||
| 18459 | 18474 | F: include/net/iucv/ |
| 18460 | 18475 | F: net/iucv/ |
| 18461 | 18476 | |
| 18462 | −S390 NETWORK DRIVERS | |
| 18463 | −M: Alexandra Winter <wintera@linux.ibm.com> | |
| 18464 | −M: Wenjia Zhang <wenjia@linux.ibm.com> | |
| 18465 | −L: linux-s390@vger.kernel.org | |
| 18466 | −L: netdev@vger.kernel.org | |
| 18467 | −S: Supported | |
| 18468 | −F: drivers/s390/net/ | |
| 18469 | − | |
| 18470 | 18477 | S390 MM |
| 18471 | 18478 | M: Alexander Gordeev <agordeev@linux.ibm.com> |
| 18472 | 18479 | M: Gerald Schaefer <gerald.schaefer@linux.ibm.com> |
| @@ -18476,14 +18483,22 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git · 3 unmodified lines | ||
| 18476 | 18483 | F: arch/s390/include/asm/pgtable.h |
| 18477 | 18484 | F: arch/s390/mm |
| 18478 | 18485 | |
| 18486 | +S390 NETWORK DRIVERS | |
| 18487 | +M: Alexandra Winter <wintera@linux.ibm.com> | |
| 18488 | +M: Wenjia Zhang <wenjia@linux.ibm.com> | |
| 18489 | +L: linux-s390@vger.kernel.org | |
| 18490 | +L: netdev@vger.kernel.org | |
| 18491 | +S: Supported | |
| 18492 | +F: drivers/s390/net/ | |
| 18493 | + | |
| 18479 | 18494 | S390 PCI SUBSYSTEM |
| 18480 | 18495 | M: Niklas Schnelle <schnelle@linux.ibm.com> |
| 18481 | 18496 | M: Gerald Schaefer <gerald.schaefer@linux.ibm.com> |
| 18482 | 18497 | L: linux-s390@vger.kernel.org |
| 18483 | 18498 | S: Supported |
| 18499 | +F: Documentation/s390/pci.rst | |
| 18484 | 18500 | F: arch/s390/pci/ |
| 18485 | 18501 | F: drivers/pci/hotplug/s390_pci_hpc.c |
| 18486 | −F: Documentation/s390/pci.rst | |
| 18487 | 18502 | |
| 18488 | 18503 | S390 SCM DRIVER |
| 18489 | 18504 | M: Vineeth Vijayan <vneethv@linux.ibm.com> |
| @@ -18916,6 +18931,13 @@ L: linux-mmc@vger.kernel.org · 426 unmodified lines | ||
| 18916 | 18931 | S: Supported |
| 18917 | 18932 | F: drivers/mmc/host/sdhci-of-at91.c |
| 18918 | 18933 | |
| 18934 | +SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) NXP i.MX DRIVER | |
| 18935 | +M: Haibo Chen <haibo.chen@nxp.com> | |
| 18936 | +L: linux-imx@nxp.com | |
| 18937 | +L: linux-mmc@vger.kernel.org | |
| 18938 | +S: Maintained | |
| 18939 | +F: drivers/mmc/host/sdhci-esdhc-imx.c | |
| 18940 | + | |
| 18919 | 18941 | SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER |
| 18920 | 18942 | M: Ben Dooks <ben-linux@fluff.org> |
| 18921 | 18943 | M: Jaehoon Chung <jh80.chung@samsung.com> |
| @@ -18935,13 +18957,6 @@ L: linux-mmc@vger.kernel.org · 13 unmodified lines | ||
| 18935 | 18957 | S: Maintained |
| 18936 | 18958 | F: drivers/mmc/host/sdhci-omap.c |
| 18937 | 18959 | |
| 18938 | −SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) NXP i.MX DRIVER | |
| 18939 | −M: Haibo Chen <haibo.chen@nxp.com> | |
| 18940 | −L: linux-imx@nxp.com | |
| 18941 | −L: linux-mmc@vger.kernel.org | |
| 18942 | −S: Maintained | |
| 18943 | −F: drivers/mmc/host/sdhci-esdhc-imx.c | |
| 18944 | − | |
| 18945 | 18960 | SECURE ENCRYPTING DEVICE (SED) OPAL DRIVER |
| 18946 | 18961 | M: Jonathan Derrick <jonathan.derrick@linux.dev> |
| 18947 | 18962 | L: linux-block@vger.kernel.org |
| @@ -18951,6 +18966,15 @@ F: block/sed* · 3 unmodified lines | ||
| 18951 | 18966 | F: include/linux/sed* |
| 18952 | 18967 | F: include/uapi/linux/sed* |
| 18953 | 18968 | |
| 18969 | +SECURE MONITOR CALL(SMC) CALLING CONVENTION (SMCCC) | |
| 18970 | +M: Mark Rutland <mark.rutland@arm.com> | |
| 18971 | +M: Lorenzo Pieralisi <lpieralisi@kernel.org> | |
| 18972 | +M: Sudeep Holla <sudeep.holla@arm.com> | |
| 18973 | +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 18974 | +S: Maintained | |
| 18975 | +F: drivers/firmware/smccc/ | |
| 18976 | +F: include/linux/arm-smccc.h | |
| 18977 | + | |
| 18954 | 18978 | SECURITY CONTACT |
| 18955 | 18979 | M: Security Officers <security@kernel.org> |
| 18956 | 18980 | S: Supported |
| @@ -19400,15 +19424,6 @@ M: Nicolas Pitre <nico@fluxnic.net> · 443 unmodified lines | ||
| 19400 | 19424 | S: Odd Fixes |
| 19401 | 19425 | F: drivers/net/ethernet/smsc/smc91x.* |
| 19402 | 19426 | |
| 19403 | −SECURE MONITOR CALL(SMC) CALLING CONVENTION (SMCCC) | |
| 19404 | −M: Mark Rutland <mark.rutland@arm.com> | |
| 19405 | −M: Lorenzo Pieralisi <lpieralisi@kernel.org> | |
| 19406 | −M: Sudeep Holla <sudeep.holla@arm.com> | |
| 19407 | −L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | |
| 19408 | −S: Maintained | |
| 19409 | −F: drivers/firmware/smccc/ | |
| 19410 | −F: include/linux/arm-smccc.h | |
| 19411 | − | |
| 19412 | 19427 | SMM665 HARDWARE MONITOR DRIVER |
| 19413 | 19428 | M: Guenter Roeck <linux@roeck-us.net> |
| 19414 | 19429 | L: linux-hwmon@vger.kernel.org |
| @@ -19456,6 +19471,10 @@ L: netdev@vger.kernel.org · 41 unmodified lines | ||
| 19456 | 19471 | S: Maintained |
| 19457 | 19472 | F: drivers/net/ethernet/smsc/smsc9420.* |
| 19458 | 19473 | |
| 19474 | +SNET DPU VIRTIO DATA PATH ACCELERATOR | |
| 19475 | +R: Alvaro Karsz <alvaro.karsz@solid-run.com> | |
| 19476 | +F: drivers/vdpa/solidrun/ | |
| 19477 | + | |
| 19459 | 19478 | SOCIONEXT (SNI) AVE NETWORK DRIVER |
| 19460 | 19479 | M: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> |
| 19461 | 19480 | L: netdev@vger.kernel.org |
| @@ -19725,6 +19744,13 @@ F: include/uapi/sound/ · 263 unmodified lines | ||
| 19725 | 19744 | F: sound/ |
| 19726 | 19745 | F: tools/testing/selftests/alsa |
| 19727 | 19746 | |
| 19747 | +SOUND - ALSA SELFTESTS | |
| 19748 | +M: Mark Brown <broonie@kernel.org> | |
| 19749 | +L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 19750 | +L: linux-kselftest@vger.kernel.org | |
| 19751 | +S: Supported | |
| 19752 | +F: tools/testing/selftests/alsa | |
| 19753 | + | |
| 19728 | 19754 | SOUND - COMPRESSED AUDIO |
| 19729 | 19755 | M: Vinod Koul <vkoul@kernel.org> |
| 19730 | 19756 | L: alsa-devel@alsa-project.org (moderated for non-subscribers) |
| @@ -19743,13 +19769,6 @@ F: include/sound/dmaengine_pcm.h · 12 unmodified lines | ||
| 19743 | 19769 | F: sound/core/pcm_dmaengine.c |
| 19744 | 19770 | F: sound/soc/soc-generic-dmaengine-pcm.c |
| 19745 | 19771 | |
| 19746 | −SOUND - ALSA SELFTESTS | |
| 19747 | −M: Mark Brown <broonie@kernel.org> | |
| 19748 | −L: alsa-devel@alsa-project.org (moderated for non-subscribers) | |
| 19749 | −L: linux-kselftest@vger.kernel.org | |
| 19750 | −S: Supported | |
| 19751 | −F: tools/testing/selftests/alsa | |
| 19752 | − | |
| 19753 | 19772 | SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEMENT (ASoC) |
| 19754 | 19773 | M: Liam Girdwood <lgirdwood@gmail.com> |
| 19755 | 19774 | M: Mark Brown <broonie@kernel.org> |
| @@ -19769,8 +19788,8 @@ M: Liam Girdwood <lgirdwood@gmail.com> · 13 unmodified lines | ||
| 19769 | 19788 | M: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> |
| 19770 | 19789 | M: Bard Liao <yung-chuan.liao@linux.intel.com> |
| 19771 | 19790 | M: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> |
| 19772 | −R: Kai Vehmanen <kai.vehmanen@linux.intel.com> | |
| 19773 | 19791 | M: Daniel Baluta <daniel.baluta@nxp.com> |
| 19792 | +R: Kai Vehmanen <kai.vehmanen@linux.intel.com> | |
| 19774 | 19793 | L: sound-open-firmware@alsa-project.org (moderated for non-subscribers) |
| 19775 | 19794 | S: Supported |
| 19776 | 19795 | W: https://github.com/thesofproject/linux/ |
| @@ -19832,9 +19851,9 @@ M: "Luc Van Oostenryck" <luc.vanoostenryck@gmail.com> · 55 unmodified lines | ||
| 19832 | 19851 | L: linux-sparse@vger.kernel.org |
| 19833 | 19852 | S: Maintained |
| 19834 | 19853 | W: https://sparse.docs.kernel.org/ |
| 19835 | −T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git | |
| 19836 | 19854 | Q: https://patchwork.kernel.org/project/linux-sparse/list/ |
| 19837 | 19855 | B: https://bugzilla.kernel.org/enter_bug.cgi?component=Sparse&product=Tools |
| 19856 | +T: git git://git.kernel.org/pub/scm/devel/sparse/sparse.git | |
| 19838 | 19857 | F: include/linux/compiler.h |
| 19839 | 19858 | |
| 19840 | 19859 | SPEAKUP CONSOLE SPEECH DRIVER |
| @@ -20203,6 +20222,11 @@ W: http://www.stlinux.com · 362 unmodified lines | ||
| 20203 | 20222 | F: Documentation/networking/device_drivers/ethernet/stmicro/ |
| 20204 | 20223 | F: drivers/net/ethernet/stmicro/stmmac/ |
| 20205 | 20224 | |
| 20225 | +SUN HAPPY MEAL ETHERNET DRIVER | |
| 20226 | +M: Sean Anderson <seanga2@gmail.com> | |
| 20227 | +S: Maintained | |
| 20228 | +F: drivers/net/ethernet/sun/sunhme.* | |
| 20229 | + | |
| 20206 | 20230 | SUN3/3X |
| 20207 | 20231 | M: Sam Creasey <sammy@sammy.net> |
| 20208 | 20232 | S: Maintained |
| @@ -20225,11 +20249,6 @@ L: netdev@vger.kernel.org · 16 unmodified lines | ||
| 20225 | 20249 | S: Maintained |
| 20226 | 20250 | F: drivers/net/ethernet/dlink/sundance.c |
| 20227 | 20251 | |
| 20228 | −SUN HAPPY MEAL ETHERNET DRIVER | |
| 20229 | −M: Sean Anderson <seanga2@gmail.com> | |
| 20230 | −S: Maintained | |
| 20231 | −F: drivers/net/ethernet/sun/sunhme.* | |
| 20232 | − | |
| 20233 | 20252 | SUNPLUS ETHERNET DRIVER |
| 20234 | 20253 | M: Wells Lu <wellslutw@gmail.com> |
| 20235 | 20254 | L: netdev@vger.kernel.org |
| @@ -20251,15 +20270,6 @@ S: Maintained · 15 unmodified lines | ||
| 20251 | 20270 | F: Documentation/devicetree/bindings/nvmem/sunplus,sp7021-ocotp.yaml |
| 20252 | 20271 | F: drivers/nvmem/sunplus-ocotp.c |
| 20253 | 20272 | |
| 20254 | −SUNPLUS USB2 PHY DRIVER | |
| 20255 | −M: Vincent Shih <vincent.sunplus@gmail.com> | |
| 20256 | −L: linux-usb@vger.kernel.org | |
| 20257 | −S: Maintained | |
| 20258 | −F: Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml | |
| 20259 | −F: drivers/phy/sunplus/Kconfig | |
| 20260 | −F: drivers/phy/sunplus/Makefile | |
| 20261 | −F: drivers/phy/sunplus/phy-sunplus-usb2.c | |
| 20262 | − | |
| 20263 | 20273 | SUNPLUS PWM DRIVER |
| 20264 | 20274 | M: Hammer Hsieh <hammerh0314@gmail.com> |
| 20265 | 20275 | S: Maintained |
| @@ -20286,6 +20296,15 @@ S: Maintained · 20 unmodified lines | ||
| 20286 | 20296 | F: Documentation/devicetree/bindings/serial/sunplus,sp7021-uart.yaml |
| 20287 | 20297 | F: drivers/tty/serial/sunplus-uart.c |
| 20288 | 20298 | |
| 20299 | +SUNPLUS USB2 PHY DRIVER | |
| 20300 | +M: Vincent Shih <vincent.sunplus@gmail.com> | |
| 20301 | +L: linux-usb@vger.kernel.org | |
| 20302 | +S: Maintained | |
| 20303 | +F: Documentation/devicetree/bindings/phy/sunplus,sp7021-usb2-phy.yaml | |
| 20304 | +F: drivers/phy/sunplus/Kconfig | |
| 20305 | +F: drivers/phy/sunplus/Makefile | |
| 20306 | +F: drivers/phy/sunplus/phy-sunplus-usb2.c | |
| 20307 | + | |
| 20289 | 20308 | SUNPLUS WATCHDOG DRIVER |
| 20290 | 20309 | M: Xiantao Hu <xt.hu@cqplus1.com> |
| 20291 | 20310 | L: linux-watchdog@vger.kernel.org |
| @@ -20697,6 +20716,14 @@ F: include/linux/if_team.h · 405 unmodified lines | ||
| 20697 | 20716 | F: include/uapi/linux/if_team.h |
| 20698 | 20717 | F: tools/testing/selftests/drivers/net/team/ |
| 20699 | 20718 | |
| 20719 | +TECHNICAL ADVISORY BOARD PROCESS DOCS | |
| 20720 | +M: "Theodore Ts'o" <tytso@mit.edu> | |
| 20721 | +M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
| 20722 | +L: tech-board-discuss@lists.linux-foundation.org | |
| 20723 | +S: Maintained | |
| 20724 | +F: Documentation/process/contribution-maturity-model.rst | |
| 20725 | +F: Documentation/process/researcher-guidelines.rst | |
| 20726 | + | |
| 20700 | 20727 | TECHNOLOGIC SYSTEMS TS-5500 PLATFORM SUPPORT |
| 20701 | 20728 | M: "Savoir-faire Linux Inc." <kernel@savoirfairelinux.com> |
| 20702 | 20729 | S: Maintained |
| @@ -20776,6 +20803,14 @@ M: Thierry Reding <thierry.reding@gmail.com> · 73 unmodified lines | ||
| 20776 | 20803 | S: Supported |
| 20777 | 20804 | F: drivers/pwm/pwm-tegra.c |
| 20778 | 20805 | |
| 20806 | +TEGRA QUAD SPI DRIVER | |
| 20807 | +M: Thierry Reding <thierry.reding@gmail.com> | |
| 20808 | +M: Jonathan Hunter <jonathanh@nvidia.com> | |
| 20809 | +M: Sowjanya Komatineni <skomatineni@nvidia.com> | |
| 20810 | +L: linux-tegra@vger.kernel.org | |
| 20811 | +S: Maintained | |
| 20812 | +F: drivers/spi/spi-tegra210-quad.c | |
| 20813 | + | |
| 20779 | 20814 | TEGRA SERIAL DRIVER |
| 20780 | 20815 | M: Laxman Dewangan <ldewangan@nvidia.com> |
| 20781 | 20816 | S: Supported |
| @@ -20786,14 +20821,6 @@ M: Laxman Dewangan <ldewangan@nvidia.com> · 4 unmodified lines | ||
| 20786 | 20821 | S: Supported |
| 20787 | 20822 | F: drivers/spi/spi-tegra* |
| 20788 | 20823 | |
| 20789 | −TEGRA QUAD SPI DRIVER | |
| 20790 | −M: Thierry Reding <thierry.reding@gmail.com> | |
| 20791 | −M: Jonathan Hunter <jonathanh@nvidia.com> | |
| 20792 | −M: Sowjanya Komatineni <skomatineni@nvidia.com> | |
| 20793 | −L: linux-tegra@vger.kernel.org | |
| 20794 | −S: Maintained | |
| 20795 | −F: drivers/spi/spi-tegra210-quad.c | |
| 20796 | − | |
| 20797 | 20824 | TEGRA VIDEO DRIVER |
| 20798 | 20825 | M: Thierry Reding <thierry.reding@gmail.com> |
| 20799 | 20826 | M: Jonathan Hunter <jonathanh@nvidia.com> |
| @@ -20842,13 +20869,6 @@ S: Maintained · 42 unmodified lines | ||
| 20842 | 20869 | F: Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml |
| 20843 | 20870 | F: sound/soc/ti/ |
| 20844 | 20871 | |
| 20845 | −TEXAS INSTRUMENTS' DAC7612 DAC DRIVER | |
| 20846 | −M: Ricardo Ribalda <ribalda@kernel.org> | |
| 20847 | −L: linux-iio@vger.kernel.org | |
| 20848 | −S: Supported | |
| 20849 | −F: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml | |
| 20850 | −F: drivers/iio/dac/ti-dac7612.c | |
| 20851 | − | |
| 20852 | 20872 | TEXAS INSTRUMENTS DMA DRIVERS |
| 20853 | 20873 | M: Peter Ujfalusi <peter.ujfalusi@gmail.com> |
| 20854 | 20874 | L: dmaengine@vger.kernel.org |
| @@ -20857,10 +20877,26 @@ F: Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt · 2 unmodified lines | ||
| 20857 | 20877 | F: Documentation/devicetree/bindings/dma/ti-edma.txt |
| 20858 | 20878 | F: Documentation/devicetree/bindings/dma/ti/ |
| 20859 | 20879 | F: drivers/dma/ti/ |
| 20860 | −X: drivers/dma/ti/cppi41.c | |
| 20880 | +F: include/linux/dma/k3-psil.h | |
| 20861 | 20881 | F: include/linux/dma/k3-udma-glue.h |
| 20862 | 20882 | F: include/linux/dma/ti-cppi5.h |
| 20863 | −F: include/linux/dma/k3-psil.h | |
| 20883 | +X: drivers/dma/ti/cppi41.c | |
| 20884 | + | |
| 20885 | +TEXAS INSTRUMENTS TPS23861 PoE PSE DRIVER | |
| 20886 | +M: Robert Marko <robert.marko@sartura.hr> | |
| 20887 | +M: Luka Perkov <luka.perkov@sartura.hr> | |
| 20888 | +L: linux-hwmon@vger.kernel.org | |
| 20889 | +S: Maintained | |
| 20890 | +F: Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml | |
| 20891 | +F: Documentation/hwmon/tps23861.rst | |
| 20892 | +F: drivers/hwmon/tps23861.c | |
| 20893 | + | |
| 20894 | +TEXAS INSTRUMENTS' DAC7612 DAC DRIVER | |
| 20895 | +M: Ricardo Ribalda <ribalda@kernel.org> | |
| 20896 | +L: linux-iio@vger.kernel.org | |
| 20897 | +S: Supported | |
| 20898 | +F: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml | |
| 20899 | +F: drivers/iio/dac/ti-dac7612.c | |
| 20864 | 20900 | |
| 20865 | 20901 | TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER |
| 20866 | 20902 | M: Nishanth Menon <nm@ti.com> |
| @@ -20886,15 +20922,6 @@ F: include/dt-bindings/soc/ti,sci_pm_domain.h · 19 unmodified lines | ||
| 20886 | 20922 | F: include/linux/soc/ti/ti_sci_inta_msi.h |
| 20887 | 20923 | F: include/linux/soc/ti/ti_sci_protocol.h |
| 20888 | 20924 | |
| 20889 | −TEXAS INSTRUMENTS TPS23861 PoE PSE DRIVER | |
| 20890 | −M: Robert Marko <robert.marko@sartura.hr> | |
| 20891 | −M: Luka Perkov <luka.perkov@sartura.hr> | |
| 20892 | −L: linux-hwmon@vger.kernel.org | |
| 20893 | −S: Maintained | |
| 20894 | −F: Documentation/devicetree/bindings/hwmon/ti,tps23861.yaml | |
| 20895 | −F: Documentation/hwmon/tps23861.rst | |
| 20896 | −F: drivers/hwmon/tps23861.c | |
| 20897 | − | |
| 20898 | 20925 | TEXAS INSTRUMENTS' TMP117 TEMPERATURE SENSOR DRIVER |
| 20899 | 20926 | M: Puranjay Mohan <puranjay12@gmail.com> |
| 20900 | 20927 | L: linux-iio@vger.kernel.org |
| @@ -21371,8 +21398,8 @@ M: Steven Rostedt <rostedt@goodmis.org> · 470 unmodified lines | ||
| 21371 | 21398 | M: Masami Hiramatsu <mhiramat@kernel.org> |
| 21372 | 21399 | L: linux-kernel@vger.kernel.org |
| 21373 | 21400 | L: linux-trace-kernel@vger.kernel.org |
| 21374 | −Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 21375 | 21401 | S: Maintained |
| 21402 | +Q: https://patchwork.kernel.org/project/linux-trace-kernel/list/ | |
| 21376 | 21403 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git |
| 21377 | 21404 | F: Documentation/trace/* |
| 21378 | 21405 | F: fs/tracefs/ |
| @@ -21400,31 +21427,15 @@ TRACING OS NOISE / LATENCY TRACERS · 21 unmodified lines | ||
| 21400 | 21427 | M: Steven Rostedt <rostedt@goodmis.org> |
| 21401 | 21428 | M: Daniel Bristot de Oliveira <bristot@kernel.org> |
| 21402 | 21429 | S: Maintained |
| 21403 | −F: kernel/trace/trace_osnoise.c | |
| 21430 | +F: Documentation/trace/hwlat_detector.rst | |
| 21431 | +F: Documentation/trace/osnoise-tracer.rst | |
| 21432 | +F: Documentation/trace/timerlat-tracer.rst | |
| 21433 | +F: arch/*/kernel/trace.c | |
| 21404 | 21434 | F: include/trace/events/osnoise.h |
| 21405 | 21435 | F: kernel/trace/trace_hwlat.c |
| 21406 | 21436 | F: kernel/trace/trace_irqsoff.c |
| 21437 | +F: kernel/trace/trace_osnoise.c | |
| 21407 | 21438 | F: kernel/trace/trace_sched_wakeup.c |
| 21408 | −F: Documentation/trace/osnoise-tracer.rst | |
| 21409 | −F: Documentation/trace/timerlat-tracer.rst | |
| 21410 | −F: Documentation/trace/hwlat_detector.rst | |
| 21411 | −F: arch/*/kernel/trace.c | |
| 21412 | − | |
| 21413 | −Real-time Linux Analysis (RTLA) tools | |
| 21414 | −M: Daniel Bristot de Oliveira <bristot@kernel.org> | |
| 21415 | −M: Steven Rostedt <rostedt@goodmis.org> | |
| 21416 | −L: linux-trace-devel@vger.kernel.org | |
| 21417 | −S: Maintained | |
| 21418 | −F: Documentation/tools/rtla/ | |
| 21419 | −F: tools/tracing/rtla/ | |
| 21420 | − | |
| 21421 | −TECHNICAL ADVISORY BOARD PROCESS DOCS | |
| 21422 | −M: "Theodore Ts'o" <tytso@mit.edu> | |
| 21423 | −M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
| 21424 | −L: tech-board-discuss@lists.linux-foundation.org | |
| 21425 | −S: Maintained | |
| 21426 | −F: Documentation/process/researcher-guidelines.rst | |
| 21427 | −F: Documentation/process/contribution-maturity-model.rst | |
| 21428 | 21439 | |
| 21429 | 21440 | TRADITIONAL CHINESE DOCUMENTATION |
| 21430 | 21441 | M: Hu Haowen <src.res@email.cn> |
| @@ -21782,8 +21793,8 @@ USB ISP1760 DRIVER · 351 unmodified lines | ||
| 21782 | 21793 | M: Rui Miguel Silva <rui.silva@linaro.org> |
| 21783 | 21794 | L: linux-usb@vger.kernel.org |
| 21784 | 21795 | S: Maintained |
| 21785 | −F: drivers/usb/isp1760/* | |
| 21786 | 21796 | F: Documentation/devicetree/bindings/usb/nxp,isp1760.yaml |
| 21797 | +F: drivers/usb/isp1760/* | |
| 21787 | 21798 | |
| 21788 | 21799 | USB LAN78XX ETHERNET DRIVER |
| 21789 | 21800 | M: Woojung Huh <woojung.huh@microchip.com> |
| @@ -21854,6 +21865,13 @@ L: linux-usb@vger.kernel.org · 64 unmodified lines | ||
| 21854 | 21865 | S: Supported |
| 21855 | 21866 | F: drivers/usb/class/usblp.c |
| 21856 | 21867 | |
| 21868 | +USB QMI WWAN NETWORK DRIVER | |
| 21869 | +M: Bjørn Mork <bjorn@mork.no> | |
| 21870 | +L: netdev@vger.kernel.org | |
| 21871 | +S: Maintained | |
| 21872 | +F: Documentation/ABI/testing/sysfs-class-net-qmi | |
| 21873 | +F: drivers/net/usb/qmi_wwan.c | |
| 21874 | + | |
| 21857 | 21875 | USB RAW GADGET DRIVER |
| 21858 | 21876 | R: Andrey Konovalov <andreyknvl@gmail.com> |
| 21859 | 21877 | L: linux-usb@vger.kernel.org |
| @@ -21862,13 +21880,6 @@ F: Documentation/usb/raw-gadget.rst · 2 unmodified lines | ||
| 21862 | 21880 | F: drivers/usb/gadget/legacy/raw_gadget.c |
| 21863 | 21881 | F: include/uapi/linux/usb/raw_gadget.h |
| 21864 | 21882 | |
| 21865 | −USB QMI WWAN NETWORK DRIVER | |
| 21866 | −M: Bjørn Mork <bjorn@mork.no> | |
| 21867 | −L: netdev@vger.kernel.org | |
| 21868 | −S: Maintained | |
| 21869 | −F: Documentation/ABI/testing/sysfs-class-net-qmi | |
| 21870 | −F: drivers/net/usb/qmi_wwan.c | |
| 21871 | − | |
| 21872 | 21883 | USB RTL8150 DRIVER |
| 21873 | 21884 | M: Petko Manolov <petkan@nucleusys.com> |
| 21874 | 21885 | L: linux-usb@vger.kernel.org |
| @@ -22120,6 +22131,12 @@ F: drivers/vfio/mdev/ · 245 unmodified lines | ||
| 22120 | 22131 | F: include/linux/mdev.h |
| 22121 | 22132 | F: samples/vfio-mdev/ |
| 22122 | 22133 | |
| 22134 | +VFIO MLX5 PCI DRIVER | |
| 22135 | +M: Yishai Hadas <yishaih@nvidia.com> | |
| 22136 | +L: kvm@vger.kernel.org | |
| 22137 | +S: Maintained | |
| 22138 | +F: drivers/vfio/pci/mlx5/ | |
| 22139 | + | |
| 22123 | 22140 | VFIO PCI DEVICE SPECIFIC DRIVERS |
| 22124 | 22141 | R: Jason Gunthorpe <jgg@nvidia.com> |
| 22125 | 22142 | R: Yishai Hadas <yishaih@nvidia.com> |
| @@ -22136,12 +22153,6 @@ L: kvm@vger.kernel.org · 10 unmodified lines | ||
| 22136 | 22153 | S: Maintained |
| 22137 | 22154 | F: drivers/vfio/platform/ |
| 22138 | 22155 | |
| 22139 | −VFIO MLX5 PCI DRIVER | |
| 22140 | −M: Yishai Hadas <yishaih@nvidia.com> | |
| 22141 | −L: kvm@vger.kernel.org | |
| 22142 | −S: Maintained | |
| 22143 | −F: drivers/vfio/pci/mlx5/ | |
| 22144 | − | |
| 22145 | 22156 | VGA_SWITCHEROO |
| 22146 | 22157 | R: Lukas Wunner <lukas@wunner.de> |
| 22147 | 22158 | S: Maintained |
| @@ -22151,8 +22162,8 @@ F: drivers/gpu/vga/vga_switcheroo.c · 3 unmodified lines | ||
| 22151 | 22162 | F: include/linux/vga_switcheroo.h |
| 22152 | 22163 | |
| 22153 | 22164 | VIA RHINE NETWORK DRIVER |
| 22154 | −S: Maintained | |
| 22155 | 22165 | M: Kevin Brace <kevinbrace@bracecomputerlab.com> |
| 22166 | +S: Maintained | |
| 22156 | 22167 | F: drivers/net/ethernet/via/via-rhine.c |
| 22157 | 22168 | |
| 22158 | 22169 | VIA SD/MMC CARD CONTROLLER DRIVER |
| @@ -22204,6 +22215,14 @@ S: Maintained · 45 unmodified lines | ||
| 22204 | 22215 | F: drivers/media/common/videobuf2/* |
| 22205 | 22216 | F: include/media/videobuf2-* |
| 22206 | 22217 | |
| 22218 | +VIDTV VIRTUAL DIGITAL TV DRIVER | |
| 22219 | +M: Daniel W. S. Almeida <dwlsalmeida@gmail.com> | |
| 22220 | +L: linux-media@vger.kernel.org | |
| 22221 | +S: Maintained | |
| 22222 | +W: https://linuxtv.org | |
| 22223 | +T: git git://linuxtv.org/media_tree.git | |
| 22224 | +F: drivers/media/test-drivers/vidtv/* | |
| 22225 | + | |
| 22207 | 22226 | VIMC VIRTUAL MEDIA CONTROLLER DRIVER |
| 22208 | 22227 | M: Shuah Khan <skhan@linuxfoundation.org> |
| 22209 | 22228 | R: Kieran Bingham <kieran.bingham@ideasonboard.com> |
| @@ -22233,6 +22252,16 @@ F: include/uapi/linux/virtio_vsock.h · 23 unmodified lines | ||
| 22233 | 22252 | F: net/vmw_vsock/virtio_transport.c |
| 22234 | 22253 | F: net/vmw_vsock/virtio_transport_common.c |
| 22235 | 22254 | |
| 22255 | +VIRTIO BALLOON | |
| 22256 | +M: "Michael S. Tsirkin" <mst@redhat.com> | |
| 22257 | +M: David Hildenbrand <david@redhat.com> | |
| 22258 | +L: virtualization@lists.linux-foundation.org | |
| 22259 | +S: Maintained | |
| 22260 | +F: drivers/virtio/virtio_balloon.c | |
| 22261 | +F: include/linux/balloon_compaction.h | |
| 22262 | +F: include/uapi/linux/virtio_balloon.h | |
| 22263 | +F: mm/balloon_compaction.c | |
| 22264 | + | |
| 22236 | 22265 | VIRTIO BLOCK AND SCSI DRIVERS |
| 22237 | 22266 | M: "Michael S. Tsirkin" <mst@redhat.com> |
| 22238 | 22267 | M: Jason Wang <jasowang@redhat.com> |
| @@ -22275,30 +22304,6 @@ F: include/linux/vringh.h · 36 unmodified lines | ||
| 22275 | 22304 | F: include/uapi/linux/virtio_*.h |
| 22276 | 22305 | F: tools/virtio/ |
| 22277 | 22306 | |
| 22278 | −VISL VIRTUAL STATELESS DECODER DRIVER | |
| 22279 | −M: Daniel Almeida <daniel.almeida@collabora.com> | |
| 22280 | −L: linux-media@vger.kernel.org | |
| 22281 | −S: Supported | |
| 22282 | −F: drivers/media/test-drivers/visl | |
| 22283 | − | |
| 22284 | −IFCVF VIRTIO DATA PATH ACCELERATOR | |
| 22285 | −R: Zhu Lingshan <lingshan.zhu@intel.com> | |
| 22286 | −F: drivers/vdpa/ifcvf/ | |
| 22287 | − | |
| 22288 | −SNET DPU VIRTIO DATA PATH ACCELERATOR | |
| 22289 | −R: Alvaro Karsz <alvaro.karsz@solid-run.com> | |
| 22290 | −F: drivers/vdpa/solidrun/ | |
| 22291 | − | |
| 22292 | −VIRTIO BALLOON | |
| 22293 | −M: "Michael S. Tsirkin" <mst@redhat.com> | |
| 22294 | −M: David Hildenbrand <david@redhat.com> | |
| 22295 | −L: virtualization@lists.linux-foundation.org | |
| 22296 | −S: Maintained | |
| 22297 | −F: drivers/virtio/virtio_balloon.c | |
| 22298 | −F: include/uapi/linux/virtio_balloon.h | |
| 22299 | −F: include/linux/balloon_compaction.h | |
| 22300 | −F: mm/balloon_compaction.c | |
| 22301 | − | |
| 22302 | 22307 | VIRTIO CRYPTO DRIVER |
| 22303 | 22308 | M: Gonglei <arei.gonglei@huawei.com> |
| 22304 | 22309 | L: virtualization@lists.linux-foundation.org |
| @@ -22359,11 +22364,20 @@ L: virtualization@lists.linux-foundation.org · 54 unmodified lines | ||
| 22359 | 22364 | L: netdev@vger.kernel.org |
| 22360 | 22365 | S: Maintained |
| 22361 | 22366 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git |
| 22362 | −F: kernel/vhost_task.c | |
| 22363 | 22367 | F: drivers/vhost/ |
| 22364 | 22368 | F: include/linux/sched/vhost_task.h |
| 22365 | 22369 | F: include/linux/vhost_iotlb.h |
| 22366 | 22370 | F: include/uapi/linux/vhost.h |
| 22371 | +F: kernel/vhost_task.c | |
| 22372 | + | |
| 22373 | +VIRTIO I2C DRIVER | |
| 22374 | +M: Conghui Chen <conghui.chen@intel.com> | |
| 22375 | +M: Viresh Kumar <viresh.kumar@linaro.org> | |
| 22376 | +L: linux-i2c@vger.kernel.org | |
| 22377 | +L: virtualization@lists.linux-foundation.org | |
| 22378 | +S: Maintained | |
| 22379 | +F: drivers/i2c/busses/i2c-virtio.c | |
| 22380 | +F: include/uapi/linux/virtio_i2c.h | |
| 22367 | 22381 | |
| 22368 | 22382 | VIRTIO INPUT DRIVER |
| 22369 | 22383 | M: Gerd Hoffmann <kraxel@redhat.com> |
| @@ -22386,6 +22400,13 @@ W: https://virtio-mem.gitlab.io/ · 16 unmodified lines | ||
| 22386 | 22400 | F: drivers/virtio/virtio_mem.c |
| 22387 | 22401 | F: include/uapi/linux/virtio_mem.h |
| 22388 | 22402 | |
| 22403 | +VIRTIO PMEM DRIVER | |
| 22404 | +M: Pankaj Gupta <pankaj.gupta.linux@gmail.com> | |
| 22405 | +L: virtualization@lists.linux-foundation.org | |
| 22406 | +S: Maintained | |
| 22407 | +F: drivers/nvdimm/nd_virtio.c | |
| 22408 | +F: drivers/nvdimm/virtio_pmem.c | |
| 22409 | + | |
| 22389 | 22410 | VIRTIO SOUND DRIVER |
| 22390 | 22411 | M: Anton Yakovlev <anton.yakovlev@opensynergy.com> |
| 22391 | 22412 | M: "Michael S. Tsirkin" <mst@redhat.com> |
| @@ -22395,22 +22416,6 @@ S: Maintained · 3 unmodified lines | ||
| 22395 | 22416 | F: include/uapi/linux/virtio_snd.h |
| 22396 | 22417 | F: sound/virtio/* |
| 22397 | 22418 | |
| 22398 | −VIRTIO I2C DRIVER | |
| 22399 | −M: Conghui Chen <conghui.chen@intel.com> | |
| 22400 | −M: Viresh Kumar <viresh.kumar@linaro.org> | |
| 22401 | −L: linux-i2c@vger.kernel.org | |
| 22402 | −L: virtualization@lists.linux-foundation.org | |
| 22403 | −S: Maintained | |
| 22404 | −F: drivers/i2c/busses/i2c-virtio.c | |
| 22405 | −F: include/uapi/linux/virtio_i2c.h | |
| 22406 | − | |
| 22407 | −VIRTIO PMEM DRIVER | |
| 22408 | −M: Pankaj Gupta <pankaj.gupta.linux@gmail.com> | |
| 22409 | −L: virtualization@lists.linux-foundation.org | |
| 22410 | −S: Maintained | |
| 22411 | −F: drivers/nvdimm/virtio_pmem.c | |
| 22412 | −F: drivers/nvdimm/nd_virtio.c | |
| 22413 | − | |
| 22414 | 22419 | VIRTUAL BOX GUEST DEVICE DRIVER |
| 22415 | 22420 | M: Hans de Goede <hdegoede@redhat.com> |
| 22416 | 22421 | M: Arnd Bergmann <arnd@arndb.de> |
| @@ -22432,6 +22437,12 @@ S: Maintained · 15 unmodified lines | ||
| 22432 | 22437 | F: drivers/input/serio/userio.c |
| 22433 | 22438 | F: include/uapi/linux/userio.h |
| 22434 | 22439 | |
| 22440 | +VISL VIRTUAL STATELESS DECODER DRIVER | |
| 22441 | +M: Daniel Almeida <daniel.almeida@collabora.com> | |
| 22442 | +L: linux-media@vger.kernel.org | |
| 22443 | +S: Supported | |
| 22444 | +F: drivers/media/test-drivers/visl | |
| 22445 | + | |
| 22435 | 22446 | VIVID VIRTUAL VIDEO DRIVER |
| 22436 | 22447 | M: Hans Verkuil <hverkuil@xs4all.nl> |
| 22437 | 22448 | L: linux-media@vger.kernel.org |
| @@ -22440,14 +22451,6 @@ W: https://linuxtv.org · 2 unmodified lines | ||
| 22440 | 22451 | T: git git://linuxtv.org/media_tree.git |
| 22441 | 22452 | F: drivers/media/test-drivers/vivid/* |
| 22442 | 22453 | |
| 22443 | −VIDTV VIRTUAL DIGITAL TV DRIVER | |
| 22444 | −M: Daniel W. S. Almeida <dwlsalmeida@gmail.com> | |
| 22445 | −L: linux-media@vger.kernel.org | |
| 22446 | −S: Maintained | |
| 22447 | −W: https://linuxtv.org | |
| 22448 | −T: git git://linuxtv.org/media_tree.git | |
| 22449 | −F: drivers/media/test-drivers/vidtv/* | |
| 22450 | − | |
| 22451 | 22454 | VLYNQ BUS |
| 22452 | 22455 | M: Florian Fainelli <f.fainelli@gmail.com> |
| 22453 | 22456 | L: openwrt-devel@lists.openwrt.org (subscribers-only) |
| @@ -22455,16 +22458,6 @@ S: Maintained · 1 unmodified line | ||
| 22455 | 22458 | F: drivers/vlynq/vlynq.c |
| 22456 | 22459 | F: include/linux/vlynq.h |
| 22457 | 22460 | |
| 22458 | −VME SUBSYSTEM | |
| 22459 | −M: Martyn Welch <martyn@welchs.me.uk> | |
| 22460 | −M: Manohar Vanga <manohar.vanga@gmail.com> | |
| 22461 | −M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
| 22462 | −L: linux-kernel@vger.kernel.org | |
| 22463 | −S: Odd fixes | |
| 22464 | −T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git | |
| 22465 | −F: Documentation/driver-api/vme.rst | |
| 22466 | −F: drivers/staging/vme_user/ | |
| 22467 | − | |
| 22468 | 22461 | VM SOCKETS (AF_VSOCK) |
| 22469 | 22462 | M: Stefano Garzarella <sgarzare@redhat.com> |
| 22470 | 22463 | L: virtualization@lists.linux-foundation.org |
| @@ -22478,6 +22471,28 @@ F: include/uapi/linux/vsockmon.h · 7 unmodified lines | ||
| 22478 | 22471 | F: net/vmw_vsock/ |
| 22479 | 22472 | F: tools/testing/vsock/ |
| 22480 | 22473 | |
| 22474 | +VMALLOC | |
| 22475 | +M: Andrew Morton <akpm@linux-foundation.org> | |
| 22476 | +R: Uladzislau Rezki <urezki@gmail.com> | |
| 22477 | +R: Christoph Hellwig <hch@infradead.org> | |
| 22478 | +R: Lorenzo Stoakes <lstoakes@gmail.com> | |
| 22479 | +L: linux-mm@kvack.org | |
| 22480 | +S: Maintained | |
| 22481 | +W: http://www.linux-mm.org | |
| 22482 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm | |
| 22483 | +F: include/linux/vmalloc.h | |
| 22484 | +F: mm/vmalloc.c | |
| 22485 | + | |
| 22486 | +VME SUBSYSTEM | |
| 22487 | +M: Martyn Welch <martyn@welchs.me.uk> | |
| 22488 | +M: Manohar Vanga <manohar.vanga@gmail.com> | |
| 22489 | +M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
| 22490 | +L: linux-kernel@vger.kernel.org | |
| 22491 | +S: Odd fixes | |
| 22492 | +T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git | |
| 22493 | +F: Documentation/driver-api/vme.rst | |
| 22494 | +F: drivers/staging/vme_user/ | |
| 22495 | + | |
| 22481 | 22496 | VMWARE BALLOON DRIVER |
| 22482 | 22497 | M: Nadav Amit <namit@vmware.com> |
| 22483 | 22498 | R: VMware PV-Drivers Reviewers <pv-drivers@vmware.com> |
| @@ -22659,9 +22674,9 @@ F: drivers/input/tablet/wacom_serial4.c · 175 unmodified lines | ||
| 22659 | 22674 | WANGXUN ETHERNET DRIVER |
| 22660 | 22675 | M: Jiawen Wu <jiawenwu@trustnetic.com> |
| 22661 | 22676 | M: Mengyuan Lou <mengyuanlou@net-swift.com> |
| 22662 | −W: https://www.net-swift.com | |
| 22663 | 22677 | L: netdev@vger.kernel.org |
| 22664 | 22678 | S: Maintained |
| 22679 | +W: https://www.net-swift.com | |
| 22665 | 22680 | F: Documentation/networking/device_drivers/ethernet/wangxun/* |
| 22666 | 22681 | F: drivers/net/ethernet/wangxun/ |
| 22667 | 22682 | |
| @@ -22676,8 +22691,8 @@ F: Documentation/devicetree/bindings/watchdog/ · 8 unmodified lines | ||
| 22676 | 22691 | F: Documentation/watchdog/ |
| 22677 | 22692 | F: drivers/watchdog/ |
| 22678 | 22693 | F: include/linux/watchdog.h |
| 22679 | −F: include/uapi/linux/watchdog.h | |
| 22680 | 22694 | F: include/trace/events/watchdog.h |
| 22695 | +F: include/uapi/linux/watchdog.h | |
| 22681 | 22696 | |
| 22682 | 22697 | WHISKEYCOVE PMIC GPIO DRIVER |
| 22683 | 22698 | M: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> |
| @@ -22834,8 +22849,8 @@ R: "H. Peter Anvin" <hpa@zytor.com> · 150 unmodified lines | ||
| 22834 | 22849 | L: linux-kernel@vger.kernel.org |
| 22835 | 22850 | S: Maintained |
| 22836 | 22851 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core |
| 22837 | −F: Documentation/devicetree/bindings/x86/ | |
| 22838 | 22852 | F: Documentation/arch/x86/ |
| 22853 | +F: Documentation/devicetree/bindings/x86/ | |
| 22839 | 22854 | F: arch/x86/ |
| 22840 | 22855 | |
| 22841 | 22856 | X86 ENTRY CODE |
| @@ -22966,6 +22981,8 @@ M: John Fastabend <john.fastabend@gmail.com> · 124 unmodified lines | ||
| 22966 | 22981 | L: netdev@vger.kernel.org |
| 22967 | 22982 | L: bpf@vger.kernel.org |
| 22968 | 22983 | S: Supported |
| 22984 | +F: drivers/net/ethernet/*/*/*/*/*xdp* | |
| 22985 | +F: drivers/net/ethernet/*/*/*xdp* | |
| 22969 | 22986 | F: include/net/xdp.h |
| 22970 | 22987 | F: include/net/xdp_priv.h |
| 22971 | 22988 | F: include/trace/events/xdp.h |
| @@ -22973,10 +22990,8 @@ F: kernel/bpf/cpumap.c · 1 unmodified line | ||
| 22973 | 22990 | F: kernel/bpf/devmap.c |
| 22974 | 22991 | F: net/core/xdp.c |
| 22975 | 22992 | F: samples/bpf/xdp* |
| 22976 | −F: tools/testing/selftests/bpf/*xdp* | |
| 22977 | 22993 | F: tools/testing/selftests/bpf/*/*xdp* |
| 22978 | −F: drivers/net/ethernet/*/*/*/*/*xdp* | |
| 22979 | −F: drivers/net/ethernet/*/*/*xdp* | |
| 22994 | +F: tools/testing/selftests/bpf/*xdp* | |
| 22980 | 22995 | K: (?:\b|_)xdp(?:\b|_) |
| 22981 | 22996 | |
| 22982 | 22997 | XDP SOCKETS (AF_XDP) |
| @@ -22988,11 +23003,11 @@ L: netdev@vger.kernel.org · 5 unmodified lines | ||
| 22988 | 23003 | L: bpf@vger.kernel.org |
| 22989 | 23004 | S: Maintained |
| 22990 | 23005 | F: Documentation/networking/af_xdp.rst |
| 23006 | +F: include/net/netns/xdp.h | |
| 22991 | 23007 | F: include/net/xdp_sock* |
| 22992 | 23008 | F: include/net/xsk_buff_pool.h |
| 22993 | 23009 | F: include/uapi/linux/if_xdp.h |
| 22994 | 23010 | F: include/uapi/linux/xdp_diag.h |
| 22995 | −F: include/net/netns/xdp.h | |
| 22996 | 23011 | F: net/xdp/ |
| 22997 | 23012 | F: tools/testing/selftests/bpf/*xsk* |
| 22998 | 23013 | |
| @@ -23094,11 +23109,11 @@ F: include/xen/arm/swiotlb-xen.h · 95 unmodified lines | ||
| 23094 | 23109 | F: include/xen/swiotlb-xen.h |
| 23095 | 23110 | |
| 23096 | 23111 | XFS FILESYSTEM |
| 23097 | −C: irc://irc.oftc.net/xfs | |
| 23098 | 23112 | M: Darrick J. Wong <djwong@kernel.org> |
| 23099 | 23113 | L: linux-xfs@vger.kernel.org |
| 23100 | 23114 | S: Supported |
| 23101 | 23115 | W: http://xfs.org/ |
| 23116 | +C: irc://irc.oftc.net/xfs | |
| 23102 | 23117 | T: git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git |
| 23103 | 23118 | F: Documentation/ABI/testing/sysfs-fs-xfs |
| 23104 | 23119 | F: Documentation/admin-guide/xfs.rst |
| @@ -23128,16 +23143,28 @@ S: Maintained · 23 unmodified lines | ||
| 23128 | 23143 | F: Documentation/devicetree/bindings/net/can/xilinx,can.yaml |
| 23129 | 23144 | F: drivers/net/can/xilinx_can.c |
| 23130 | 23145 | |
| 23146 | +XILINX EVENT MANAGEMENT DRIVER | |
| 23147 | +M: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com> | |
| 23148 | +S: Maintained | |
| 23149 | +F: drivers/soc/xilinx/xlnx_event_manager.c | |
| 23150 | +F: include/linux/firmware/xlnx-event-manager.h | |
| 23151 | + | |
| 23131 | 23152 | XILINX GPIO DRIVER |
| 23132 | 23153 | M: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> |
| 23133 | 23154 | R: Srinivas Neeli <srinivas.neeli@xilinx.com> |
| 23134 | 23155 | R: Michal Simek <michal.simek@amd.com> |
| 23135 | 23156 | S: Maintained |
| 23136 | −F: Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml | |
| 23137 | 23157 | F: Documentation/devicetree/bindings/gpio/gpio-zynq.yaml |
| 23158 | +F: Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml | |
| 23138 | 23159 | F: drivers/gpio/gpio-xilinx.c |
| 23139 | 23160 | F: drivers/gpio/gpio-zynq.c |
| 23140 | 23161 | |
| 23162 | +XILINX PWM DRIVER | |
| 23163 | +M: Sean Anderson <sean.anderson@seco.com> | |
| 23164 | +S: Maintained | |
| 23165 | +F: drivers/pwm/pwm-xilinx.c | |
| 23166 | +F: include/clocksource/timer-xilinx.h | |
| 23167 | + | |
| 23141 | 23168 | XILINX SD-FEC IP CORES |
| 23142 | 23169 | M: Derek Kiernan <derek.kiernan@xilinx.com> |
| 23143 | 23170 | M: Dragan Cvetic <dragan.cvetic@xilinx.com> |
| @@ -23149,12 +23176,6 @@ F: drivers/misc/Makefile · 5 unmodified lines | ||
| 23149 | 23176 | F: drivers/misc/xilinx_sdfec.c |
| 23150 | 23177 | F: include/uapi/misc/xilinx_sdfec.h |
| 23151 | 23178 | |
| 23152 | −XILINX PWM DRIVER | |
| 23153 | −M: Sean Anderson <sean.anderson@seco.com> | |
| 23154 | −S: Maintained | |
| 23155 | −F: drivers/pwm/pwm-xilinx.c | |
| 23156 | −F: include/clocksource/timer-xilinx.h | |
| 23157 | − | |
| 23158 | 23179 | XILINX UARTLITE SERIAL DRIVER |
| 23159 | 23180 | M: Peter Korsgaard <jacmet@sunsite.dk> |
| 23160 | 23181 | L: linux-serial@vger.kernel.org |
| @@ -23220,12 +23241,6 @@ M: Harsha <harsha.harsha@xilinx.com> · 59 unmodified lines | ||
| 23220 | 23241 | S: Maintained |
| 23221 | 23242 | F: drivers/crypto/xilinx/zynqmp-sha.c |
| 23222 | 23243 | |
| 23223 | −XILINX EVENT MANAGEMENT DRIVER | |
| 23224 | −M: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com> | |
| 23225 | −S: Maintained | |
| 23226 | −F: drivers/soc/xilinx/xlnx_event_manager.c | |
| 23227 | −F: include/linux/firmware/xlnx-event-manager.h | |
| 23228 | − | |
| 23229 | 23244 | XILLYBUS DRIVER |
| 23230 | 23245 | M: Eli Billauer <eli.billauer@gmail.com> |
| 23231 | 23246 | L: linux-kernel@vger.kernel.org |
| @@ -23273,6 +23288,13 @@ S: Maintained · 41 unmodified lines | ||
| 23273 | 23288 | F: Documentation/input/devices/yealink.rst |
| 23274 | 23289 | F: drivers/input/misc/yealink.* |
| 23275 | 23290 | |
| 23291 | +Z3FOLD COMPRESSED PAGE ALLOCATOR | |
| 23292 | +M: Vitaly Wool <vitaly.wool@konsulko.com> | |
| 23293 | +R: Miaohe Lin <linmiaohe@huawei.com> | |
| 23294 | +L: linux-mm@kvack.org | |
| 23295 | +S: Maintained | |
| 23296 | +F: mm/z3fold.c | |
| 23297 | + | |
| 23276 | 23298 | Z8530 DRIVER FOR AX.25 |
| 23277 | 23299 | M: Joerg Reuter <jreuter@yaina.de> |
| 23278 | 23300 | L: linux-hams@vger.kernel.org |
| @@ -23290,13 +23312,6 @@ L: linux-mm@kvack.org · 11 unmodified lines | ||
| 23290 | 23312 | S: Maintained |
| 23291 | 23313 | F: mm/zbud.c |
| 23292 | 23314 | |
| 23293 | −Z3FOLD COMPRESSED PAGE ALLOCATOR | |
| 23294 | −M: Vitaly Wool <vitaly.wool@konsulko.com> | |
| 23295 | −R: Miaohe Lin <linmiaohe@huawei.com> | |
| 23296 | −L: linux-mm@kvack.org | |
| 23297 | −S: Maintained | |
| 23298 | −F: mm/z3fold.c | |
| 23299 | − | |
| 23300 | 23315 | ZD1211RW WIRELESS DRIVER |
| 23301 | 23316 | M: Ulrich Kunitz <kune@deine-taler.de> |
| 23302 | 23317 | L: linux-wireless@vger.kernel.org |
| @@ -23383,10 +23398,10 @@ M: Nick Terrell <terrelln@fb.com> · 80 unmodified lines | ||
| 23383 | 23398 | S: Maintained |
| 23384 | 23399 | B: https://github.com/facebook/zstd/issues |
| 23385 | 23400 | T: git https://github.com/terrelln/linux.git |
| 23401 | +F: crypto/zstd.c | |
| 23386 | 23402 | F: include/linux/zstd* |
| 23387 | −F: lib/zstd/ | |
| 23388 | 23403 | F: lib/decompress_unzstd.c |
| 23389 | −F: crypto/zstd.c | |
| 23404 | +F: lib/zstd/ | |
| 23390 | 23405 | N: zstd |
| 23391 | 23406 | K: zstd |
| 23392 | 23407 | |
| @@ -23398,13 +23413,6 @@ L: linux-mm@kvack.org · 5 unmodified lines | ||
| 23398 | 23413 | S: Maintained |
| 23399 | 23414 | F: mm/zswap.c |
| 23400 | 23415 | |
| 23401 | −NXP BLUETOOTH WIRELESS DRIVERS | |
| 23402 | −M: Amitkumar Karwar <amitkumar.karwar@nxp.com> | |
| 23403 | −M: Neeraj Kale <neeraj.sanjaykale@nxp.com> | |
| 23404 | −S: Maintained | |
| 23405 | −F: Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | |
| 23406 | −F: drivers/bluetooth/btnxpuart.c | |
| 23407 | − | |
| 23408 | 23416 | THE REST |
| 23409 | 23417 | M: Linus Torvalds <torvalds@linux-foundation.org> |
| 23410 | 23418 | L: linux-kernel@vger.kernel.org |
| @@ -2,7 +2,7 @@ · 1 unmodified line | ||
| 2 | 2 | VERSION = 6 |
| 3 | 3 | PATCHLEVEL = 4 |
| 4 | 4 | SUBLEVEL = 0 |
| 5 | −EXTRAVERSION = -rc1 | |
| 5 | +EXTRAVERSION = -rc2 | |
| 6 | 6 | NAME = Hurr durr I'ma ninja sloth |
| 7 | 7 | |
| 8 | 8 | # *DOCUMENTATION* |
| @@ -1,20 +1,8 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | + | |
| 2 | 3 | #ifndef _ASM_FB_H_ |
| 3 | 4 | #define _ASM_FB_H_ |
| 4 | 5 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | −#include <asm/page.h> | |
| 8 | − | |
| 9 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 10 | − unsigned long off) | |
| 11 | −{ | |
| 12 | − vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | |
| 13 | −} | |
| 14 | − | |
| 15 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 16 | −{ | |
| 17 | − return 0; | |
| 18 | −} | |
| 6 | +#include <asm-generic/fb.h> | |
| 19 | 7 | |
| 20 | 8 | #endif /* _ASM_FB_H_ */ |
| @@ -1,19 +1,6 @@ | ||
| 1 | 1 | #ifndef _ASM_FB_H_ |
| 2 | 2 | #define _ASM_FB_H_ |
| 3 | 3 | |
| 4 | −#include <linux/fb.h> | |
| 5 | −#include <linux/fs.h> | |
| 6 | −#include <asm/page.h> | |
| 7 | − | |
| 8 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 9 | − unsigned long off) | |
| 10 | −{ | |
| 11 | − vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | |
| 12 | −} | |
| 13 | − | |
| 14 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 15 | −{ | |
| 16 | − return 0; | |
| 17 | −} | |
| 4 | +#include <asm-generic/fb.h> | |
| 18 | 5 | |
| 19 | 6 | #endif /* _ASM_FB_H_ */ |
| @@ -308,6 +308,29 @@ static int unwind_exec_pop_subset_r0_to_r3(struct unwind_ctrl_block *ctrl, · 307 unmodified lines | ||
| 308 | 308 | return URC_OK; |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | +static unsigned long unwind_decode_uleb128(struct unwind_ctrl_block *ctrl) | |
| 312 | +{ | |
| 313 | + unsigned long bytes = 0; | |
| 314 | + unsigned long insn; | |
| 315 | + unsigned long result = 0; | |
| 316 | + | |
| 317 | + /* | |
| 318 | + * unwind_get_byte() will advance `ctrl` one instruction at a time, so | |
| 319 | + * loop until we get an instruction byte where bit 7 is not set. | |
| 320 | + * | |
| 321 | + * Note: This decodes a maximum of 4 bytes to output 28 bits data where | |
| 322 | + * max is 0xfffffff: that will cover a vsp increment of 1073742336, hence | |
| 323 | + * it is sufficient for unwinding the stack. | |
| 324 | + */ | |
| 325 | + do { | |
| 326 | + insn = unwind_get_byte(ctrl); | |
| 327 | + result |= (insn & 0x7f) << (bytes * 7); | |
| 328 | + bytes++; | |
| 329 | + } while (!!(insn & 0x80) && (bytes != sizeof(result))); | |
| 330 | + | |
| 331 | + return result; | |
| 332 | +} | |
| 333 | + | |
| 311 | 334 | /* |
| 312 | 335 | * Execute the current unwind instruction. |
| 313 | 336 | */ |
| @@ -361,7 +384,7 @@ static int unwind_exec_insn(struct unwind_ctrl_block *ctrl) · 47 unmodified lines | ||
| 361 | 384 | if (ret) |
| 362 | 385 | goto error; |
| 363 | 386 | } else if (insn == 0xb2) { |
| 364 | − unsigned long uleb128 = unwind_get_byte(ctrl); | |
| 387 | + unsigned long uleb128 = unwind_decode_uleb128(ctrl); | |
| 365 | 388 | |
| 366 | 389 | ctrl->vrs[SP] += 0x204 + (uleb128 << 2); |
| 367 | 390 | } else { |
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
| 2 | −/** | |
| 2 | +/* | |
| 3 | 3 | * arch/arm/mac-sa1100/jornada720_ssp.c |
| 4 | 4 | * |
| 5 | 5 | * Copyright (C) 2006/2007 Kristoffer Ericson <Kristoffer.Ericson@gmail.com> |
| @@ -26,6 +26,7 @@ static unsigned long jornada_ssp_flags; · 20 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * jornada_ssp_reverse - reverses input byte |
| 29 | + * @byte: input byte to reverse | |
| 29 | 30 | * |
| 30 | 31 | * we need to reverse all data we receive from the mcu due to its physical location |
| 31 | 32 | * returns : 01110111 -> 11101110 |
| @@ -46,6 +47,7 @@ EXPORT_SYMBOL(jornada_ssp_reverse); · 14 unmodified lines | ||
| 46 | 47 | |
| 47 | 48 | /** |
| 48 | 49 | * jornada_ssp_byte - waits for ready ssp bus and sends byte |
| 50 | + * @byte: input byte to transmit | |
| 49 | 51 | * |
| 50 | 52 | * waits for fifo buffer to clear and then transmits, if it doesn't then we will |
| 51 | 53 | * timeout after <timeout> rounds. Needs mcu running before its called. |
| @@ -77,6 +79,7 @@ EXPORT_SYMBOL(jornada_ssp_byte); · 25 unmodified lines | ||
| 77 | 79 | |
| 78 | 80 | /** |
| 79 | 81 | * jornada_ssp_inout - decide if input is command or trading byte |
| 82 | + * @byte: input byte to send (may be %TXDUMMY) | |
| 80 | 83 | * |
| 81 | 84 | * returns : (jornada_ssp_byte(byte)) on success |
| 82 | 85 | * : %-ETIMEDOUT on timeout failure |
| @@ -23,6 +23,9 @@ · 22 unmodified lines | ||
| 23 | 23 | @ |
| 24 | 24 | ENTRY(do_vfp) |
| 25 | 25 | mov r1, r10 |
| 26 | − mov r3, r9 | |
| 27 | − b vfp_entry | |
| 26 | + str lr, [sp, #-8]! | |
| 27 | + add r3, sp, #4 | |
| 28 | + str r9, [r3] | |
| 29 | + bl vfp_entry | |
| 30 | + ldr pc, [sp], #8 | |
| 28 | 31 | ENDPROC(do_vfp) |
| @@ -172,13 +172,14 @@ vfp_hw_state_valid: · 171 unmodified lines | ||
| 172 | 172 | @ out before setting an FPEXC that |
| 173 | 173 | @ stops us reading stuff |
| 174 | 174 | VFPFMXR FPEXC, r1 @ Restore FPEXC last |
| 175 | + mov sp, r3 @ we think we have handled things | |
| 176 | + pop {lr} | |
| 175 | 177 | sub r2, r2, #4 @ Retry current instruction - if Thumb |
| 176 | 178 | str r2, [sp, #S_PC] @ mode it's two 16-bit instructions, |
| 177 | 179 | @ else it's one 32-bit instruction, so |
| 178 | 180 | @ always subtract 4 from the following |
| 179 | 181 | @ instruction address. |
| 180 | 182 | |
| 181 | − mov lr, r3 @ we think we have handled things | |
| 182 | 183 | local_bh_enable_and_ret: |
| 183 | 184 | adr r0, . |
| 184 | 185 | mov r1, #SOFTIRQ_DISABLE_OFFSET |
| @@ -209,8 +210,9 @@ skip: · 24 unmodified lines | ||
| 209 | 210 | |
| 210 | 211 | process_exception: |
| 211 | 212 | DBGSTR "bounce" |
| 213 | + mov sp, r3 @ setup for a return to the user code. | |
| 214 | + pop {lr} | |
| 212 | 215 | mov r2, sp @ nothing stacked - regdump is at TOS |
| 213 | − mov lr, r3 @ setup for a return to the user code. | |
| 214 | 216 | |
| 215 | 217 | @ Now call the C code to package up the bounce to the support code |
| 216 | 218 | @ r0 holds the trigger instruction |
| @@ -5,19 +5,6 @@ · 4 unmodified lines | ||
| 5 | 5 | #ifndef __ASM_FB_H_ |
| 6 | 6 | #define __ASM_FB_H_ |
| 7 | 7 | |
| 8 | −#include <linux/fb.h> | |
| 9 | −#include <linux/fs.h> | |
| 10 | −#include <asm/page.h> | |
| 11 | − | |
| 12 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 13 | − unsigned long off) | |
| 14 | −{ | |
| 15 | − vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | |
| 16 | −} | |
| 17 | − | |
| 18 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 19 | −{ | |
| 20 | − return 0; | |
| 21 | −} | |
| 8 | +#include <asm-generic/fb.h> | |
| 22 | 9 | |
| 23 | 10 | #endif /* __ASM_FB_H_ */ |
| @@ -2,11 +2,14 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_FB_H_ |
| 3 | 3 | #define _ASM_FB_H_ |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 5 | +#include <linux/compiler.h> | |
| 7 | 6 | #include <linux/efi.h> |
| 7 | +#include <linux/string.h> | |
| 8 | + | |
| 8 | 9 | #include <asm/page.h> |
| 9 | 10 | |
| 11 | +struct file; | |
| 12 | + | |
| 10 | 13 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
| 11 | 14 | unsigned long off) |
| 12 | 15 | { |
| @@ -15,10 +18,26 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, · 2 unmodified lines | ||
| 15 | 18 | else |
| 16 | 19 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
| 17 | 20 | } |
| 21 | +#define fb_pgprotect fb_pgprotect | |
| 22 | + | |
| 23 | +static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) | |
| 24 | +{ | |
| 25 | + memcpy(to, (void __force *)from, n); | |
| 26 | +} | |
| 27 | +#define fb_memcpy_fromio fb_memcpy_fromio | |
| 18 | 28 | |
| 19 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 29 | +static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n) | |
| 20 | 30 | { |
| 21 | − return 0; | |
| 31 | + memcpy((void __force *)to, from, n); | |
| 22 | 32 | } |
| 33 | +#define fb_memcpy_toio fb_memcpy_toio | |
| 34 | + | |
| 35 | +static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) | |
| 36 | +{ | |
| 37 | + memset((void __force *)addr, c, n); | |
| 38 | +} | |
| 39 | +#define fb_memset fb_memset_io | |
| 40 | + | |
| 41 | +#include <asm-generic/fb.h> | |
| 23 | 42 | |
| 24 | 43 | #endif /* _ASM_FB_H_ */ |
| @@ -5,19 +5,27 @@ · 4 unmodified lines | ||
| 5 | 5 | #ifndef _ASM_FB_H_ |
| 6 | 6 | #define _ASM_FB_H_ |
| 7 | 7 | |
| 8 | −#include <linux/fb.h> | |
| 9 | −#include <linux/fs.h> | |
| 10 | −#include <asm/page.h> | |
| 8 | +#include <linux/compiler.h> | |
| 9 | +#include <linux/string.h> | |
| 11 | 10 | |
| 12 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 13 | − unsigned long off) | |
| 11 | +static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) | |
| 14 | 12 | { |
| 15 | − vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | |
| 13 | + memcpy(to, (void __force *)from, n); | |
| 16 | 14 | } |
| 15 | +#define fb_memcpy_fromio fb_memcpy_fromio | |
| 17 | 16 | |
| 18 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 17 | +static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n) | |
| 19 | 18 | { |
| 20 | − return 0; | |
| 19 | + memcpy((void __force *)to, from, n); | |
| 21 | 20 | } |
| 21 | +#define fb_memcpy_toio fb_memcpy_toio | |
| 22 | + | |
| 23 | +static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) | |
| 24 | +{ | |
| 25 | + memset((void __force *)addr, c, n); | |
| 26 | +} | |
| 27 | +#define fb_memset fb_memset_io | |
| 28 | + | |
| 29 | +#include <asm-generic/fb.h> | |
| 22 | 30 | |
| 23 | 31 | #endif /* _ASM_FB_H_ */ |
| @@ -2,22 +2,18 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_FB_H_ |
| 3 | 3 | #define _ASM_FB_H_ |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | 5 | #include <asm/page.h> |
| 8 | 6 | #include <asm/setup.h> |
| 9 | 7 | |
| 10 | −#ifdef CONFIG_MMU | |
| 11 | −#ifdef CONFIG_SUN3 | |
| 8 | +struct file; | |
| 9 | + | |
| 12 | 10 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
| 13 | 11 | unsigned long off) |
| 14 | 12 | { |
| 13 | +#ifdef CONFIG_MMU | |
| 14 | +#ifdef CONFIG_SUN3 | |
| 15 | 15 | pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; |
| 16 | −} | |
| 17 | 16 | #else |
| 18 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 19 | − unsigned long off) | |
| 20 | −{ | |
| 21 | 17 | if (CPU_IS_020_OR_030) |
| 22 | 18 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE030; |
| 23 | 19 | if (CPU_IS_040_OR_060) { |
| @@ -25,15 +21,11 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, · 1 unmodified line | ||
| 25 | 21 | /* Use no-cache mode, serialized */ |
| 26 | 22 | pgprot_val(vma->vm_page_prot) |= _PAGE_NOCACHE_S; |
| 27 | 23 | } |
| 28 | −} | |
| 29 | 24 | #endif /* CONFIG_SUN3 */ |
| 30 | −#else | |
| 31 | −#define fb_pgprotect(...) do {} while (0) | |
| 32 | 25 | #endif /* CONFIG_MMU */ |
| 33 | − | |
| 34 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 35 | −{ | |
| 36 | − return 0; | |
| 37 | 26 | } |
| 27 | +#define fb_pgprotect fb_pgprotect | |
| 28 | + | |
| 29 | +#include <asm-generic/fb.h> | |
| 38 | 30 | |
| 39 | 31 | #endif /* _ASM_FB_H_ */ |
| @@ -1,19 +1,39 @@ | ||
| 1 | 1 | #ifndef _ASM_FB_H_ |
| 2 | 2 | #define _ASM_FB_H_ |
| 3 | 3 | |
| 4 | −#include <linux/fb.h> | |
| 5 | −#include <linux/fs.h> | |
| 6 | 4 | #include <asm/page.h> |
| 7 | 5 | |
| 6 | +struct file; | |
| 7 | + | |
| 8 | 8 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
| 9 | 9 | unsigned long off) |
| 10 | 10 | { |
| 11 | 11 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
| 12 | 12 | } |
| 13 | +#define fb_pgprotect fb_pgprotect | |
| 13 | 14 | |
| 14 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 15 | +/* | |
| 16 | + * MIPS doesn't define __raw_ I/O macros, so the helpers | |
| 17 | + * in <asm-generic/fb.h> don't generate fb_readq() and | |
| 18 | + * fb_write(). We have to provide them here. | |
| 19 | + * | |
| 20 | + * TODO: Convert MIPS to generic I/O. The helpers below can | |
| 21 | + * then be removed. | |
| 22 | + */ | |
| 23 | +#ifdef CONFIG_64BIT | |
| 24 | +static inline u64 fb_readq(const volatile void __iomem *addr) | |
| 15 | 25 | { |
| 16 | − return 0; | |
| 26 | + return __raw_readq(addr); | |
| 17 | 27 | } |
| 28 | +#define fb_readq fb_readq | |
| 29 | + | |
| 30 | +static inline void fb_writeq(u64 b, volatile void __iomem *addr) | |
| 31 | +{ | |
| 32 | + __raw_writeq(b, addr); | |
| 33 | +} | |
| 34 | +#define fb_writeq fb_writeq | |
| 35 | +#endif | |
| 36 | + | |
| 37 | +#include <asm-generic/fb.h> | |
| 18 | 38 | |
| 19 | 39 | #endif /* _ASM_FB_H_ */ |
| @@ -11,7 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | # Copyright (C) 1994 by Linus Torvalds |
| 12 | 12 | # Portions Copyright (C) 1999 The Puffin Group |
| 13 | 13 | # |
| 14 | −# Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, | |
| 14 | +# Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, | |
| 15 | 15 | # Mike Shaver, Helge Deller and Martin K. Petersen |
| 16 | 16 | # |
| 17 | 17 | |
| @@ -119,6 +119,8 @@ export LIBGCC · 101 unmodified lines | ||
| 119 | 119 | |
| 120 | 120 | libs-y += arch/parisc/lib/ $(LIBGCC) |
| 121 | 121 | |
| 122 | +drivers-y += arch/parisc/video/ | |
| 123 | + | |
| 122 | 124 | boot := arch/parisc/boot |
| 123 | 125 | |
| 124 | 126 | PALO := $(shell if (which palo 2>&1); then : ; \ |
| @@ -2,23 +2,13 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_FB_H_ |
| 3 | 3 | #define _ASM_FB_H_ |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | −#include <asm/page.h> | |
| 5 | +struct fb_info; | |
| 8 | 6 | |
| 9 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 10 | − unsigned long off) | |
| 11 | −{ | |
| 12 | − pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; | |
| 13 | −} | |
| 14 | − | |
| 15 | −#if defined(CONFIG_FB_STI) | |
| 7 | +#if defined(CONFIG_STI_CORE) | |
| 16 | 8 | int fb_is_primary_device(struct fb_info *info); |
| 17 | −#else | |
| 18 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 19 | −{ | |
| 20 | − return 0; | |
| 21 | −} | |
| 9 | +#define fb_is_primary_device fb_is_primary_device | |
| 22 | 10 | #endif |
| 23 | 11 | |
| 12 | +#include <asm-generic/fb.h> | |
| 13 | + | |
| 24 | 14 | #endif /* _ASM_FB_H_ */ |
| @@ -413,12 +413,12 @@ extern void paging_init (void); · 412 unmodified lines | ||
| 413 | 413 | * For the 64bit version, the offset is extended by 32bit. |
| 414 | 414 | */ |
| 415 | 415 | #define __swp_type(x) ((x).val & 0x1f) |
| 416 | −#define __swp_offset(x) ( (((x).val >> 6) & 0x7) | \ | |
| 417 | − (((x).val >> 8) & ~0x7) ) | |
| 416 | +#define __swp_offset(x) ( (((x).val >> 5) & 0x7) | \ | |
| 417 | + (((x).val >> 10) << 3) ) | |
| 418 | 418 | #define __swp_entry(type, offset) ((swp_entry_t) { \ |
| 419 | 419 | ((type) & 0x1f) | \ |
| 420 | − ((offset & 0x7) << 6) | \ | |
| 421 | − ((offset & ~0x7) << 8) }) | |
| 420 | + ((offset & 0x7) << 5) | \ | |
| 421 | + ((offset >> 3) << 10) }) | |
| 422 | 422 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
| 423 | 423 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
| 424 | 424 | |
| @@ -4,6 +4,8 @@ · 3 unmodified lines | ||
| 4 | 4 | #include <linux/console.h> |
| 5 | 5 | #include <linux/kexec.h> |
| 6 | 6 | #include <linux/delay.h> |
| 7 | +#include <linux/reboot.h> | |
| 8 | + | |
| 7 | 9 | #include <asm/cacheflush.h> |
| 8 | 10 | #include <asm/sections.h> |
| 9 | 11 | |
| @@ -0,0 +1,3 @@ | ||
| 1 | +# SPDX-License-Identifier: GPL-2.0-only | |
| 2 | + | |
| 3 | +obj-$(CONFIG_STI_CORE) += fbdev.o | |
| @@ -0,0 +1,26 @@ | ||
| 1 | +// SPDX-License-Identifier: GPL-2.0-only | |
| 2 | +/* | |
| 3 | + * Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | |
| 4 | + * Copyright (C) 2001-2020 Helge Deller <deller@gmx.de> | |
| 5 | + * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de> | |
| 6 | + */ | |
| 7 | + | |
| 8 | +#include <linux/fb.h> | |
| 9 | +#include <linux/module.h> | |
| 10 | + | |
| 11 | +#include <video/sticore.h> | |
| 12 | + | |
| 13 | +int fb_is_primary_device(struct fb_info *info) | |
| 14 | +{ | |
| 15 | + struct sti_struct *sti; | |
| 16 | + | |
| 17 | + sti = sti_get_rom(0); | |
| 18 | + | |
| 19 | + /* if no built-in graphics card found, allow any fb driver as default */ | |
| 20 | + if (!sti) | |
| 21 | + return true; | |
| 22 | + | |
| 23 | + /* return true if it's the default built-in framebuffer driver */ | |
| 24 | + return (sti->info == info); | |
| 25 | +} | |
| 26 | +EXPORT_SYMBOL(fb_is_primary_device); | |
| @@ -2,8 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_FB_H_ |
| 3 | 3 | #define _ASM_FB_H_ |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | 5 | #include <linux/fs.h> |
| 6 | + | |
| 7 | 7 | #include <asm/page.h> |
| 8 | 8 | |
| 9 | 9 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
| @@ -13,10 +13,8 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, · 3 unmodified lines | ||
| 13 | 13 | vma->vm_end - vma->vm_start, |
| 14 | 14 | vma->vm_page_prot); |
| 15 | 15 | } |
| 16 | +#define fb_pgprotect fb_pgprotect | |
| 16 | 17 | |
| 17 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 18 | −{ | |
| 19 | − return 0; | |
| 20 | −} | |
| 18 | +#include <asm-generic/fb.h> | |
| 21 | 19 | |
| 22 | 20 | #endif /* _ASM_FB_H_ */ |
| @@ -22,7 +22,7 @@ KCOV_INSTRUMENT := n · 21 unmodified lines | ||
| 22 | 22 | |
| 23 | 23 | $(obj)/%.pi.o: OBJCOPYFLAGS := --prefix-symbols=__pi_ \ |
| 24 | 24 | --remove-section=.note.gnu.property \ |
| 25 | − --prefix-alloc-sections=.init | |
| 25 | + --prefix-alloc-sections=.init.pi | |
| 26 | 26 | $(obj)/%.pi.o: $(obj)/%.o FORCE |
| 27 | 27 | $(call if_changed,objcopy) |
| 28 | 28 | |
| @@ -84,11 +84,8 @@ SECTIONS · 83 unmodified lines | ||
| 84 | 84 | __init_data_begin = .; |
| 85 | 85 | INIT_DATA_SECTION(16) |
| 86 | 86 | |
| 87 | − /* Those sections result from the compilation of kernel/pi/string.c */ | |
| 88 | − .init.pidata : { | |
| 89 | − *(.init.srodata.cst8*) | |
| 90 | − *(.init__bug_table*) | |
| 91 | − *(.init.sdata*) | |
| 87 | + .init.pi : { | |
| 88 | + *(.init.pi*) | |
| 92 | 89 | } |
| 93 | 90 | |
| 94 | 91 | .init.bss : { |
| @@ -2,19 +2,6 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_FB_H_ |
| 3 | 3 | #define _ASM_FB_H_ |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | −#include <asm/page.h> | |
| 8 | − | |
| 9 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 10 | − unsigned long off) | |
| 11 | −{ | |
| 12 | − vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | |
| 13 | −} | |
| 14 | − | |
| 15 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 16 | −{ | |
| 17 | − return 0; | |
| 18 | −} | |
| 5 | +#include <asm-generic/fb.h> | |
| 19 | 6 | |
| 20 | 7 | #endif /* _ASM_FB_H_ */ |
| @@ -60,6 +60,7 @@ libs-y += arch/sparc/prom/ · 59 unmodified lines | ||
| 60 | 60 | libs-y += arch/sparc/lib/ |
| 61 | 61 | |
| 62 | 62 | drivers-$(CONFIG_PM) += arch/sparc/power/ |
| 63 | +drivers-$(CONFIG_FB) += arch/sparc/video/ | |
| 63 | 64 | |
| 64 | 65 | boot := arch/sparc/boot |
| 65 | 66 | |
| @@ -1,34 +1,41 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | 2 | #ifndef _SPARC_FB_H_ |
| 3 | 3 | #define _SPARC_FB_H_ |
| 4 | −#include <linux/console.h> | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | −#include <asm/page.h> | |
| 8 | −#include <asm/prom.h> | |
| 9 | 4 | |
| 5 | +#include <linux/io.h> | |
| 6 | + | |
| 7 | +struct fb_info; | |
| 8 | +struct file; | |
| 9 | +struct vm_area_struct; | |
| 10 | + | |
| 11 | +#ifdef CONFIG_SPARC32 | |
| 10 | 12 | static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, |
| 11 | 13 | unsigned long off) |
| 12 | −{ | |
| 13 | −#ifdef CONFIG_SPARC64 | |
| 14 | − vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); | |
| 14 | +{ } | |
| 15 | +#define fb_pgprotect fb_pgprotect | |
| 15 | 16 | #endif |
| 16 | −} | |
| 17 | 17 | |
| 18 | −static inline int fb_is_primary_device(struct fb_info *info) | |
| 19 | −{ | |
| 20 | − struct device *dev = info->device; | |
| 21 | − struct device_node *node; | |
| 18 | +int fb_is_primary_device(struct fb_info *info); | |
| 19 | +#define fb_is_primary_device fb_is_primary_device | |
| 22 | 20 | |
| 23 | − if (console_set_on_cmdline) | |
| 24 | − return 0; | |
| 21 | +static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) | |
| 22 | +{ | |
| 23 | + sbus_memcpy_fromio(to, from, n); | |
| 24 | +} | |
| 25 | +#define fb_memcpy_fromio fb_memcpy_fromio | |
| 25 | 26 | |
| 26 | − node = dev->of_node; | |
| 27 | − if (node && | |
| 28 | − node == of_console_device) | |
| 29 | − return 1; | |
| 27 | +static inline void fb_memcpy_toio(volatile void __iomem *to, const void *from, size_t n) | |
| 28 | +{ | |
| 29 | + sbus_memcpy_toio(to, from, n); | |
| 30 | +} | |
| 31 | +#define fb_memcpy_toio fb_memcpy_toio | |
| 30 | 32 | |
| 31 | − return 0; | |
| 33 | +static inline void fb_memset_io(volatile void __iomem *addr, int c, size_t n) | |
| 34 | +{ | |
| 35 | + sbus_memset_io(addr, c, n); | |
| 32 | 36 | } |
| 37 | +#define fb_memset fb_memset_io | |
| 38 | + | |
| 39 | +#include <asm-generic/fb.h> | |
| 33 | 40 | |
| 34 | 41 | #endif /* _SPARC_FB_H_ */ |
| @@ -0,0 +1,3 @@ | ||
| 1 | +# SPDX-License-Identifier: GPL-2.0-only | |
| 2 | + | |
| 3 | +obj-$(CONFIG_FB) += fbdev.o | |
| @@ -0,0 +1,23 @@ | ||
| 1 | +// SPDX-License-Identifier: GPL-2.0 | |
| 2 | + | |
| 3 | +#include <linux/console.h> | |
| 4 | +#include <linux/fb.h> | |
| 5 | +#include <linux/module.h> | |
| 6 | + | |
| 7 | +#include <asm/prom.h> | |
| 8 | + | |
| 9 | +int fb_is_primary_device(struct fb_info *info) | |
| 10 | +{ | |
| 11 | + struct device *dev = info->device; | |
| 12 | + struct device_node *node; | |
| 13 | + | |
| 14 | + if (console_set_on_cmdline) | |
| 15 | + return 0; | |
| 16 | + | |
| 17 | + node = dev->of_node; | |
| 18 | + if (node && node == of_console_device) | |
| 19 | + return 1; | |
| 20 | + | |
| 21 | + return 0; | |
| 22 | +} | |
| 23 | +EXPORT_SYMBOL(fb_is_primary_device); | |
| @@ -1703,10 +1703,8 @@ int x86_pmu_handle_irq(struct pt_regs *regs) · 1702 unmodified lines | ||
| 1703 | 1703 | |
| 1704 | 1704 | perf_sample_data_init(&data, 0, event->hw.last_period); |
| 1705 | 1705 | |
| 1706 | − if (has_branch_stack(event)) { | |
| 1707 | − data.br_stack = &cpuc->lbr_stack; | |
| 1708 | − data.sample_flags |= PERF_SAMPLE_BRANCH_STACK; | |
| 1709 | − } | |
| 1706 | + if (has_branch_stack(event)) | |
| 1707 | + perf_sample_save_brstack(&data, event, &cpuc->lbr_stack); | |
| 1710 | 1708 | |
| 1711 | 1709 | if (perf_event_overflow(event, &data, regs)) |
| 1712 | 1710 | x86_pmu_stop(event, 0); |
| @@ -1229,12 +1229,14 @@ pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, · 1228 unmodified lines | ||
| 1229 | 1229 | struct perf_event *event, bool add) |
| 1230 | 1230 | { |
| 1231 | 1231 | struct pmu *pmu = event->pmu; |
| 1232 | + | |
| 1232 | 1233 | /* |
| 1233 | 1234 | * Make sure we get updated with the first PEBS |
| 1234 | 1235 | * event. It will trigger also during removal, but |
| 1235 | 1236 | * that does not hurt: |
| 1236 | 1237 | */ |
| 1237 | − bool update = cpuc->n_pebs == 1; | |
| 1238 | + if (cpuc->n_pebs == 1) | |
| 1239 | + cpuc->pebs_data_cfg = PEBS_UPDATE_DS_SW; | |
| 1238 | 1240 | |
| 1239 | 1241 | if (needed_cb != pebs_needs_sched_cb(cpuc)) { |
| 1240 | 1242 | if (!needed_cb) |
| @@ -1242,7 +1244,7 @@ pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, · 1 unmodified line | ||
| 1242 | 1244 | else |
| 1243 | 1245 | perf_sched_cb_dec(pmu); |
| 1244 | 1246 | |
| 1245 | − update = true; | |
| 1247 | + cpuc->pebs_data_cfg |= PEBS_UPDATE_DS_SW; | |
| 1246 | 1248 | } |
| 1247 | 1249 | |
| 1248 | 1250 | /* |
| @@ -1252,24 +1254,13 @@ pebs_update_state(bool needed_cb, struct cpu_hw_events *cpuc, · 3 unmodified lines | ||
| 1252 | 1254 | if (x86_pmu.intel_cap.pebs_baseline && add) { |
| 1253 | 1255 | u64 pebs_data_cfg; |
| 1254 | 1256 | |
| 1255 | − /* Clear pebs_data_cfg and pebs_record_size for first PEBS. */ | |
| 1256 | − if (cpuc->n_pebs == 1) { | |
| 1257 | − cpuc->pebs_data_cfg = 0; | |
| 1258 | − cpuc->pebs_record_size = sizeof(struct pebs_basic); | |
| 1259 | − } | |
| 1260 | − | |
| 1261 | 1257 | pebs_data_cfg = pebs_update_adaptive_cfg(event); |
| 1262 | − | |
| 1263 | − /* Update pebs_record_size if new event requires more data. */ | |
| 1264 | − if (pebs_data_cfg & ~cpuc->pebs_data_cfg) { | |
| 1265 | − cpuc->pebs_data_cfg |= pebs_data_cfg; | |
| 1266 | − adaptive_pebs_record_size_update(); | |
| 1267 | − update = true; | |
| 1268 | − } | |
| 1258 | + /* | |
| 1259 | + * Be sure to update the thresholds when we change the record. | |
| 1260 | + */ | |
| 1261 | + if (pebs_data_cfg & ~cpuc->pebs_data_cfg) | |
| 1262 | + cpuc->pebs_data_cfg |= pebs_data_cfg | PEBS_UPDATE_DS_SW; | |
| 1269 | 1263 | } |
| 1270 | − | |
| 1271 | − if (update) | |
| 1272 | − pebs_update_threshold(cpuc); | |
| 1273 | 1264 | } |
| 1274 | 1265 | |
| 1275 | 1266 | void intel_pmu_pebs_add(struct perf_event *event) |
| @@ -1326,9 +1317,17 @@ static void intel_pmu_pebs_via_pt_enable(struct perf_event *event) · 50 unmodified lines | ||
| 1326 | 1317 | wrmsrl(base + idx, value); |
| 1327 | 1318 | } |
| 1328 | 1319 | |
| 1320 | +static inline void intel_pmu_drain_large_pebs(struct cpu_hw_events *cpuc) | |
| 1321 | +{ | |
| 1322 | + if (cpuc->n_pebs == cpuc->n_large_pebs && | |
| 1323 | + cpuc->n_pebs != cpuc->n_pebs_via_pt) | |
| 1324 | + intel_pmu_drain_pebs_buffer(); | |
| 1325 | +} | |
| 1326 | + | |
| 1329 | 1327 | void intel_pmu_pebs_enable(struct perf_event *event) |
| 1330 | 1328 | { |
| 1331 | 1329 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
| 1330 | + u64 pebs_data_cfg = cpuc->pebs_data_cfg & ~PEBS_UPDATE_DS_SW; | |
| 1332 | 1331 | struct hw_perf_event *hwc = &event->hw; |
| 1333 | 1332 | struct debug_store *ds = cpuc->ds; |
| 1334 | 1333 | unsigned int idx = hwc->idx; |
| @@ -1344,11 +1343,22 @@ void intel_pmu_pebs_enable(struct perf_event *event) · 9 unmodified lines | ||
| 1344 | 1343 | |
| 1345 | 1344 | if (x86_pmu.intel_cap.pebs_baseline) { |
| 1346 | 1345 | hwc->config |= ICL_EVENTSEL_ADAPTIVE; |
| 1347 | − if (cpuc->pebs_data_cfg != cpuc->active_pebs_data_cfg) { | |
| 1348 | − wrmsrl(MSR_PEBS_DATA_CFG, cpuc->pebs_data_cfg); | |
| 1349 | − cpuc->active_pebs_data_cfg = cpuc->pebs_data_cfg; | |
| 1346 | + if (pebs_data_cfg != cpuc->active_pebs_data_cfg) { | |
| 1347 | + /* | |
| 1348 | + * drain_pebs() assumes uniform record size; | |
| 1349 | + * hence we need to drain when changing said | |
| 1350 | + * size. | |
| 1351 | + */ | |
| 1352 | + intel_pmu_drain_large_pebs(cpuc); | |
| 1353 | + adaptive_pebs_record_size_update(); | |
| 1354 | + wrmsrl(MSR_PEBS_DATA_CFG, pebs_data_cfg); | |
| 1355 | + cpuc->active_pebs_data_cfg = pebs_data_cfg; | |
| 1350 | 1356 | } |
| 1351 | 1357 | } |
| 1358 | + if (cpuc->pebs_data_cfg & PEBS_UPDATE_DS_SW) { | |
| 1359 | + cpuc->pebs_data_cfg = pebs_data_cfg; | |
| 1360 | + pebs_update_threshold(cpuc); | |
| 1361 | + } | |
| 1352 | 1362 | |
| 1353 | 1363 | if (idx >= INTEL_PMC_IDX_FIXED) { |
| 1354 | 1364 | if (x86_pmu.intel_cap.pebs_format < 5) |
| @@ -1391,9 +1401,7 @@ void intel_pmu_pebs_disable(struct perf_event *event) · 36 unmodified lines | ||
| 1391 | 1401 | struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); |
| 1392 | 1402 | struct hw_perf_event *hwc = &event->hw; |
| 1393 | 1403 | |
| 1394 | − if (cpuc->n_pebs == cpuc->n_large_pebs && | |
| 1395 | − cpuc->n_pebs != cpuc->n_pebs_via_pt) | |
| 1396 | − intel_pmu_drain_pebs_buffer(); | |
| 1404 | + intel_pmu_drain_large_pebs(cpuc); | |
| 1397 | 1405 | |
| 1398 | 1406 | cpuc->pebs_enabled &= ~(1ULL << hwc->idx); |
| 1399 | 1407 | |
| @@ -2,21 +2,16 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef _ASM_X86_FB_H |
| 3 | 3 | #define _ASM_X86_FB_H |
| 4 | 4 | |
| 5 | −#include <linux/fb.h> | |
| 6 | −#include <linux/fs.h> | |
| 7 | −#include <asm/page.h> | |
| 5 | +struct fb_info; | |
| 6 | +struct file; | |
| 7 | +struct vm_area_struct; | |
| 8 | 8 | |
| 9 | −static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma, | |
| 10 | − unsigned long off) | |
| 11 | −{ | |
| 12 | − unsigned long prot; | |
| 9 | +void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off); | |
| 10 | +#define fb_pgprotect fb_pgprotect | |
| 13 | 11 | |
| 14 | − prot = pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK; | |
| 15 | − if (boot_cpu_data.x86 > 3) | |
| 16 | − pgprot_val(vma->vm_page_prot) = | |
| 17 | − prot | cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS); | |
| 18 | −} | |
| 12 | +int fb_is_primary_device(struct fb_info *info); | |
| 13 | +#define fb_is_primary_device fb_is_primary_device | |
| 19 | 14 | |
| 20 | −extern int fb_is_primary_device(struct fb_info *info); | |
| 15 | +#include <asm-generic/fb.h> | |
| 21 | 16 | |
| 22 | 17 | #endif /* _ASM_X86_FB_H */ |
| @@ -121,6 +121,9 @@ · 120 unmodified lines | ||
| 121 | 121 | #define PEBS_DATACFG_LBRS BIT_ULL(3) |
| 122 | 122 | #define PEBS_DATACFG_LBR_SHIFT 24 |
| 123 | 123 | |
| 124 | +/* Steal the highest bit of pebs_data_cfg for SW usage */ | |
| 125 | +#define PEBS_UPDATE_DS_SW BIT_ULL(63) | |
| 126 | + | |
| 124 | 127 | /* |
| 125 | 128 | * Intel "Architectural Performance Monitoring" CPUID |
| 126 | 129 | * detection/enumeration details: |
| @@ -36,6 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | #define PCI_DEVICE_ID_AMD_19H_M50H_DF_F4 0x166e |
| 37 | 37 | #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 |
| 38 | 38 | #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 |
| 39 | +#define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc | |
| 39 | 40 | |
| 40 | 41 | /* Protect the PCI config register pairs used for SMN. */ |
| 41 | 42 | static DEFINE_MUTEX(smn_mutex); |
| @@ -79,6 +80,7 @@ static const struct pci_device_id amd_nb_misc_ids[] = { · 37 unmodified lines | ||
| 79 | 80 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F3) }, |
| 80 | 81 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, |
| 81 | 82 | { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, |
| 83 | + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, | |
| 82 | 84 | {} |
| 83 | 85 | }; |
| 84 | 86 | |
| @@ -144,8 +144,8 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array) · 143 unmodified lines | ||
| 144 | 144 | */ |
| 145 | 145 | .align 64 |
| 146 | 146 | .skip 63, 0xcc |
| 147 | −SYM_FUNC_START_NOALIGN(zen_untrain_ret); | |
| 148 | − | |
| 147 | +SYM_START(zen_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE) | |
| 148 | + ANNOTATE_NOENDBR | |
| 149 | 149 | /* |
| 150 | 150 | * As executed from zen_untrain_ret, this is: |
| 151 | 151 | * |
| @@ -6,35 +6,37 @@ · 5 unmodified lines | ||
| 6 | 6 | * for more details. |
| 7 | 7 | * |
| 8 | 8 | */ |
| 9 | + | |
| 9 | 10 | #include <linux/fb.h> |
| 10 | −#include <linux/pci.h> | |
| 11 | 11 | #include <linux/module.h> |
| 12 | +#include <linux/pci.h> | |
| 12 | 13 | #include <linux/vgaarb.h> |
| 13 | 14 | |
| 15 | +void fb_pgprotect(struct file *file, struct vm_area_struct *vma, unsigned long off) | |
| 16 | +{ | |
| 17 | + unsigned long prot; | |
| 18 | + | |
| 19 | + prot = pgprot_val(vma->vm_page_prot) & ~_PAGE_CACHE_MASK; | |
| 20 | + if (boot_cpu_data.x86 > 3) | |
| 21 | + pgprot_val(vma->vm_page_prot) = | |
| 22 | + prot | cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS); | |
| 23 | +} | |
| 24 | +EXPORT_SYMBOL(fb_pgprotect); | |
| 25 | + | |
| 14 | 26 | int fb_is_primary_device(struct fb_info *info) |
| 15 | 27 | { |
| 16 | 28 | struct device *device = info->device; |
| 17 | − struct pci_dev *default_device = vga_default_device(); | |
| 18 | 29 | struct pci_dev *pci_dev; |
| 19 | − struct resource *res; | |
| 20 | 30 | |
| 21 | 31 | if (!device || !dev_is_pci(device)) |
| 22 | 32 | return 0; |
| 23 | 33 | |
| 24 | 34 | pci_dev = to_pci_dev(device); |
| 25 | 35 | |
| 26 | − if (default_device) { | |
| 27 | − if (pci_dev == default_device) | |
| 28 | − return 1; | |
| 29 | − return 0; | |
| 30 | − } | |
| 31 | − | |
| 32 | − res = pci_dev->resource + PCI_ROM_RESOURCE; | |
| 33 | − | |
| 34 | − if (res->flags & IORESOURCE_ROM_SHADOW) | |
| 36 | + if (pci_dev == vga_default_device()) | |
| 35 | 37 | return 1; |
| 36 | − | |
| 37 | 38 | return 0; |
| 38 | 39 | } |
| 39 | 40 | EXPORT_SYMBOL(fb_is_primary_device); |
| 41 | + | |
| 40 | 42 | MODULE_LICENSE("GPL"); |
| @@ -72,7 +72,7 @@ static int cfag12864bfb_probe(struct platform_device *device) · 71 unmodified lines | ||
| 72 | 72 | if (!info) |
| 73 | 73 | goto none; |
| 74 | 74 | |
| 75 | − info->screen_base = (char __iomem *) cfag12864b_buffer; | |
| 75 | + info->screen_buffer = cfag12864b_buffer; | |
| 76 | 76 | info->screen_size = CFAG12864B_SIZE; |
| 77 | 77 | info->fbops = &cfag12864bfb_ops; |
| 78 | 78 | info->fix = cfag12864bfb_fix; |
| @@ -640,7 +640,7 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv, · 639 unmodified lines | ||
| 640 | 640 | |
| 641 | 641 | INIT_DELAYED_WORK(&priv->work, ht16k33_fb_update); |
| 642 | 642 | fbdev->info->fbops = &ht16k33_fb_ops; |
| 643 | − fbdev->info->screen_base = (char __iomem *) fbdev->buffer; | |
| 643 | + fbdev->info->screen_buffer = fbdev->buffer; | |
| 644 | 644 | fbdev->info->screen_size = HT16K33_FB_SIZE; |
| 645 | 645 | fbdev->info->fix = ht16k33_fb_fix; |
| 646 | 646 | fbdev->info->var = ht16k33_fb_var; |
| @@ -1666,7 +1666,7 @@ static int nbd_dev_dbg_init(struct nbd_device *nbd) · 1665 unmodified lines | ||
| 1666 | 1666 | return -EIO; |
| 1667 | 1667 | |
| 1668 | 1668 | dir = debugfs_create_dir(nbd_name(nbd), nbd_dbg_dir); |
| 1669 | − if (!dir) { | |
| 1669 | + if (IS_ERR(dir)) { | |
| 1670 | 1670 | dev_err(nbd_to_dev(nbd), "Failed to create debugfs dir for '%s'\n", |
| 1671 | 1671 | nbd_name(nbd)); |
| 1672 | 1672 | return -EIO; |
| @@ -1692,7 +1692,7 @@ static int nbd_dbg_init(void) · 19 unmodified lines | ||
| 1692 | 1692 | struct dentry *dbg_dir; |
| 1693 | 1693 | |
| 1694 | 1694 | dbg_dir = debugfs_create_dir("nbd", NULL); |
| 1695 | − if (!dbg_dir) | |
| 1695 | + if (IS_ERR(dbg_dir)) | |
| 1696 | 1696 | return -EIO; |
| 1697 | 1697 | |
| 1698 | 1698 | nbd_dbg_dir = dbg_dir; |
| @@ -241,7 +241,7 @@ static inline blk_opf_t rnbd_to_bio_flags(u32 rnbd_opf) · 240 unmodified lines | ||
| 241 | 241 | bio_opf = REQ_OP_WRITE; |
| 242 | 242 | break; |
| 243 | 243 | case RNBD_OP_FLUSH: |
| 244 | − bio_opf = REQ_OP_FLUSH | REQ_PREFLUSH; | |
| 244 | + bio_opf = REQ_OP_WRITE | REQ_PREFLUSH; | |
| 245 | 245 | break; |
| 246 | 246 | case RNBD_OP_DISCARD: |
| 247 | 247 | bio_opf = REQ_OP_DISCARD; |
| @@ -1281,7 +1281,7 @@ static inline int ublk_check_cmd_op(u32 cmd_op) · 1280 unmodified lines | ||
| 1281 | 1281 | { |
| 1282 | 1282 | u32 ioc_type = _IOC_TYPE(cmd_op); |
| 1283 | 1283 | |
| 1284 | − if (IS_ENABLED(CONFIG_BLKDEV_UBLK_LEGACY_OPCODES) && ioc_type != 'u') | |
| 1284 | + if (!IS_ENABLED(CONFIG_BLKDEV_UBLK_LEGACY_OPCODES) && ioc_type != 'u') | |
| 1285 | 1285 | return -EOPNOTSUPP; |
| 1286 | 1286 | |
| 1287 | 1287 | if (ioc_type != 'u' && ioc_type != 0) |
| @@ -571,6 +571,7 @@ void read_cdat_data(struct cxl_port *port) · 570 unmodified lines | ||
| 571 | 571 | /* Don't leave table data allocated on error */ |
| 572 | 572 | devm_kfree(dev, cdat_table); |
| 573 | 573 | dev_err(dev, "CDAT data read error\n"); |
| 574 | + return; | |
| 574 | 575 | } |
| 575 | 576 | |
| 576 | 577 | port->cdat.table = cdat_table + sizeof(__le32); |
| @@ -660,7 +660,7 @@ EXPORT_SYMBOL_GPL(dma_resv_get_singleton); · 659 unmodified lines | ||
| 660 | 660 | * dma_resv_lock() already |
| 661 | 661 | * RETURNS |
| 662 | 662 | * Returns -ERESTARTSYS if interrupted, 0 if the wait timed out, or |
| 663 | − * greater than zer on success. | |
| 663 | + * greater than zero on success. | |
| 664 | 664 | */ |
| 665 | 665 | long dma_resv_wait_timeout(struct dma_resv *obj, enum dma_resv_usage usage, |
| 666 | 666 | bool intr, unsigned long timeout) |
| @@ -85,7 +85,7 @@ static struct sync_timeline *sync_timeline_create(const char *name) · 84 unmodified lines | ||
| 85 | 85 | |
| 86 | 86 | kref_init(&obj->kref); |
| 87 | 87 | obj->context = dma_fence_context_alloc(1); |
| 88 | − strlcpy(obj->name, name, sizeof(obj->name)); | |
| 88 | + strscpy(obj->name, name, sizeof(obj->name)); | |
| 89 | 89 | |
| 90 | 90 | obj->pt_tree = RB_ROOT; |
| 91 | 91 | INIT_LIST_HEAD(&obj->pt_list); |
| @@ -706,21 +706,22 @@ static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r, · 705 unmodified lines | ||
| 706 | 706 | int rcode; |
| 707 | 707 | |
| 708 | 708 | if (destination == IEEE1394_ALL_NODES) { |
| 709 | − kfree(r); | |
| 710 | − | |
| 711 | − return; | |
| 712 | − } | |
| 713 | − | |
| 714 | − if (offset != dev->handler.offset) | |
| 709 | + // Although the response to the broadcast packet is not necessarily required, the | |
| 710 | + // fw_send_response() function should still be called to maintain the reference | |
| 711 | + // counting of the object. In the case, the call of function just releases the | |
| 712 | + // object as a result to decrease the reference counting. | |
| 713 | + rcode = RCODE_COMPLETE; | |
| 714 | + } else if (offset != dev->handler.offset) { | |
| 715 | 715 | rcode = RCODE_ADDRESS_ERROR; |
| 716 | − else if (tcode != TCODE_WRITE_BLOCK_REQUEST) | |
| 716 | + } else if (tcode != TCODE_WRITE_BLOCK_REQUEST) { | |
| 717 | 717 | rcode = RCODE_TYPE_ERROR; |
| 718 | − else if (fwnet_incoming_packet(dev, payload, length, | |
| 719 | − source, generation, false) != 0) { | |
| 718 | + } else if (fwnet_incoming_packet(dev, payload, length, | |
| 719 | + source, generation, false) != 0) { | |
| 720 | 720 | dev_err(&dev->netdev->dev, "incoming packet failure\n"); |
| 721 | 721 | rcode = RCODE_CONFLICT_ERROR; |
| 722 | − } else | |
| 722 | + } else { | |
| 723 | 723 | rcode = RCODE_COMPLETE; |
| 724 | + } | |
| 724 | 725 | |
| 725 | 726 | fw_send_response(card, r, rcode); |
| 726 | 727 | } |
| @@ -128,4 +128,4 @@ unlock_mutex: · 127 unmodified lines | ||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /* must execute after PCI subsystem for EFI quirks */ |
| 131 | −device_initcall(sysfb_init); | |
| 131 | +subsys_initcall_sync(sysfb_init); | |
| @@ -51,7 +51,8 @@ __init bool sysfb_parse_mode(const struct screen_info *si, · 50 unmodified lines | ||
| 51 | 51 | * |
| 52 | 52 | * It's not easily possible to fix this in struct screen_info, |
| 53 | 53 | * as this could break UAPI. The best solution is to compute |
| 54 | − * bits_per_pixel here and ignore lfb_depth. In the loop below, | |
| 54 | + * bits_per_pixel from the color bits, reserved bits and | |
| 55 | + * reported lfb_depth, whichever is highest. In the loop below, | |
| 55 | 56 | * ignore simplefb formats with alpha bits, as EFI and VESA |
| 56 | 57 | * don't specify alpha channels. |
| 57 | 58 | */ |
| @@ -60,6 +61,7 @@ __init bool sysfb_parse_mode(const struct screen_info *si, · 2 unmodified lines | ||
| 60 | 61 | si->green_size + si->green_pos, |
| 61 | 62 | si->blue_size + si->blue_pos), |
| 62 | 63 | si->rsvd_size + si->rsvd_pos); |
| 64 | + bits_per_pixel = max_t(u32, bits_per_pixel, si->lfb_depth); | |
| 63 | 65 | } else { |
| 64 | 66 | bits_per_pixel = si->lfb_depth; |
| 65 | 67 | } |
| @@ -3757,6 +3757,12 @@ int amdgpu_device_init(struct amdgpu_device *adev, · 3756 unmodified lines | ||
| 3757 | 3757 | adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *) |
| 3758 | 3758 | adev->virt.fw_reserve.p_pf2vf)->pcie_atomic_ops_support_flags == |
| 3759 | 3759 | (PCI_EXP_DEVCAP2_ATOMIC_COMP32 | PCI_EXP_DEVCAP2_ATOMIC_COMP64); |
| 3760 | + /* APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is a | |
| 3761 | + * internal path natively support atomics, set have_atomics_support to true. | |
| 3762 | + */ | |
| 3763 | + else if ((adev->flags & AMD_IS_APU) && | |
| 3764 | + (adev->ip_versions[GC_HWIP][0] > IP_VERSION(9, 0, 0))) | |
| 3765 | + adev->have_atomics_support = true; | |
| 3760 | 3766 | else |
| 3761 | 3767 | adev->have_atomics_support = |
| 3762 | 3768 | !pci_enable_atomic_ops_to_root(adev->pdev, |
| @@ -4506,7 +4512,11 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev) · 743 unmodified lines | ||
| 4506 | 4512 | dev_info(adev->dev, "recover vram bo from shadow start\n"); |
| 4507 | 4513 | mutex_lock(&adev->shadow_list_lock); |
| 4508 | 4514 | list_for_each_entry(vmbo, &adev->shadow_list, shadow_list) { |
| 4509 | − shadow = &vmbo->bo; | |
| 4515 | + /* If vm is compute context or adev is APU, shadow will be NULL */ | |
| 4516 | + if (!vmbo->shadow) | |
| 4517 | + continue; | |
| 4518 | + shadow = vmbo->shadow; | |
| 4519 | + | |
| 4510 | 4520 | /* No need to recover an evicted BO */ |
| 4511 | 4521 | if (shadow->tbo.resource->mem_type != TTM_PL_TT || |
| 4512 | 4522 | shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET || |
| @@ -687,9 +687,11 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r · 686 unmodified lines | ||
| 687 | 687 | if (r) |
| 688 | 688 | return r; |
| 689 | 689 | |
| 690 | − r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); | |
| 691 | − if (r) | |
| 692 | − goto late_fini; | |
| 690 | + if (adev->gfx.cp_ecc_error_irq.funcs) { | |
| 691 | + r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); | |
| 692 | + if (r) | |
| 693 | + goto late_fini; | |
| 694 | + } | |
| 693 | 695 | } else { |
| 694 | 696 | amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0); |
| 695 | 697 | } |
| @@ -1315,13 +1315,6 @@ static int gfx_v11_0_sw_init(void *handle) · 1314 unmodified lines | ||
| 1315 | 1315 | if (r) |
| 1316 | 1316 | return r; |
| 1317 | 1317 | |
| 1318 | − /* ECC error */ | |
| 1319 | − r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GRBM_CP, | |
| 1320 | − GFX_11_0_0__SRCID__CP_ECC_ERROR, | |
| 1321 | − &adev->gfx.cp_ecc_error_irq); | |
| 1322 | − if (r) | |
| 1323 | − return r; | |
| 1324 | − | |
| 1325 | 1318 | /* FED error */ |
| 1326 | 1319 | r = amdgpu_irq_add_id(adev, SOC21_IH_CLIENTID_GFX, |
| 1327 | 1320 | GFX_11_0_0__SRCID__RLC_GC_FED_INTERRUPT, |
| @@ -4444,7 +4437,6 @@ static int gfx_v11_0_hw_fini(void *handle) · 3116 unmodified lines | ||
| 4444 | 4437 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 4445 | 4438 | int r; |
| 4446 | 4439 | |
| 4447 | − amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0); | |
| 4448 | 4440 | amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); |
| 4449 | 4441 | amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); |
| 4450 | 4442 | |
| @@ -5897,36 +5889,6 @@ static void gfx_v11_0_set_compute_eop_interrupt_state(struct amdgpu_device *adev · 1446 unmodified lines | ||
| 5897 | 5889 | } |
| 5898 | 5890 | } |
| 5899 | 5891 | |
| 5900 | −#define CP_ME1_PIPE_INST_ADDR_INTERVAL 0x1 | |
| 5901 | −#define SET_ECC_ME_PIPE_STATE(reg_addr, state) \ | |
| 5902 | − do { \ | |
| 5903 | − uint32_t tmp = RREG32_SOC15_IP(GC, reg_addr); \ | |
| 5904 | − tmp = REG_SET_FIELD(tmp, CP_ME1_PIPE0_INT_CNTL, CP_ECC_ERROR_INT_ENABLE, state); \ | |
| 5905 | − WREG32_SOC15_IP(GC, reg_addr, tmp); \ | |
| 5906 | − } while (0) | |
| 5907 | − | |
| 5908 | −static int gfx_v11_0_set_cp_ecc_error_state(struct amdgpu_device *adev, | |
| 5909 | − struct amdgpu_irq_src *source, | |
| 5910 | − unsigned type, | |
| 5911 | − enum amdgpu_interrupt_state state) | |
| 5912 | −{ | |
| 5913 | − uint32_t ecc_irq_state = 0; | |
| 5914 | − uint32_t pipe0_int_cntl_addr = 0; | |
| 5915 | − int i = 0; | |
| 5916 | − | |
| 5917 | − ecc_irq_state = (state == AMDGPU_IRQ_STATE_ENABLE) ? 1 : 0; | |
| 5918 | − | |
| 5919 | − pipe0_int_cntl_addr = SOC15_REG_OFFSET(GC, 0, regCP_ME1_PIPE0_INT_CNTL); | |
| 5920 | − | |
| 5921 | − WREG32_FIELD15_PREREG(GC, 0, CP_INT_CNTL_RING0, CP_ECC_ERROR_INT_ENABLE, ecc_irq_state); | |
| 5922 | − | |
| 5923 | − for (i = 0; i < adev->gfx.mec.num_pipe_per_mec; i++) | |
| 5924 | − SET_ECC_ME_PIPE_STATE(pipe0_int_cntl_addr + i * CP_ME1_PIPE_INST_ADDR_INTERVAL, | |
| 5925 | − ecc_irq_state); | |
| 5926 | − | |
| 5927 | − return 0; | |
| 5928 | −} | |
| 5929 | − | |
| 5930 | 5892 | static int gfx_v11_0_set_eop_interrupt_state(struct amdgpu_device *adev, |
| 5931 | 5893 | struct amdgpu_irq_src *src, |
| 5932 | 5894 | unsigned type, |
| @@ -6341,11 +6303,6 @@ static const struct amdgpu_irq_src_funcs gfx_v11_0_priv_inst_irq_funcs = { · 408 unmodified lines | ||
| 6341 | 6303 | .process = gfx_v11_0_priv_inst_irq, |
| 6342 | 6304 | }; |
| 6343 | 6305 | |
| 6344 | −static const struct amdgpu_irq_src_funcs gfx_v11_0_cp_ecc_error_irq_funcs = { | |
| 6345 | − .set = gfx_v11_0_set_cp_ecc_error_state, | |
| 6346 | − .process = amdgpu_gfx_cp_ecc_error_irq, | |
| 6347 | −}; | |
| 6348 | − | |
| 6349 | 6306 | static const struct amdgpu_irq_src_funcs gfx_v11_0_rlc_gc_fed_irq_funcs = { |
| 6350 | 6307 | .process = gfx_v11_0_rlc_gc_fed_irq, |
| 6351 | 6308 | }; |
| @@ -6361,9 +6318,6 @@ static void gfx_v11_0_set_irq_funcs(struct amdgpu_device *adev) · 9 unmodified lines | ||
| 6361 | 6318 | adev->gfx.priv_inst_irq.num_types = 1; |
| 6362 | 6319 | adev->gfx.priv_inst_irq.funcs = &gfx_v11_0_priv_inst_irq_funcs; |
| 6363 | 6320 | |
| 6364 | − adev->gfx.cp_ecc_error_irq.num_types = 1; /* CP ECC error */ | |
| 6365 | − adev->gfx.cp_ecc_error_irq.funcs = &gfx_v11_0_cp_ecc_error_irq_funcs; | |
| 6366 | − | |
| 6367 | 6321 | adev->gfx.rlc_gc_fed_irq.num_types = 1; /* 0x80 FED error */ |
| 6368 | 6322 | adev->gfx.rlc_gc_fed_irq.funcs = &gfx_v11_0_rlc_gc_fed_irq_funcs; |
| 6369 | 6323 | |
| @@ -3764,7 +3764,8 @@ static int gfx_v9_0_hw_fini(void *handle) · 3763 unmodified lines | ||
| 3764 | 3764 | { |
| 3765 | 3765 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
| 3766 | 3766 | |
| 3767 | − amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0); | |
| 3767 | + if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX)) | |
| 3768 | + amdgpu_irq_put(adev, &adev->gfx.cp_ecc_error_irq, 0); | |
| 3768 | 3769 | amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); |
| 3769 | 3770 | amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0); |
| 3770 | 3771 | |
| @@ -54,6 +54,7 @@ static int jpeg_v3_0_early_init(void *handle) · 53 unmodified lines | ||
| 54 | 54 | |
| 55 | 55 | switch (adev->ip_versions[UVD_HWIP][0]) { |
| 56 | 56 | case IP_VERSION(3, 1, 1): |
| 57 | + case IP_VERSION(3, 1, 2): | |
| 57 | 58 | break; |
| 58 | 59 | default: |
| 59 | 60 | harvest = RREG32_SOC15(JPEG, 0, mmCC_UVD_HARVESTING); |
| @@ -98,6 +98,16 @@ static const struct amdgpu_video_codecs nv_video_codecs_decode = · 97 unmodified lines | ||
| 98 | 98 | }; |
| 99 | 99 | |
| 100 | 100 | /* Sienna Cichlid */ |
| 101 | +static const struct amdgpu_video_codec_info sc_video_codecs_encode_array[] = { | |
| 102 | + {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 2160, 0)}, | |
| 103 | + {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 7680, 4352, 0)}, | |
| 104 | +}; | |
| 105 | + | |
| 106 | +static const struct amdgpu_video_codecs sc_video_codecs_encode = { | |
| 107 | + .codec_count = ARRAY_SIZE(sc_video_codecs_encode_array), | |
| 108 | + .codec_array = sc_video_codecs_encode_array, | |
| 109 | +}; | |
| 110 | + | |
| 101 | 111 | static const struct amdgpu_video_codec_info sc_video_codecs_decode_array_vcn0[] = |
| 102 | 112 | { |
| 103 | 113 | {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4096, 3)}, |
| @@ -136,8 +146,8 @@ static const struct amdgpu_video_codecs sc_video_codecs_decode_vcn1 = · 32 unmodified lines | ||
| 136 | 146 | /* SRIOV Sienna Cichlid, not const since data is controlled by host */ |
| 137 | 147 | static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array[] = |
| 138 | 148 | { |
| 139 | − {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 2304, 0)}, | |
| 140 | − {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 4096, 2304, 0)}, | |
| 149 | + {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 2160, 0)}, | |
| 150 | + {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 7680, 4352, 0)}, | |
| 141 | 151 | }; |
| 142 | 152 | |
| 143 | 153 | static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array_vcn0[] = |
| @@ -237,12 +247,12 @@ static int nv_query_video_codecs(struct amdgpu_device *adev, bool encode, · 93 unmodified lines | ||
| 237 | 247 | } else { |
| 238 | 248 | if (adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0) { |
| 239 | 249 | if (encode) |
| 240 | − *codecs = &nv_video_codecs_encode; | |
| 250 | + *codecs = &sc_video_codecs_encode; | |
| 241 | 251 | else |
| 242 | 252 | *codecs = &sc_video_codecs_decode_vcn1; |
| 243 | 253 | } else { |
| 244 | 254 | if (encode) |
| 245 | − *codecs = &nv_video_codecs_encode; | |
| 255 | + *codecs = &sc_video_codecs_encode; | |
| 246 | 256 | else |
| 247 | 257 | *codecs = &sc_video_codecs_decode_vcn0; |
| 248 | 258 | } |
| @@ -251,14 +261,14 @@ static int nv_query_video_codecs(struct amdgpu_device *adev, bool encode, · 2 unmodified lines | ||
| 251 | 261 | case IP_VERSION(3, 0, 16): |
| 252 | 262 | case IP_VERSION(3, 0, 2): |
| 253 | 263 | if (encode) |
| 254 | − *codecs = &nv_video_codecs_encode; | |
| 264 | + *codecs = &sc_video_codecs_encode; | |
| 255 | 265 | else |
| 256 | 266 | *codecs = &sc_video_codecs_decode_vcn0; |
| 257 | 267 | return 0; |
| 258 | 268 | case IP_VERSION(3, 1, 1): |
| 259 | 269 | case IP_VERSION(3, 1, 2): |
| 260 | 270 | if (encode) |
| 261 | − *codecs = &nv_video_codecs_encode; | |
| 271 | + *codecs = &sc_video_codecs_encode; | |
| 262 | 272 | else |
| 263 | 273 | *codecs = &yc_video_codecs_decode; |
| 264 | 274 | return 0; |
| @@ -1917,9 +1917,11 @@ static int sdma_v4_0_hw_fini(void *handle) · 1916 unmodified lines | ||
| 1917 | 1917 | return 0; |
| 1918 | 1918 | } |
| 1919 | 1919 | |
| 1920 | − for (i = 0; i < adev->sdma.num_instances; i++) { | |
| 1921 | − amdgpu_irq_put(adev, &adev->sdma.ecc_irq, | |
| 1922 | − AMDGPU_SDMA_IRQ_INSTANCE0 + i); | |
| 1920 | + if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__SDMA)) { | |
| 1921 | + for (i = 0; i < adev->sdma.num_instances; i++) { | |
| 1922 | + amdgpu_irq_put(adev, &adev->sdma.ecc_irq, | |
| 1923 | + AMDGPU_SDMA_IRQ_INSTANCE0 + i); | |
| 1924 | + } | |
| 1923 | 1925 | } |
| 1924 | 1926 | |
| 1925 | 1927 | sdma_v4_0_ctx_switch_enable(adev, false); |
| @@ -711,7 +711,7 @@ static int soc21_common_early_init(void *handle) · 710 unmodified lines | ||
| 711 | 711 | AMD_PG_SUPPORT_VCN_DPG | |
| 712 | 712 | AMD_PG_SUPPORT_GFX_PG | |
| 713 | 713 | AMD_PG_SUPPORT_JPEG; |
| 714 | − adev->external_rev_id = adev->rev_id + 0x1; | |
| 714 | + adev->external_rev_id = adev->rev_id + 0x80; | |
| 715 | 715 | break; |
| 716 | 716 | |
| 717 | 717 | default: |
| @@ -423,3 +423,68 @@ void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool · 422 unmodified lines | ||
| 423 | 423 | |
| 424 | 424 | PERF_TRACE(); |
| 425 | 425 | } |
| 426 | +static void apply_symclk_on_tx_off_wa(struct dc_link *link) | |
| 427 | +{ | |
| 428 | + /* There are use cases where SYMCLK is referenced by OTG. For instance | |
| 429 | + * for TMDS signal, OTG relies SYMCLK even if TX video output is off. | |
| 430 | + * However current link interface will power off PHY when disabling link | |
| 431 | + * output. This will turn off SYMCLK generated by PHY. The workaround is | |
| 432 | + * to identify such case where SYMCLK is still in use by OTG when we | |
| 433 | + * power off PHY. When this is detected, we will temporarily power PHY | |
| 434 | + * back on and move PHY's SYMCLK state to SYMCLK_ON_TX_OFF by calling | |
| 435 | + * program_pix_clk interface. When OTG is disabled, we will then power | |
| 436 | + * off PHY by calling disable link output again. | |
| 437 | + * | |
| 438 | + * In future dcn generations, we plan to rework transmitter control | |
| 439 | + * interface so that we could have an option to set SYMCLK ON TX OFF | |
| 440 | + * state in one step without this workaround | |
| 441 | + */ | |
| 442 | + | |
| 443 | + struct dc *dc = link->ctx->dc; | |
| 444 | + struct pipe_ctx *pipe_ctx = NULL; | |
| 445 | + uint8_t i; | |
| 446 | + | |
| 447 | + if (link->phy_state.symclk_ref_cnts.otg > 0) { | |
| 448 | + for (i = 0; i < MAX_PIPES; i++) { | |
| 449 | + pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i]; | |
| 450 | + if (pipe_ctx->stream && pipe_ctx->stream->link == link && pipe_ctx->top_pipe == NULL) { | |
| 451 | + pipe_ctx->clock_source->funcs->program_pix_clk( | |
| 452 | + pipe_ctx->clock_source, | |
| 453 | + &pipe_ctx->stream_res.pix_clk_params, | |
| 454 | + dc->link_srv->dp_get_encoding_format( | |
| 455 | + &pipe_ctx->link_config.dp_link_settings), | |
| 456 | + &pipe_ctx->pll_settings); | |
| 457 | + link->phy_state.symclk_state = SYMCLK_ON_TX_OFF; | |
| 458 | + break; | |
| 459 | + } | |
| 460 | + } | |
| 461 | + } | |
| 462 | +} | |
| 463 | + | |
| 464 | +void dcn314_disable_link_output(struct dc_link *link, | |
| 465 | + const struct link_resource *link_res, | |
| 466 | + enum signal_type signal) | |
| 467 | +{ | |
| 468 | + struct dc *dc = link->ctx->dc; | |
| 469 | + const struct link_hwss *link_hwss = get_link_hwss(link, link_res); | |
| 470 | + struct dmcu *dmcu = dc->res_pool->dmcu; | |
| 471 | + | |
| 472 | + if (signal == SIGNAL_TYPE_EDP && | |
| 473 | + link->dc->hwss.edp_backlight_control) | |
| 474 | + link->dc->hwss.edp_backlight_control(link, false); | |
| 475 | + else if (dmcu != NULL && dmcu->funcs->lock_phy) | |
| 476 | + dmcu->funcs->lock_phy(dmcu); | |
| 477 | + | |
| 478 | + link_hwss->disable_link_output(link, link_res, signal); | |
| 479 | + link->phy_state.symclk_state = SYMCLK_OFF_TX_OFF; | |
| 480 | + /* | |
| 481 | + * Add the logic to extract BOTH power up and power down sequences | |
| 482 | + * from enable/disable link output and only call edp panel control | |
| 483 | + * in enable_link_dp and disable_link_dp once. | |
| 484 | + */ | |
| 485 | + if (dmcu != NULL && dmcu->funcs->lock_phy) | |
| 486 | + dmcu->funcs->unlock_phy(dmcu); | |
| 487 | + dc->link_srv->dp_trace_source_sequence(link, DPCD_SOURCE_SEQ_AFTER_DISABLE_LINK_PHY); | |
| 488 | + | |
| 489 | + apply_symclk_on_tx_off_wa(link); | |
| 490 | +} | |
| @@ -45,4 +45,6 @@ void dcn314_hubp_pg_control(struct dce_hwseq *hws, unsigned int hubp_inst, bool · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | void dcn314_dpp_root_clock_control(struct dce_hwseq *hws, unsigned int dpp_inst, bool clock_on); |
| 47 | 47 | |
| 48 | +void dcn314_disable_link_output(struct dc_link *link, const struct link_resource *link_res, enum signal_type signal); | |
| 49 | + | |
| 48 | 50 | #endif /* __DC_HWSS_DCN314_H__ */ |
| @@ -105,7 +105,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = { · 104 unmodified lines | ||
| 105 | 105 | .enable_lvds_link_output = dce110_enable_lvds_link_output, |
| 106 | 106 | .enable_tmds_link_output = dce110_enable_tmds_link_output, |
| 107 | 107 | .enable_dp_link_output = dce110_enable_dp_link_output, |
| 108 | − .disable_link_output = dce110_disable_link_output, | |
| 108 | + .disable_link_output = dcn314_disable_link_output, | |
| 109 | 109 | .z10_restore = dcn31_z10_restore, |
| 110 | 110 | .z10_save_init = dcn31_z10_save_init, |
| 111 | 111 | .set_disp_pattern_generator = dcn30_set_disp_pattern_generator, |
| @@ -810,7 +810,8 @@ static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerforman · 809 unmodified lines | ||
| 810 | 810 | v->SwathHeightY[k], |
| 811 | 811 | v->SwathHeightC[k], |
| 812 | 812 | TWait, |
| 813 | − v->DRAMSpeedPerState[mode_lib->vba.VoltageLevel] <= MEM_STROBE_FREQ_MHZ ? | |
| 813 | + (v->DRAMSpeedPerState[mode_lib->vba.VoltageLevel] <= MEM_STROBE_FREQ_MHZ || | |
| 814 | + v->DCFCLKPerState[mode_lib->vba.VoltageLevel] <= MIN_DCFCLK_FREQ_MHZ) ? | |
| 814 | 815 | mode_lib->vba.ip.min_prefetch_in_strobe_us : 0, |
| 815 | 816 | /* Output */ |
| 816 | 817 | &v->DSTXAfterScaler[k], |
| @@ -3310,7 +3311,7 @@ void dml32_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l · 2493 unmodified lines | ||
| 3310 | 3311 | v->swath_width_chroma_ub_this_state[k], |
| 3311 | 3312 | v->SwathHeightYThisState[k], |
| 3312 | 3313 | v->SwathHeightCThisState[k], v->TWait, |
| 3313 | − v->DRAMSpeedPerState[i] <= MEM_STROBE_FREQ_MHZ ? | |
| 3314 | + (v->DRAMSpeedPerState[i] <= MEM_STROBE_FREQ_MHZ || v->DCFCLKState[i][j] <= MIN_DCFCLK_FREQ_MHZ) ? | |
| 3314 | 3315 | mode_lib->vba.ip.min_prefetch_in_strobe_us : 0, |
| 3315 | 3316 | |
| 3316 | 3317 | /* Output */ |
| @@ -53,6 +53,7 @@ · 52 unmodified lines | ||
| 53 | 53 | #define BPP_BLENDED_PIPE 0xffffffff |
| 54 | 54 | |
| 55 | 55 | #define MEM_STROBE_FREQ_MHZ 1600 |
| 56 | +#define MIN_DCFCLK_FREQ_MHZ 200 | |
| 56 | 57 | #define MEM_STROBE_MAX_DELIVERY_TIME_US 60.0 |
| 57 | 58 | |
| 58 | 59 | struct display_mode_lib; |
| @@ -36,6 +36,8 @@ · 35 unmodified lines | ||
| 36 | 36 | #define amdgpu_dpm_enable_bapm(adev, e) \ |
| 37 | 37 | ((adev)->powerplay.pp_funcs->enable_bapm((adev)->powerplay.pp_handle, (e))) |
| 38 | 38 | |
| 39 | +#define amdgpu_dpm_is_legacy_dpm(adev) ((adev)->powerplay.pp_handle == (adev)) | |
| 40 | + | |
| 39 | 41 | int amdgpu_dpm_get_sclk(struct amdgpu_device *adev, bool low) |
| 40 | 42 | { |
| 41 | 43 | const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; |
| @@ -1460,15 +1462,24 @@ int amdgpu_dpm_get_smu_prv_buf_details(struct amdgpu_device *adev, · 1418 unmodified lines | ||
| 1460 | 1462 | |
| 1461 | 1463 | int amdgpu_dpm_is_overdrive_supported(struct amdgpu_device *adev) |
| 1462 | 1464 | { |
| 1463 | − struct pp_hwmgr *hwmgr = adev->powerplay.pp_handle; | |
| 1464 | − struct smu_context *smu = adev->powerplay.pp_handle; | |
| 1465 | + if (is_support_sw_smu(adev)) { | |
| 1466 | + struct smu_context *smu = adev->powerplay.pp_handle; | |
| 1465 | 1467 | |
| 1466 | − if ((is_support_sw_smu(adev) && smu->od_enabled) || | |
| 1467 | − (is_support_sw_smu(adev) && smu->is_apu) || | |
| 1468 | − (!is_support_sw_smu(adev) && hwmgr->od_enabled)) | |
| 1469 | − return true; | |
| 1468 | + return (smu->od_enabled || smu->is_apu); | |
| 1469 | + } else { | |
| 1470 | + struct pp_hwmgr *hwmgr; | |
| 1470 | 1471 | |
| 1471 | − return false; | |
| 1472 | + /* | |
| 1473 | + * dpm on some legacy asics don't carry od_enabled member | |
| 1474 | + * as its pp_handle is casted directly from adev. | |
| 1475 | + */ | |
| 1476 | + if (amdgpu_dpm_is_legacy_dpm(adev)) | |
| 1477 | + return false; | |
| 1478 | + | |
| 1479 | + hwmgr = (struct pp_hwmgr *)adev->powerplay.pp_handle; | |
| 1480 | + | |
| 1481 | + return hwmgr->od_enabled; | |
| 1482 | + } | |
| 1472 | 1483 | } |
| 1473 | 1484 | |
| 1474 | 1485 | int amdgpu_dpm_set_pp_table(struct amdgpu_device *adev, |
| @@ -285,7 +285,7 @@ static int hdlcd_drm_bind(struct device *dev) · 284 unmodified lines | ||
| 285 | 285 | */ |
| 286 | 286 | if (hdlcd_read(hdlcd, HDLCD_REG_COMMAND)) { |
| 287 | 287 | hdlcd_write(hdlcd, HDLCD_REG_COMMAND, 0); |
| 288 | − drm_aperture_remove_framebuffers(false, &hdlcd_driver); | |
| 288 | + drm_aperture_remove_framebuffers(&hdlcd_driver); | |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | drm_mode_config_reset(drm); |
| @@ -1,7 +1,8 @@ | ||
| 1 | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | −armada-y := armada_crtc.o armada_drv.o armada_fb.o armada_fbdev.o \ | |
| 2 | +armada-y := armada_crtc.o armada_drv.o armada_fb.o \ | |
| 3 | 3 | armada_gem.o armada_overlay.o armada_plane.o armada_trace.o |
| 4 | 4 | armada-y += armada_510.o |
| 5 | 5 | armada-$(CONFIG_DEBUG_FS) += armada_debugfs.o |
| 6 | +armada-$(CONFIG_DRM_FBDEV_EMULATION) += armada_fbdev.o | |
| 6 | 7 | |
| 7 | 8 | obj-$(CONFIG_DRM_ARMADA) := armada.o |
| @@ -16,7 +16,6 @@ struct armada_crtc; · 15 unmodified lines | ||
| 16 | 16 | struct armada_gem_object; |
| 17 | 17 | struct clk; |
| 18 | 18 | struct drm_display_mode; |
| 19 | −struct drm_fb_helper; | |
| 20 | 19 | |
| 21 | 20 | static inline void |
| 22 | 21 | armada_updatel(uint32_t val, uint32_t mask, void __iomem *ptr) |
| @@ -55,7 +54,6 @@ extern const struct armada_variant armada510_ops; · 32 unmodified lines | ||
| 55 | 54 | |
| 56 | 55 | struct armada_private { |
| 57 | 56 | struct drm_device drm; |
| 58 | − struct drm_fb_helper *fbdev; | |
| 59 | 57 | struct armada_crtc *dcrtc[2]; |
| 60 | 58 | struct drm_mm linear; /* protected by linear_lock */ |
| 61 | 59 | struct mutex linear_lock; |
| @@ -75,8 +73,12 @@ struct armada_private { · 13 unmodified lines | ||
| 75 | 73 | |
| 76 | 74 | #define drm_to_armada_dev(dev) container_of(dev, struct armada_private, drm) |
| 77 | 75 | |
| 78 | −int armada_fbdev_init(struct drm_device *); | |
| 79 | −void armada_fbdev_fini(struct drm_device *); | |
| 76 | +#if defined(CONFIG_DRM_FBDEV_EMULATION) | |
| 77 | +void armada_fbdev_setup(struct drm_device *dev); | |
| 78 | +#else | |
| 79 | +static inline void armada_fbdev_setup(struct drm_device *dev) | |
| 80 | +{ } | |
| 81 | +#endif | |
| 80 | 82 | |
| 81 | 83 | int armada_overlay_plane_create(struct drm_device *, unsigned long); |
| 82 | 84 | |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | #include <linux/clk.h> |
| 7 | 7 | #include <linux/component.h> |
| 8 | 8 | #include <linux/module.h> |
| 9 | +#include <linux/of.h> | |
| 9 | 10 | #include <linux/of_graph.h> |
| 10 | 11 | #include <linux/platform_device.h> |
| 11 | 12 | |
| @@ -16,7 +17,6 @@ · 4 unmodified lines | ||
| 16 | 17 | #include <drm/drm_managed.h> |
| 17 | 18 | #include <drm/drm_prime.h> |
| 18 | 19 | #include <drm/drm_probe_helper.h> |
| 19 | −#include <drm/drm_fb_helper.h> | |
| 20 | 20 | #include <drm/drm_of.h> |
| 21 | 21 | #include <drm/drm_vblank.h> |
| 22 | 22 | |
| @@ -37,7 +37,6 @@ static const struct drm_ioctl_desc armada_ioctls[] = { · 14 unmodified lines | ||
| 37 | 37 | DEFINE_DRM_GEM_FOPS(armada_drm_fops); |
| 38 | 38 | |
| 39 | 39 | static const struct drm_driver armada_drm_driver = { |
| 40 | − .lastclose = drm_fb_helper_lastclose, | |
| 41 | 40 | .prime_handle_to_fd = drm_gem_prime_handle_to_fd, |
| 42 | 41 | .prime_fd_to_handle = drm_gem_prime_fd_to_handle, |
| 43 | 42 | .gem_prime_import = armada_gem_prime_import, |
| @@ -55,7 +54,6 @@ static const struct drm_driver armada_drm_driver = { · 11 unmodified lines | ||
| 55 | 54 | |
| 56 | 55 | static const struct drm_mode_config_funcs armada_drm_mode_config_funcs = { |
| 57 | 56 | .fb_create = armada_fb_create, |
| 58 | − .output_poll_changed = drm_fb_helper_output_poll_changed, | |
| 59 | 57 | .atomic_check = drm_atomic_helper_check, |
| 60 | 58 | .atomic_commit = drm_atomic_helper_commit, |
| 61 | 59 | }; |
| @@ -95,7 +93,7 @@ static int armada_drm_bind(struct device *dev) · 33 unmodified lines | ||
| 95 | 93 | } |
| 96 | 94 | |
| 97 | 95 | /* Remove early framebuffers */ |
| 98 | − ret = drm_aperture_remove_framebuffers(false, &armada_drm_driver); | |
| 96 | + ret = drm_aperture_remove_framebuffers(&armada_drm_driver); | |
| 99 | 97 | if (ret) { |
| 100 | 98 | dev_err(dev, "[" DRM_NAME ":%s] can't kick out simple-fb: %d\n", |
| 101 | 99 | __func__, ret); |
| @@ -131,10 +129,6 @@ static int armada_drm_bind(struct device *dev) · 29 unmodified lines | ||
| 131 | 129 | |
| 132 | 130 | drm_mode_config_reset(&priv->drm); |
| 133 | 131 | |
| 134 | − ret = armada_fbdev_init(&priv->drm); | |
| 135 | − if (ret) | |
| 136 | − goto err_comp; | |
| 137 | − | |
| 138 | 132 | drm_kms_helper_poll_init(&priv->drm); |
| 139 | 133 | |
| 140 | 134 | ret = drm_dev_register(&priv->drm, 0); |
| @@ -145,11 +139,12 @@ static int armada_drm_bind(struct device *dev) · 4 unmodified lines | ||
| 145 | 139 | armada_drm_debugfs_init(priv->drm.primary); |
| 146 | 140 | #endif |
| 147 | 141 | |
| 142 | + armada_fbdev_setup(&priv->drm); | |
| 143 | + | |
| 148 | 144 | return 0; |
| 149 | 145 | |
| 150 | 146 | err_poll: |
| 151 | 147 | drm_kms_helper_poll_fini(&priv->drm); |
| 152 | − armada_fbdev_fini(&priv->drm); | |
| 153 | 148 | err_comp: |
| 154 | 149 | component_unbind_all(dev, &priv->drm); |
| 155 | 150 | err_kms: |
| @@ -164,7 +159,6 @@ static void armada_drm_unbind(struct device *dev) · 8 unmodified lines | ||
| 164 | 159 | struct armada_private *priv = drm_to_armada_dev(drm); |
| 165 | 160 | |
| 166 | 161 | drm_kms_helper_poll_fini(&priv->drm); |
| 167 | − armada_fbdev_fini(&priv->drm); | |
| 168 | 162 | |
| 169 | 163 | drm_dev_unregister(&priv->drm); |
| 170 | 164 | |
| @@ -4,7 +4,6 @@ · 3 unmodified lines | ||
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | 6 | #include <drm/drm_modeset_helper.h> |
| 7 | −#include <drm/drm_fb_helper.h> | |
| 8 | 7 | #include <drm/drm_fourcc.h> |
| 9 | 8 | #include <drm/drm_gem_framebuffer_helper.h> |
| 10 | 9 | |
| @@ -8,6 +8,8 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <linux/kernel.h> |
| 9 | 9 | #include <linux/module.h> |
| 10 | 10 | |
| 11 | +#include <drm/drm_crtc_helper.h> | |
| 12 | +#include <drm/drm_drv.h> | |
| 11 | 13 | #include <drm/drm_fb_helper.h> |
| 12 | 14 | #include <drm/drm_fourcc.h> |
| 13 | 15 | |
| @@ -16,6 +18,19 @@ · 2 unmodified lines | ||
| 16 | 18 | #include "armada_fb.h" |
| 17 | 19 | #include "armada_gem.h" |
| 18 | 20 | |
| 21 | +static void armada_fbdev_fb_destroy(struct fb_info *info) | |
| 22 | +{ | |
| 23 | + struct drm_fb_helper *fbh = info->par; | |
| 24 | + | |
| 25 | + drm_fb_helper_fini(fbh); | |
| 26 | + | |
| 27 | + fbh->fb->funcs->destroy(fbh->fb); | |
| 28 | + | |
| 29 | + drm_client_release(&fbh->client); | |
| 30 | + drm_fb_helper_unprepare(fbh); | |
| 31 | + kfree(fbh); | |
| 32 | +} | |
| 33 | + | |
| 19 | 34 | static const struct fb_ops armada_fb_ops = { |
| 20 | 35 | .owner = THIS_MODULE, |
| 21 | 36 | DRM_FB_HELPER_DEFAULT_OPS, |
| @@ -24,6 +39,7 @@ static const struct fb_ops armada_fb_ops = { · 2 unmodified lines | ||
| 24 | 39 | .fb_fillrect = drm_fb_helper_cfb_fillrect, |
| 25 | 40 | .fb_copyarea = drm_fb_helper_cfb_copyarea, |
| 26 | 41 | .fb_imageblit = drm_fb_helper_cfb_imageblit, |
| 42 | + .fb_destroy = armada_fbdev_fb_destroy, | |
| 27 | 43 | }; |
| 28 | 44 | |
| 29 | 45 | static int armada_fbdev_create(struct drm_fb_helper *fbh, |
| @@ -117,56 +133,95 @@ static const struct drm_fb_helper_funcs armada_fb_helper_funcs = { · 87 unmodified lines | ||
| 117 | 133 | .fb_probe = armada_fb_probe, |
| 118 | 134 | }; |
| 119 | 135 | |
| 120 | −int armada_fbdev_init(struct drm_device *dev) | |
| 136 | +/* | |
| 137 | + * Fbdev client and struct drm_client_funcs | |
| 138 | + */ | |
| 139 | + | |
| 140 | +static void armada_fbdev_client_unregister(struct drm_client_dev *client) | |
| 121 | 141 | { |
| 122 | − struct armada_private *priv = drm_to_armada_dev(dev); | |
| 123 | − struct drm_fb_helper *fbh; | |
| 124 | − int ret; | |
| 142 | + struct drm_fb_helper *fbh = drm_fb_helper_from_client(client); | |
| 125 | 143 | |
| 126 | − fbh = devm_kzalloc(dev->dev, sizeof(*fbh), GFP_KERNEL); | |
| 127 | − if (!fbh) | |
| 128 | − return -ENOMEM; | |
| 144 | + if (fbh->info) { | |
| 145 | + drm_fb_helper_unregister_info(fbh); | |
| 146 | + } else { | |
| 147 | + drm_client_release(&fbh->client); | |
| 148 | + drm_fb_helper_unprepare(fbh); | |
| 149 | + kfree(fbh); | |
| 150 | + } | |
| 151 | +} | |
| 129 | 152 | |
| 130 | − priv->fbdev = fbh; | |
| 153 | +static int armada_fbdev_client_restore(struct drm_client_dev *client) | |
| 154 | +{ | |
| 155 | + drm_fb_helper_lastclose(client->dev); | |
| 131 | 156 | |
| 132 | − drm_fb_helper_prepare(dev, fbh, 32, &armada_fb_helper_funcs); | |
| 157 | + return 0; | |
| 158 | +} | |
| 159 | + | |
| 160 | +static int armada_fbdev_client_hotplug(struct drm_client_dev *client) | |
| 161 | +{ | |
| 162 | + struct drm_fb_helper *fbh = drm_fb_helper_from_client(client); | |
| 163 | + struct drm_device *dev = client->dev; | |
| 164 | + int ret; | |
| 165 | + | |
| 166 | + if (dev->fb_helper) | |
| 167 | + return drm_fb_helper_hotplug_event(dev->fb_helper); | |
| 133 | 168 | |
| 134 | 169 | ret = drm_fb_helper_init(dev, fbh); |
| 135 | − if (ret) { | |
| 136 | − DRM_ERROR("failed to initialize drm fb helper\n"); | |
| 137 | − goto err_fb_helper; | |
| 138 | − } | |
| 170 | + if (ret) | |
| 171 | + goto err_drm_err; | |
| 172 | + | |
| 173 | + if (!drm_drv_uses_atomic_modeset(dev)) | |
| 174 | + drm_helper_disable_unused_functions(dev); | |
| 139 | 175 | |
| 140 | 176 | ret = drm_fb_helper_initial_config(fbh); |
| 141 | − if (ret) { | |
| 142 | − DRM_ERROR("failed to set initial config\n"); | |
| 143 | − goto err_fb_setup; | |
| 144 | − } | |
| 177 | + if (ret) | |
| 178 | + goto err_drm_fb_helper_fini; | |
| 145 | 179 | |
| 146 | 180 | return 0; |
| 147 | − err_fb_setup: | |
| 181 | + | |
| 182 | +err_drm_fb_helper_fini: | |
| 148 | 183 | drm_fb_helper_fini(fbh); |
| 149 | − err_fb_helper: | |
| 150 | − drm_fb_helper_unprepare(fbh); | |
| 151 | − priv->fbdev = NULL; | |
| 184 | +err_drm_err: | |
| 185 | + drm_err(dev, "armada: Failed to setup fbdev emulation (ret=%d)\n", ret); | |
| 152 | 186 | return ret; |
| 153 | 187 | } |
| 154 | 188 | |
| 155 | −void armada_fbdev_fini(struct drm_device *dev) | |
| 189 | +static const struct drm_client_funcs armada_fbdev_client_funcs = { | |
| 190 | + .owner = THIS_MODULE, | |
| 191 | + .unregister = armada_fbdev_client_unregister, | |
| 192 | + .restore = armada_fbdev_client_restore, | |
| 193 | + .hotplug = armada_fbdev_client_hotplug, | |
| 194 | +}; | |
| 195 | + | |
| 196 | +void armada_fbdev_setup(struct drm_device *dev) | |
| 156 | 197 | { |
| 157 | − struct armada_private *priv = drm_to_armada_dev(dev); | |
| 158 | − struct drm_fb_helper *fbh = priv->fbdev; | |
| 198 | + struct drm_fb_helper *fbh; | |
| 199 | + int ret; | |
| 159 | 200 | |
| 160 | − if (fbh) { | |
| 161 | − drm_fb_helper_unregister_info(fbh); | |
| 201 | + drm_WARN(dev, !dev->registered, "Device has not been registered.\n"); | |
| 202 | + drm_WARN(dev, dev->fb_helper, "fb_helper is already set!\n"); | |
| 203 | + | |
| 204 | + fbh = kzalloc(sizeof(*fbh), GFP_KERNEL); | |
| 205 | + if (!fbh) | |
| 206 | + return; | |
| 207 | + drm_fb_helper_prepare(dev, fbh, 32, &armada_fb_helper_funcs); | |
| 162 | 208 | |
| 163 | − drm_fb_helper_fini(fbh); | |
| 209 | + ret = drm_client_init(dev, &fbh->client, "fbdev", &armada_fbdev_client_funcs); | |
| 210 | + if (ret) { | |
| 211 | + drm_err(dev, "Failed to register client: %d\n", ret); | |
| 212 | + goto err_drm_client_init; | |
| 213 | + } | |
| 164 | 214 | |
| 165 | − if (fbh->fb) | |
| 166 | − fbh->fb->funcs->destroy(fbh->fb); | |
| 215 | + ret = armada_fbdev_client_hotplug(&fbh->client); | |
| 216 | + if (ret) | |
| 217 | + drm_dbg_kms(dev, "client hotplug ret=%d\n", ret); | |
| 167 | 218 | |
| 168 | − drm_fb_helper_unprepare(fbh); | |
| 219 | + drm_client_register(&fbh->client); | |
| 169 | 220 | |
| 170 | − priv->fbdev = NULL; | |
| 171 | − } | |
| 221 | + return; | |
| 222 | + | |
| 223 | +err_drm_client_init: | |
| 224 | + drm_fb_helper_unprepare(fbh); | |
| 225 | + kfree(fbh); | |
| 226 | + return; | |
| 172 | 227 | } |
| @@ -425,11 +425,12 @@ struct ast_device *ast_device_create(const struct drm_driver *drv, · 424 unmodified lines | ||
| 425 | 425 | return ERR_PTR(-EIO); |
| 426 | 426 | |
| 427 | 427 | /* |
| 428 | − * If we don't have IO space at all, use MMIO now and | |
| 429 | − * assume the chip has MMIO enabled by default (rev 0x20 | |
| 430 | − * and higher). | |
| 428 | + * After AST2500, MMIO is enabled by default, and it should be adopted | |
| 429 | + * to be compatible with Arm. | |
| 431 | 430 | */ |
| 432 | − if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) { | |
| 431 | + if (pdev->revision >= 0x40) { | |
| 432 | + ast->ioregs = ast->regs + AST_IO_MM_OFFSET; | |
| 433 | + } else if (!(pci_resource_flags(pdev, 2) & IORESOURCE_IO)) { | |
| 433 | 434 | drm_info(dev, "platform has no IO space, trying MMIO\n"); |
| 434 | 435 | ast->ioregs = ast->regs + AST_IO_MM_OFFSET; |
| 435 | 436 | } |
| @@ -17,7 +17,6 @@ · 16 unmodified lines | ||
| 17 | 17 | #include <linux/types.h> |
| 18 | 18 | #include <linux/workqueue.h> |
| 19 | 19 | |
| 20 | −#include <linux/of_gpio.h> | |
| 21 | 20 | #include <linux/of_graph.h> |
| 22 | 21 | #include <linux/of_platform.h> |
| 23 | 22 | |
| @@ -1687,6 +1686,14 @@ static int anx7625_parse_dt(struct device *dev, · 1663 unmodified lines | ||
| 1687 | 1686 | if (of_property_read_bool(np, "analogix,audio-enable")) |
| 1688 | 1687 | pdata->audio_en = 1; |
| 1689 | 1688 | |
| 1689 | + return 0; | |
| 1690 | +} | |
| 1691 | + | |
| 1692 | +static int anx7625_parse_dt_panel(struct device *dev, | |
| 1693 | + struct anx7625_platform_data *pdata) | |
| 1694 | +{ | |
| 1695 | + struct device_node *np = dev->of_node; | |
| 1696 | + | |
| 1690 | 1697 | pdata->panel_bridge = devm_drm_of_get_bridge(dev, np, 1, 0); |
| 1691 | 1698 | if (IS_ERR(pdata->panel_bridge)) { |
| 1692 | 1699 | if (PTR_ERR(pdata->panel_bridge) == -ENODEV) { |
| @@ -2032,7 +2039,7 @@ static int anx7625_register_audio(struct device *dev, struct anx7625_data *ctx) · 339 unmodified lines | ||
| 2032 | 2039 | return 0; |
| 2033 | 2040 | } |
| 2034 | 2041 | |
| 2035 | −static int anx7625_attach_dsi(struct anx7625_data *ctx) | |
| 2042 | +static int anx7625_setup_dsi_device(struct anx7625_data *ctx) | |
| 2036 | 2043 | { |
| 2037 | 2044 | struct mipi_dsi_device *dsi; |
| 2038 | 2045 | struct device *dev = &ctx->client->dev; |
| @@ -2042,9 +2049,6 @@ static int anx7625_attach_dsi(struct anx7625_data *ctx) · 3 unmodified lines | ||
| 2042 | 2049 | .channel = 0, |
| 2043 | 2050 | .node = NULL, |
| 2044 | 2051 | }; |
| 2045 | − int ret; | |
| 2046 | − | |
| 2047 | − DRM_DEV_DEBUG_DRIVER(dev, "attach dsi\n"); | |
| 2048 | 2052 | |
| 2049 | 2053 | host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node); |
| 2050 | 2054 | if (!host) { |
| @@ -2065,14 +2069,24 @@ static int anx7625_attach_dsi(struct anx7625_data *ctx) · 14 unmodified lines | ||
| 2065 | 2069 | MIPI_DSI_MODE_VIDEO_HSE | |
| 2066 | 2070 | MIPI_DSI_HS_PKT_END_ALIGNED; |
| 2067 | 2071 | |
| 2068 | − ret = devm_mipi_dsi_attach(dev, dsi); | |
| 2072 | + ctx->dsi = dsi; | |
| 2073 | + | |
| 2074 | + return 0; | |
| 2075 | +} | |
| 2076 | + | |
| 2077 | +static int anx7625_attach_dsi(struct anx7625_data *ctx) | |
| 2078 | +{ | |
| 2079 | + struct device *dev = &ctx->client->dev; | |
| 2080 | + int ret; | |
| 2081 | + | |
| 2082 | + DRM_DEV_DEBUG_DRIVER(dev, "attach dsi\n"); | |
| 2083 | + | |
| 2084 | + ret = devm_mipi_dsi_attach(dev, ctx->dsi); | |
| 2069 | 2085 | if (ret) { |
| 2070 | 2086 | DRM_DEV_ERROR(dev, "fail to attach dsi to host.\n"); |
| 2071 | 2087 | return ret; |
| 2072 | 2088 | } |
| 2073 | 2089 | |
| 2074 | − ctx->dsi = dsi; | |
| 2075 | − | |
| 2076 | 2090 | DRM_DEV_DEBUG_DRIVER(dev, "attach dsi succeeded.\n"); |
| 2077 | 2091 | |
| 2078 | 2092 | return 0; |
| @@ -2560,6 +2574,40 @@ static void anx7625_runtime_disable(void *data) · 481 unmodified lines | ||
| 2560 | 2574 | pm_runtime_disable(data); |
| 2561 | 2575 | } |
| 2562 | 2576 | |
| 2577 | +static int anx7625_link_bridge(struct drm_dp_aux *aux) | |
| 2578 | +{ | |
| 2579 | + struct anx7625_data *platform = container_of(aux, struct anx7625_data, aux); | |
| 2580 | + struct device *dev = aux->dev; | |
| 2581 | + int ret; | |
| 2582 | + | |
| 2583 | + ret = anx7625_parse_dt_panel(dev, &platform->pdata); | |
| 2584 | + if (ret) { | |
| 2585 | + DRM_DEV_ERROR(dev, "fail to parse DT for panel : %d\n", ret); | |
| 2586 | + return ret; | |
| 2587 | + } | |
| 2588 | + | |
| 2589 | + platform->bridge.funcs = &anx7625_bridge_funcs; | |
| 2590 | + platform->bridge.of_node = dev->of_node; | |
| 2591 | + if (!anx7625_of_panel_on_aux_bus(dev)) | |
| 2592 | + platform->bridge.ops |= DRM_BRIDGE_OP_EDID; | |
| 2593 | + if (!platform->pdata.panel_bridge) | |
| 2594 | + platform->bridge.ops |= DRM_BRIDGE_OP_HPD | | |
| 2595 | + DRM_BRIDGE_OP_DETECT; | |
| 2596 | + platform->bridge.type = platform->pdata.panel_bridge ? | |
| 2597 | + DRM_MODE_CONNECTOR_eDP : | |
| 2598 | + DRM_MODE_CONNECTOR_DisplayPort; | |
| 2599 | + | |
| 2600 | + drm_bridge_add(&platform->bridge); | |
| 2601 | + | |
| 2602 | + if (!platform->pdata.is_dpi) { | |
| 2603 | + ret = anx7625_attach_dsi(platform); | |
| 2604 | + if (ret) | |
| 2605 | + drm_bridge_remove(&platform->bridge); | |
| 2606 | + } | |
| 2607 | + | |
| 2608 | + return ret; | |
| 2609 | +} | |
| 2610 | + | |
| 2563 | 2611 | static int anx7625_i2c_probe(struct i2c_client *client) |
| 2564 | 2612 | { |
| 2565 | 2613 | struct anx7625_data *platform; |
| @@ -2634,6 +2682,24 @@ static int anx7625_i2c_probe(struct i2c_client *client) · 68 unmodified lines | ||
| 2634 | 2682 | platform->aux.wait_hpd_asserted = anx7625_wait_hpd_asserted; |
| 2635 | 2683 | drm_dp_aux_init(&platform->aux); |
| 2636 | 2684 | |
| 2685 | + ret = anx7625_parse_dt(dev, pdata); | |
| 2686 | + if (ret) { | |
| 2687 | + if (ret != -EPROBE_DEFER) | |
| 2688 | + DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); | |
| 2689 | + goto free_wq; | |
| 2690 | + } | |
| 2691 | + | |
| 2692 | + if (!platform->pdata.is_dpi) { | |
| 2693 | + ret = anx7625_setup_dsi_device(platform); | |
| 2694 | + if (ret < 0) | |
| 2695 | + goto free_wq; | |
| 2696 | + } | |
| 2697 | + | |
| 2698 | + /* | |
| 2699 | + * Registering the i2c devices will retrigger deferred probe, so it | |
| 2700 | + * needs to be done after calls that might return EPROBE_DEFER, | |
| 2701 | + * otherwise we can get an infinite loop. | |
| 2702 | + */ | |
| 2637 | 2703 | if (anx7625_register_i2c_dummy_clients(platform, client) != 0) { |
| 2638 | 2704 | ret = -ENOMEM; |
| 2639 | 2705 | DRM_DEV_ERROR(dev, "fail to reserve I2C bus.\n"); |
| @@ -2648,13 +2714,21 @@ static int anx7625_i2c_probe(struct i2c_client *client) · 8 unmodified lines | ||
| 2648 | 2714 | if (ret) |
| 2649 | 2715 | goto free_wq; |
| 2650 | 2716 | |
| 2651 | − devm_of_dp_aux_populate_ep_devices(&platform->aux); | |
| 2652 | − | |
| 2653 | − ret = anx7625_parse_dt(dev, pdata); | |
| 2717 | + /* | |
| 2718 | + * Populating the aux bus will retrigger deferred probe, so it needs to | |
| 2719 | + * be done after calls that might return EPROBE_DEFER, otherwise we can | |
| 2720 | + * get an infinite loop. | |
| 2721 | + */ | |
| 2722 | + ret = devm_of_dp_aux_populate_bus(&platform->aux, anx7625_link_bridge); | |
| 2654 | 2723 | if (ret) { |
| 2655 | − if (ret != -EPROBE_DEFER) | |
| 2656 | − DRM_DEV_ERROR(dev, "fail to parse DT : %d\n", ret); | |
| 2657 | − goto free_wq; | |
| 2724 | + if (ret != -ENODEV) { | |
| 2725 | + DRM_DEV_ERROR(dev, "failed to populate aux bus : %d\n", ret); | |
| 2726 | + goto free_wq; | |
| 2727 | + } | |
| 2728 | + | |
| 2729 | + ret = anx7625_link_bridge(&platform->aux); | |
| 2730 | + if (ret) | |
| 2731 | + goto free_wq; | |
| 2658 | 2732 | } |
| 2659 | 2733 | |
| 2660 | 2734 | if (!platform->pdata.low_power_mode) { |
| @@ -2667,27 +2741,6 @@ static int anx7625_i2c_probe(struct i2c_client *client) · 6 unmodified lines | ||
| 2667 | 2741 | if (platform->pdata.intp_irq) |
| 2668 | 2742 | queue_work(platform->workqueue, &platform->work); |
| 2669 | 2743 | |
| 2670 | − platform->bridge.funcs = &anx7625_bridge_funcs; | |
| 2671 | − platform->bridge.of_node = client->dev.of_node; | |
| 2672 | − if (!anx7625_of_panel_on_aux_bus(&client->dev)) | |
| 2673 | − platform->bridge.ops |= DRM_BRIDGE_OP_EDID; | |
| 2674 | − if (!platform->pdata.panel_bridge) | |
| 2675 | − platform->bridge.ops |= DRM_BRIDGE_OP_HPD | | |
| 2676 | − DRM_BRIDGE_OP_DETECT; | |
| 2677 | − platform->bridge.type = platform->pdata.panel_bridge ? | |
| 2678 | − DRM_MODE_CONNECTOR_eDP : | |
| 2679 | − DRM_MODE_CONNECTOR_DisplayPort; | |
| 2680 | − | |
| 2681 | − drm_bridge_add(&platform->bridge); | |
| 2682 | − | |
| 2683 | − if (!platform->pdata.is_dpi) { | |
| 2684 | − ret = anx7625_attach_dsi(platform); | |
| 2685 | − if (ret) { | |
| 2686 | − DRM_DEV_ERROR(dev, "Fail to attach to dsi : %d\n", ret); | |
| 2687 | − goto unregister_bridge; | |
| 2688 | − } | |
| 2689 | − } | |
| 2690 | − | |
| 2691 | 2744 | if (platform->pdata.audio_en) |
| 2692 | 2745 | anx7625_register_audio(dev, platform); |
| 2693 | 2746 | |
| @@ -2695,12 +2748,6 @@ static int anx7625_i2c_probe(struct i2c_client *client) · 1 unmodified line | ||
| 2695 | 2748 | |
| 2696 | 2749 | return 0; |
| 2697 | 2750 | |
| 2698 | −unregister_bridge: | |
| 2699 | − drm_bridge_remove(&platform->bridge); | |
| 2700 | − | |
| 2701 | − if (!platform->pdata.low_power_mode) | |
| 2702 | − pm_runtime_put_sync_suspend(&client->dev); | |
| 2703 | − | |
| 2704 | 2751 | free_wq: |
| 2705 | 2752 | if (platform->workqueue) |
| 2706 | 2753 | destroy_workqueue(platform->workqueue); |
| @@ -56,6 +56,7 @@ · 55 unmodified lines | ||
| 56 | 56 | #define LVDS_CTRL_VBG_ADJ_MASK GENMASK(19, 17) |
| 57 | 57 | |
| 58 | 58 | enum fsl_ldb_devtype { |
| 59 | + IMX6SX_LDB, | |
| 59 | 60 | IMX8MP_LDB, |
| 60 | 61 | IMX93_LDB, |
| 61 | 62 | }; |
| @@ -64,9 +65,14 @@ struct fsl_ldb_devdata { · 2 unmodified lines | ||
| 64 | 65 | u32 ldb_ctrl; |
| 65 | 66 | u32 lvds_ctrl; |
| 66 | 67 | bool lvds_en_bit; |
| 68 | + bool single_ctrl_reg; | |
| 67 | 69 | }; |
| 68 | 70 | |
| 69 | 71 | static const struct fsl_ldb_devdata fsl_ldb_devdata[] = { |
| 72 | + [IMX6SX_LDB] = { | |
| 73 | + .ldb_ctrl = 0x18, | |
| 74 | + .single_ctrl_reg = true, | |
| 75 | + }, | |
| 70 | 76 | [IMX8MP_LDB] = { |
| 71 | 77 | .ldb_ctrl = 0x5c, |
| 72 | 78 | .lvds_ctrl = 0x128, |
| @@ -201,6 +207,9 @@ static void fsl_ldb_atomic_enable(struct drm_bridge *bridge, · 128 unmodified lines | ||
| 201 | 207 | |
| 202 | 208 | regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->ldb_ctrl, reg); |
| 203 | 209 | |
| 210 | + if (fsl_ldb->devdata->single_ctrl_reg) | |
| 211 | + return; | |
| 212 | + | |
| 204 | 213 | /* Program LVDS_CTRL */ |
| 205 | 214 | reg = LVDS_CTRL_CC_ADJ(2) | LVDS_CTRL_PRE_EMPH_EN | |
| 206 | 215 | LVDS_CTRL_PRE_EMPH_ADJ(3) | LVDS_CTRL_VBG_EN; |
| @@ -226,7 +235,8 @@ static void fsl_ldb_atomic_disable(struct drm_bridge *bridge, · 19 unmodified lines | ||
| 226 | 235 | regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->lvds_ctrl, |
| 227 | 236 | LVDS_CTRL_LVDS_EN); |
| 228 | 237 | else |
| 229 | − regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->lvds_ctrl, 0); | |
| 238 | + if (!fsl_ldb->devdata->single_ctrl_reg) | |
| 239 | + regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->lvds_ctrl, 0); | |
| 230 | 240 | regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->ldb_ctrl, 0); |
| 231 | 241 | |
| 232 | 242 | clk_disable_unprepare(fsl_ldb->clk); |
| @@ -372,6 +382,8 @@ static void fsl_ldb_remove(struct platform_device *pdev) · 139 unmodified lines | ||
| 372 | 382 | } |
| 373 | 383 | |
| 374 | 384 | static const struct of_device_id fsl_ldb_match[] = { |
| 385 | + { .compatible = "fsl,imx6sx-ldb", | |
| 386 | + .data = &fsl_ldb_devdata[IMX6SX_LDB], }, | |
| 375 | 387 | { .compatible = "fsl,imx8mp-ldb", |
| 376 | 388 | .data = &fsl_ldb_devdata[IMX8MP_LDB], }, |
| 377 | 389 | { .compatible = "fsl,imx93-ldb", |
| @@ -3207,7 +3207,7 @@ static ssize_t receive_timing_debugfs_show(struct file *file, char __user *buf, · 3206 unmodified lines | ||
| 3207 | 3207 | size_t len, loff_t *ppos) |
| 3208 | 3208 | { |
| 3209 | 3209 | struct it6505 *it6505 = file->private_data; |
| 3210 | − struct drm_display_mode *vid = &it6505->video_info; | |
| 3210 | + struct drm_display_mode *vid; | |
| 3211 | 3211 | u8 read_buf[READ_BUFFER_SIZE]; |
| 3212 | 3212 | u8 *str = read_buf, *end = read_buf + READ_BUFFER_SIZE; |
| 3213 | 3213 | ssize_t ret, count; |
| @@ -3216,6 +3216,7 @@ static ssize_t receive_timing_debugfs_show(struct file *file, char __user *buf, · 2 unmodified lines | ||
| 3216 | 3216 | return -ENODEV; |
| 3217 | 3217 | |
| 3218 | 3218 | it6505_calc_video_info(it6505); |
| 3219 | + vid = &it6505->video_info; | |
| 3219 | 3220 | str += scnprintf(str, end - str, "---video timing---\n"); |
| 3220 | 3221 | str += scnprintf(str, end - str, "PCLK:%d.%03dMHz\n", |
| 3221 | 3222 | vid->clock / 1000, vid->clock % 1000); |
| @@ -709,7 +709,9 @@ static int lt9211_host_attach(struct lt9211 *ctx) · 708 unmodified lines | ||
| 709 | 709 | dsi->lanes = dsi_lanes; |
| 710 | 710 | dsi->format = MIPI_DSI_FMT_RGB888; |
| 711 | 711 | dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 712 | − MIPI_DSI_MODE_VIDEO_HSE; | |
| 712 | + MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO_NO_HSA | | |
| 713 | + MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP | | |
| 714 | + MIPI_DSI_MODE_NO_EOT_PACKET; | |
| 713 | 715 | |
| 714 | 716 | ret = devm_mipi_dsi_attach(dev, dsi); |
| 715 | 717 | if (ret < 0) { |
| @@ -774,7 +774,9 @@ static struct mipi_dsi_device *lt9611_attach_dsi(struct lt9611 *lt9611, · 773 unmodified lines | ||
| 774 | 774 | dsi->lanes = 4; |
| 775 | 775 | dsi->format = MIPI_DSI_FMT_RGB888; |
| 776 | 776 | dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 777 | − MIPI_DSI_MODE_VIDEO_HSE; | |
| 777 | + MIPI_DSI_MODE_VIDEO_HSE | MIPI_DSI_MODE_VIDEO_NO_HSA | | |
| 778 | + MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP | | |
| 779 | + MIPI_DSI_MODE_NO_EOT_PACKET; | |
| 778 | 780 | |
| 779 | 781 | ret = devm_mipi_dsi_attach(dev, dsi); |
| 780 | 782 | if (ret < 0) { |
| @@ -183,6 +183,8 @@ · 182 unmodified lines | ||
| 183 | 183 | #define DSIM_AFC_CTL(x) (((x) & 0x7) << 5) |
| 184 | 184 | |
| 185 | 185 | /* DSIM_PLLCTRL */ |
| 186 | +#define DSIM_PLL_DPDNSWAP_CLK (1 << 25) | |
| 187 | +#define DSIM_PLL_DPDNSWAP_DAT (1 << 24) | |
| 186 | 188 | #define DSIM_FREQ_BAND(x) ((x) << 24) |
| 187 | 189 | #define DSIM_PLL_EN BIT(23) |
| 188 | 190 | #define DSIM_PLL_P(x, offset) ((x) << (offset)) |
| @@ -622,6 +624,11 @@ static unsigned long samsung_dsim_set_pll(struct samsung_dsim *dsi, · 433 unmodified lines | ||
| 622 | 624 | reg |= DSIM_FREQ_BAND(band); |
| 623 | 625 | } |
| 624 | 626 | |
| 627 | + if (dsi->swap_dn_dp_clk) | |
| 628 | + reg |= DSIM_PLL_DPDNSWAP_CLK; | |
| 629 | + if (dsi->swap_dn_dp_data) | |
| 630 | + reg |= DSIM_PLL_DPDNSWAP_DAT; | |
| 631 | + | |
| 625 | 632 | samsung_dsim_write(dsi, DSIM_PLLCTRL_REG, reg); |
| 626 | 633 | |
| 627 | 634 | timeout = 1000; |
| @@ -1696,7 +1703,9 @@ static int samsung_dsim_parse_dt(struct samsung_dsim *dsi) · 1068 unmodified lines | ||
| 1696 | 1703 | { |
| 1697 | 1704 | struct device *dev = dsi->dev; |
| 1698 | 1705 | struct device_node *node = dev->of_node; |
| 1699 | − int ret; | |
| 1706 | + u32 lane_polarities[5] = { 0 }; | |
| 1707 | + struct device_node *endpoint; | |
| 1708 | + int i, nr_lanes, ret; | |
| 1700 | 1709 | |
| 1701 | 1710 | ret = samsung_dsim_of_read_u32(node, "samsung,pll-clock-frequency", |
| 1702 | 1711 | &dsi->pll_clk_rate); |
| @@ -1713,6 +1722,22 @@ static int samsung_dsim_parse_dt(struct samsung_dsim *dsi) · 10 unmodified lines | ||
| 1713 | 1722 | if (ret < 0) |
| 1714 | 1723 | return ret; |
| 1715 | 1724 | |
| 1725 | + endpoint = of_graph_get_endpoint_by_regs(node, 1, -1); | |
| 1726 | + nr_lanes = of_property_count_u32_elems(endpoint, "data-lanes"); | |
| 1727 | + if (nr_lanes > 0 && nr_lanes <= 4) { | |
| 1728 | + /* Polarity 0 is clock lane, 1..4 are data lanes. */ | |
| 1729 | + of_property_read_u32_array(endpoint, "lane-polarities", | |
| 1730 | + lane_polarities, nr_lanes + 1); | |
| 1731 | + for (i = 1; i <= nr_lanes; i++) { | |
| 1732 | + if (lane_polarities[1] != lane_polarities[i]) | |
| 1733 | + DRM_DEV_ERROR(dsi->dev, "Data lanes polarities do not match"); | |
| 1734 | + } | |
| 1735 | + if (lane_polarities[0]) | |
| 1736 | + dsi->swap_dn_dp_clk = true; | |
| 1737 | + if (lane_polarities[1]) | |
| 1738 | + dsi->swap_dn_dp_data = true; | |
| 1739 | + } | |
| 1740 | + | |
| 1716 | 1741 | return 0; |
| 1717 | 1742 | } |
| 1718 | 1743 | |
| @@ -1954,7 +1979,6 @@ static struct platform_driver samsung_dsim_driver = { · 235 unmodified lines | ||
| 1954 | 1979 | .remove = samsung_dsim_remove, |
| 1955 | 1980 | .driver = { |
| 1956 | 1981 | .name = "samsung-dsim", |
| 1957 | − .owner = THIS_MODULE, | |
| 1958 | 1982 | .pm = &samsung_dsim_pm_ops, |
| 1959 | 1983 | .of_match_table = samsung_dsim_of_match, |
| 1960 | 1984 | }, |
| @@ -533,7 +533,7 @@ static struct i2c_adapter *dw_hdmi_i2c_adapter(struct dw_hdmi *hdmi) · 532 unmodified lines | ||
| 533 | 533 | adap->owner = THIS_MODULE; |
| 534 | 534 | adap->dev.parent = hdmi->dev; |
| 535 | 535 | adap->algo = &dw_hdmi_algorithm; |
| 536 | − strlcpy(adap->name, "DesignWare HDMI", sizeof(adap->name)); | |
| 536 | + strscpy(adap->name, "DesignWare HDMI", sizeof(adap->name)); | |
| 537 | 537 | i2c_set_adapdata(adap, hdmi); |
| 538 | 538 | |
| 539 | 539 | ret = i2c_add_adapter(adap); |
| @@ -1890,7 +1890,7 @@ static int tc_mipi_dsi_host_attach(struct tc_data *tc) · 1889 unmodified lines | ||
| 1890 | 1890 | if (dsi_lanes < 0) |
| 1891 | 1891 | return dsi_lanes; |
| 1892 | 1892 | |
| 1893 | − dsi = mipi_dsi_device_register_full(host, &info); | |
| 1893 | + dsi = devm_mipi_dsi_device_register_full(dev, host, &info); | |
| 1894 | 1894 | if (IS_ERR(dsi)) |
| 1895 | 1895 | return dev_err_probe(dev, PTR_ERR(dsi), |
| 1896 | 1896 | "failed to create dsi device\n"); |
| @@ -1901,7 +1901,7 @@ static int tc_mipi_dsi_host_attach(struct tc_data *tc) · 4 unmodified lines | ||
| 1901 | 1901 | dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | |
| 1902 | 1902 | MIPI_DSI_MODE_LPM | MIPI_DSI_CLOCK_NON_CONTINUOUS; |
| 1903 | 1903 | |
| 1904 | − ret = mipi_dsi_attach(dsi); | |
| 1904 | + ret = devm_mipi_dsi_attach(dev, dsi); | |
| 1905 | 1905 | if (ret < 0) { |
| 1906 | 1906 | dev_err(dev, "failed to attach dsi to host: %d\n", ret); |
| 1907 | 1907 | return ret; |
| @@ -9,6 +9,8 @@ · 8 unmodified lines | ||
| 9 | 9 | #include <linux/gpio/consumer.h> |
| 10 | 10 | #include <linux/i2c.h> |
| 11 | 11 | #include <linux/kernel.h> |
| 12 | +#include <linux/media-bus-format.h> | |
| 13 | +#include <linux/minmax.h> | |
| 12 | 14 | #include <linux/module.h> |
| 13 | 15 | #include <linux/regmap.h> |
| 14 | 16 | #include <linux/regulator/consumer.h> |
| @@ -146,6 +148,7 @@ struct tc358768_priv { · 131 unmodified lines | ||
| 146 | 148 | |
| 147 | 149 | u32 pd_lines; /* number of Parallel Port Input Data Lines */ |
| 148 | 150 | u32 dsi_lanes; /* number of DSI Lanes */ |
| 151 | + u32 dsi_bpp; /* number of Bits Per Pixel over DSI */ | |
| 149 | 152 | |
| 150 | 153 | /* Parameters for PLL programming */ |
| 151 | 154 | u32 fbd; /* PLL feedback divider */ |
| @@ -284,12 +287,12 @@ static void tc358768_hw_disable(struct tc358768_priv *priv) · 132 unmodified lines | ||
| 284 | 287 | |
| 285 | 288 | static u32 tc358768_pll_to_pclk(struct tc358768_priv *priv, u32 pll_clk) |
| 286 | 289 | { |
| 287 | − return (u32)div_u64((u64)pll_clk * priv->dsi_lanes, priv->pd_lines); | |
| 290 | + return (u32)div_u64((u64)pll_clk * priv->dsi_lanes, priv->dsi_bpp); | |
| 288 | 291 | } |
| 289 | 292 | |
| 290 | 293 | static u32 tc358768_pclk_to_pll(struct tc358768_priv *priv, u32 pclk) |
| 291 | 294 | { |
| 292 | − return (u32)div_u64((u64)pclk * priv->pd_lines, priv->dsi_lanes); | |
| 295 | + return (u32)div_u64((u64)pclk * priv->dsi_bpp, priv->dsi_lanes); | |
| 293 | 296 | } |
| 294 | 297 | |
| 295 | 298 | static int tc358768_calc_pll(struct tc358768_priv *priv, |
| @@ -334,13 +337,17 @@ static int tc358768_calc_pll(struct tc358768_priv *priv, · 38 unmodified lines | ||
| 334 | 337 | u32 fbd; |
| 335 | 338 | |
| 336 | 339 | for (fbd = 0; fbd < 512; ++fbd) { |
| 337 | − u32 pll, diff; | |
| 340 | + u32 pll, diff, pll_in; | |
| 338 | 341 | |
| 339 | 342 | pll = (u32)div_u64((u64)refclk * (fbd + 1), divisor); |
| 340 | 343 | |
| 341 | 344 | if (pll >= max_pll || pll < min_pll) |
| 342 | 345 | continue; |
| 343 | 346 | |
| 347 | + pll_in = (u32)div_u64((u64)refclk, prd + 1); | |
| 348 | + if (pll_in < 4000000) | |
| 349 | + continue; | |
| 350 | + | |
| 344 | 351 | diff = max(pll, target_pll) - min(pll, target_pll); |
| 345 | 352 | |
| 346 | 353 | if (diff < best_diff) { |
| @@ -422,6 +429,7 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host, · 75 unmodified lines | ||
| 422 | 429 | priv->output.panel = panel; |
| 423 | 430 | |
| 424 | 431 | priv->dsi_lanes = dev->lanes; |
| 432 | + priv->dsi_bpp = mipi_dsi_pixel_format_to_bpp(dev->format); | |
| 425 | 433 | |
| 426 | 434 | /* get input ep (port0/endpoint0) */ |
| 427 | 435 | ret = -EINVAL; |
| @@ -433,7 +441,7 @@ static int tc358768_dsi_host_attach(struct mipi_dsi_host *host, · 5 unmodified lines | ||
| 433 | 441 | } |
| 434 | 442 | |
| 435 | 443 | if (ret) |
| 436 | − priv->pd_lines = mipi_dsi_pixel_format_to_bpp(dev->format); | |
| 444 | + priv->pd_lines = priv->dsi_bpp; | |
| 437 | 445 | |
| 438 | 446 | drm_bridge_add(&priv->bridge); |
| 439 | 447 | |
| @@ -632,8 +640,9 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 192 unmodified lines | ||
| 632 | 640 | struct mipi_dsi_device *dsi_dev = priv->output.dev; |
| 633 | 641 | unsigned long mode_flags = dsi_dev->mode_flags; |
| 634 | 642 | u32 val, val2, lptxcnt, hact, data_type; |
| 643 | + s32 raw_val; | |
| 635 | 644 | const struct drm_display_mode *mode; |
| 636 | − u32 dsibclk_nsk, dsiclk_nsk, ui_nsk, phy_delay_nsk; | |
| 645 | + u32 dsibclk_nsk, dsiclk_nsk, ui_nsk; | |
| 637 | 646 | u32 dsiclk, dsibclk, video_start; |
| 638 | 647 | const u32 internal_delay = 40; |
| 639 | 648 | int ret, i; |
| @@ -717,11 +726,9 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 77 unmodified lines | ||
| 717 | 726 | dsibclk); |
| 718 | 727 | dsiclk_nsk = (u32)div_u64((u64)1000000000 * TC358768_PRECISION, dsiclk); |
| 719 | 728 | ui_nsk = dsiclk_nsk / 2; |
| 720 | − phy_delay_nsk = dsibclk_nsk + 2 * dsiclk_nsk; | |
| 721 | 729 | dev_dbg(priv->dev, "dsiclk_nsk: %u\n", dsiclk_nsk); |
| 722 | 730 | dev_dbg(priv->dev, "ui_nsk: %u\n", ui_nsk); |
| 723 | 731 | dev_dbg(priv->dev, "dsibclk_nsk: %u\n", dsibclk_nsk); |
| 724 | − dev_dbg(priv->dev, "phy_delay_nsk: %u\n", phy_delay_nsk); | |
| 725 | 732 | |
| 726 | 733 | /* LP11 > 100us for D-PHY Rx Init */ |
| 727 | 734 | val = tc358768_ns_to_cnt(100 * 1000, dsibclk_nsk) - 1; |
| @@ -736,25 +743,26 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 8 unmodified lines | ||
| 736 | 743 | |
| 737 | 744 | /* 38ns < TCLK_PREPARE < 95ns */ |
| 738 | 745 | val = tc358768_ns_to_cnt(65, dsibclk_nsk) - 1; |
| 739 | − /* TCLK_PREPARE > 300ns */ | |
| 740 | − val2 = tc358768_ns_to_cnt(300 + tc358768_to_ns(3 * ui_nsk), | |
| 741 | − dsibclk_nsk); | |
| 742 | − val |= (val2 - tc358768_to_ns(phy_delay_nsk - dsibclk_nsk)) << 8; | |
| 746 | + /* TCLK_PREPARE + TCLK_ZERO > 300ns */ | |
| 747 | + val2 = tc358768_ns_to_cnt(300 - tc358768_to_ns(2 * ui_nsk), | |
| 748 | + dsibclk_nsk) - 2; | |
| 749 | + val |= val2 << 8; | |
| 743 | 750 | dev_dbg(priv->dev, "TCLK_HEADERCNT: 0x%x\n", val); |
| 744 | 751 | tc358768_write(priv, TC358768_TCLK_HEADERCNT, val); |
| 745 | 752 | |
| 746 | − /* TCLK_TRAIL > 60ns + 3*UI */ | |
| 747 | − val = 60 + tc358768_to_ns(3 * ui_nsk); | |
| 748 | − val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 5; | |
| 753 | + /* TCLK_TRAIL > 60ns AND TEOT <= 105 ns + 12*UI */ | |
| 754 | + raw_val = tc358768_ns_to_cnt(60 + tc358768_to_ns(2 * ui_nsk), dsibclk_nsk) - 5; | |
| 755 | + val = clamp(raw_val, 0, 127); | |
| 749 | 756 | dev_dbg(priv->dev, "TCLK_TRAILCNT: 0x%x\n", val); |
| 750 | 757 | tc358768_write(priv, TC358768_TCLK_TRAILCNT, val); |
| 751 | 758 | |
| 752 | 759 | /* 40ns + 4*UI < THS_PREPARE < 85ns + 6*UI */ |
| 753 | 760 | val = 50 + tc358768_to_ns(4 * ui_nsk); |
| 754 | 761 | val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 1; |
| 755 | − /* THS_ZERO > 145ns + 10*UI */ | |
| 756 | − val2 = tc358768_ns_to_cnt(145 - tc358768_to_ns(ui_nsk), dsibclk_nsk); | |
| 757 | − val |= (val2 - tc358768_to_ns(phy_delay_nsk)) << 8; | |
| 762 | + /* THS_PREPARE + THS_ZERO > 145ns + 10*UI */ | |
| 763 | + raw_val = tc358768_ns_to_cnt(145 - tc358768_to_ns(3 * ui_nsk), dsibclk_nsk) - 10; | |
| 764 | + val2 = clamp(raw_val, 0, 127); | |
| 765 | + val |= val2 << 8; | |
| 758 | 766 | dev_dbg(priv->dev, "THS_HEADERCNT: 0x%x\n", val); |
| 759 | 767 | tc358768_write(priv, TC358768_THS_HEADERCNT, val); |
| 760 | 768 | |
| @@ -770,9 +778,10 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 9 unmodified lines | ||
| 770 | 778 | dev_dbg(priv->dev, "TCLK_POSTCNT: 0x%x\n", val); |
| 771 | 779 | tc358768_write(priv, TC358768_TCLK_POSTCNT, val); |
| 772 | 780 | |
| 773 | − /* 60ns + 4*UI < THS_PREPARE < 105ns + 12*UI */ | |
| 774 | − val = tc358768_ns_to_cnt(60 + tc358768_to_ns(15 * ui_nsk), | |
| 775 | − dsibclk_nsk) - 5; | |
| 781 | + /* max(60ns + 4*UI, 8*UI) < THS_TRAILCNT < 105ns + 12*UI */ | |
| 782 | + raw_val = tc358768_ns_to_cnt(60 + tc358768_to_ns(18 * ui_nsk), | |
| 783 | + dsibclk_nsk) - 4; | |
| 784 | + val = clamp(raw_val, 0, 15); | |
| 776 | 785 | dev_dbg(priv->dev, "THS_TRAILCNT: 0x%x\n", val); |
| 777 | 786 | tc358768_write(priv, TC358768_THS_TRAILCNT, val); |
| 778 | 787 | |
| @@ -786,7 +795,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 7 unmodified lines | ||
| 786 | 795 | |
| 787 | 796 | /* TXTAGOCNT[26:16] RXTASURECNT[10:0] */ |
| 788 | 797 | val = tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk * 4); |
| 789 | − val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 1; | |
| 798 | + val = tc358768_ns_to_cnt(val, dsibclk_nsk) / 4 - 1; | |
| 790 | 799 | val2 = tc358768_ns_to_cnt(tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk), |
| 791 | 800 | dsibclk_nsk) - 2; |
| 792 | 801 | val = val << 16 | val2; |
| @@ -866,8 +875,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) · 73 unmodified lines | ||
| 866 | 875 | val = TC358768_DSI_CONFW_MODE_SET | TC358768_DSI_CONFW_ADDR_DSI_CONTROL; |
| 867 | 876 | val |= (dsi_dev->lanes - 1) << 1; |
| 868 | 877 | |
| 869 | − if (!(dsi_dev->mode_flags & MIPI_DSI_MODE_LPM)) | |
| 870 | − val |= TC358768_DSI_CONTROL_TXMD; | |
| 878 | + val |= TC358768_DSI_CONTROL_TXMD; | |
| 871 | 879 | |
| 872 | 880 | if (!(mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)) |
| 873 | 881 | val |= TC358768_DSI_CONTROL_HSCKMD; |
| @@ -913,6 +921,44 @@ static void tc358768_bridge_enable(struct drm_bridge *bridge) · 39 unmodified lines | ||
| 913 | 921 | } |
| 914 | 922 | } |
| 915 | 923 | |
| 924 | +#define MAX_INPUT_SEL_FORMATS 1 | |
| 925 | + | |
| 926 | +static u32 * | |
| 927 | +tc358768_atomic_get_input_bus_fmts(struct drm_bridge *bridge, | |
| 928 | + struct drm_bridge_state *bridge_state, | |
| 929 | + struct drm_crtc_state *crtc_state, | |
| 930 | + struct drm_connector_state *conn_state, | |
| 931 | + u32 output_fmt, | |
| 932 | + unsigned int *num_input_fmts) | |
| 933 | +{ | |
| 934 | + struct tc358768_priv *priv = bridge_to_tc358768(bridge); | |
| 935 | + u32 *input_fmts; | |
| 936 | + | |
| 937 | + *num_input_fmts = 0; | |
| 938 | + | |
| 939 | + input_fmts = kcalloc(MAX_INPUT_SEL_FORMATS, sizeof(*input_fmts), | |
| 940 | + GFP_KERNEL); | |
| 941 | + if (!input_fmts) | |
| 942 | + return NULL; | |
| 943 | + | |
| 944 | + switch (priv->pd_lines) { | |
| 945 | + case 16: | |
| 946 | + input_fmts[0] = MEDIA_BUS_FMT_RGB565_1X16; | |
| 947 | + break; | |
| 948 | + case 18: | |
| 949 | + input_fmts[0] = MEDIA_BUS_FMT_RGB666_1X18; | |
| 950 | + break; | |
| 951 | + default: | |
| 952 | + case 24: | |
| 953 | + input_fmts[0] = MEDIA_BUS_FMT_RGB888_1X24; | |
| 954 | + break; | |
| 955 | + } | |
| 956 | + | |
| 957 | + *num_input_fmts = MAX_INPUT_SEL_FORMATS; | |
| 958 | + | |
| 959 | + return input_fmts; | |
| 960 | +} | |
| 961 | + | |
| 916 | 962 | static const struct drm_bridge_funcs tc358768_bridge_funcs = { |
| 917 | 963 | .attach = tc358768_bridge_attach, |
| 918 | 964 | .mode_valid = tc358768_bridge_mode_valid, |
| @@ -920,6 +966,11 @@ static const struct drm_bridge_funcs tc358768_bridge_funcs = { · 1 unmodified line | ||
| 920 | 966 | .enable = tc358768_bridge_enable, |
| 921 | 967 | .disable = tc358768_bridge_disable, |
| 922 | 968 | .post_disable = tc358768_bridge_post_disable, |
| 969 | + | |
| 970 | + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, | |
| 971 | + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, | |
| 972 | + .atomic_reset = drm_atomic_helper_bridge_reset, | |
| 973 | + .atomic_get_input_bus_fmts = tc358768_atomic_get_input_bus_fmts, | |
| 923 | 974 | }; |
| 924 | 975 | |
| 925 | 976 | static const struct drm_bridge_timings default_tc358768_timings = { |
| @@ -478,6 +478,7 @@ static void sn65dsi83_atomic_enable(struct drm_bridge *bridge, · 477 unmodified lines | ||
| 478 | 478 | dev_err(ctx->dev, "failed to lock PLL, ret=%i\n", ret); |
| 479 | 479 | /* On failure, disable PLL again and exit. */ |
| 480 | 480 | regmap_write(ctx->regmap, REG_RC_PLL_EN, 0x00); |
| 481 | + regulator_disable(ctx->vcc); | |
| 481 | 482 | return; |
| 482 | 483 | } |
| 483 | 484 | |
| @@ -618,6 +618,24 @@ exit: · 617 unmodified lines | ||
| 618 | 618 | return len; |
| 619 | 619 | } |
| 620 | 620 | |
| 621 | +static int ti_sn_aux_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_us) | |
| 622 | +{ | |
| 623 | + /* | |
| 624 | + * The HPD in this chip is a bit useless (See comment in | |
| 625 | + * ti_sn65dsi86_enable_comms) so if our driver is expected to wait | |
| 626 | + * for HPD, we just assume it's asserted after the wait_us delay. | |
| 627 | + * | |
| 628 | + * In case we are asked to wait forever (wait_us=0) take conservative | |
| 629 | + * 500ms delay. | |
| 630 | + */ | |
| 631 | + if (wait_us == 0) | |
| 632 | + wait_us = 500000; | |
| 633 | + | |
| 634 | + usleep_range(wait_us, wait_us + 1000); | |
| 635 | + | |
| 636 | + return 0; | |
| 637 | +} | |
| 638 | + | |
| 621 | 639 | static int ti_sn_aux_probe(struct auxiliary_device *adev, |
| 622 | 640 | const struct auxiliary_device_id *id) |
| 623 | 641 | { |
| @@ -627,6 +645,7 @@ static int ti_sn_aux_probe(struct auxiliary_device *adev, · 3 unmodified lines | ||
| 627 | 645 | pdata->aux.name = "ti-sn65dsi86-aux"; |
| 628 | 646 | pdata->aux.dev = &adev->dev; |
| 629 | 647 | pdata->aux.transfer = ti_sn_aux_transfer; |
| 648 | + pdata->aux.wait_hpd_asserted = ti_sn_aux_wait_hpd_asserted; | |
| 630 | 649 | drm_dp_aux_init(&pdata->aux); |
| 631 | 650 | |
| 632 | 651 | ret = devm_of_dp_aux_populate_ep_devices(&pdata->aux); |
| @@ -32,17 +32,13 @@ · 31 unmodified lines | ||
| 32 | 32 | * |
| 33 | 33 | * static int remove_conflicting_framebuffers(struct pci_dev *pdev) |
| 34 | 34 | * { |
| 35 | − * bool primary = false; | |
| 36 | 35 | * resource_size_t base, size; |
| 37 | 36 | * int ret; |
| 38 | 37 | * |
| 39 | 38 | * base = pci_resource_start(pdev, 0); |
| 40 | 39 | * size = pci_resource_len(pdev, 0); |
| 41 | − * #ifdef CONFIG_X86 | |
| 42 | − * primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; | |
| 43 | − * #endif | |
| 44 | 40 | * |
| 45 | − * return drm_aperture_remove_conflicting_framebuffers(base, size, primary, | |
| 41 | + * return drm_aperture_remove_conflicting_framebuffers(base, size, | |
| 46 | 42 | * &example_driver); |
| 47 | 43 | * } |
| 48 | 44 | * |
| @@ -161,7 +157,6 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); · 112 unmodified lines | ||
| 161 | 157 | * drm_aperture_remove_conflicting_framebuffers - remove existing framebuffers in the given range |
| 162 | 158 | * @base: the aperture's base address in physical memory |
| 163 | 159 | * @size: aperture size in bytes |
| 164 | − * @primary: also kick vga16fb if present | |
| 165 | 160 | * @req_driver: requesting DRM driver |
| 166 | 161 | * |
| 167 | 162 | * This function removes graphics device drivers which use the memory range described by |
| @@ -171,9 +166,9 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); · 3 unmodified lines | ||
| 171 | 166 | * 0 on success, or a negative errno code otherwise |
| 172 | 167 | */ |
| 173 | 168 | int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, |
| 174 | − bool primary, const struct drm_driver *req_driver) | |
| 169 | + const struct drm_driver *req_driver) | |
| 175 | 170 | { |
| 176 | − return aperture_remove_conflicting_devices(base, size, primary, req_driver->name); | |
| 171 | + return aperture_remove_conflicting_devices(base, size, req_driver->name); | |
| 177 | 172 | } |
| 178 | 173 | EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers); |
| 179 | 174 | |
| @@ -1209,7 +1209,16 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state) · 1208 unmodified lines | ||
| 1209 | 1209 | continue; |
| 1210 | 1210 | |
| 1211 | 1211 | ret = drm_crtc_vblank_get(crtc); |
| 1212 | − WARN_ONCE(ret != -EINVAL, "driver forgot to call drm_crtc_vblank_off()\n"); | |
| 1212 | + /* | |
| 1213 | + * Self-refresh is not a true "disable"; ensure vblank remains | |
| 1214 | + * enabled. | |
| 1215 | + */ | |
| 1216 | + if (new_crtc_state->self_refresh_active) | |
| 1217 | + WARN_ONCE(ret != 0, | |
| 1218 | + "driver disabled vblank in self-refresh\n"); | |
| 1219 | + else | |
| 1220 | + WARN_ONCE(ret != -EINVAL, | |
| 1221 | + "driver forgot to call drm_crtc_vblank_off()\n"); | |
| 1213 | 1222 | if (ret == 0) |
| 1214 | 1223 | drm_crtc_vblank_put(crtc); |
| 1215 | 1224 | } |
| @@ -3145,7 +3154,7 @@ fail: · 1929 unmodified lines | ||
| 3145 | 3154 | EXPORT_SYMBOL(drm_atomic_helper_update_plane); |
| 3146 | 3155 | |
| 3147 | 3156 | /** |
| 3148 | − * drm_atomic_helper_disable_plane - Helper for primary plane disable using * atomic | |
| 3157 | + * drm_atomic_helper_disable_plane - Helper for primary plane disable using atomic | |
| 3149 | 3158 | * @plane: plane to disable |
| 3150 | 3159 | * @ctx: lock acquire context |
| 3151 | 3160 | * |
| @@ -969,7 +969,9 @@ EXPORT_SYMBOL(drm_dev_register); · 968 unmodified lines | ||
| 969 | 969 | * |
| 970 | 970 | * Unregister the DRM device from the system. This does the reverse of |
| 971 | 971 | * drm_dev_register() but does not deallocate the device. The caller must call |
| 972 | − * drm_dev_put() to drop their final reference. | |
| 972 | + * drm_dev_put() to drop their final reference, unless it is managed with devres | |
| 973 | + * (as devices allocated with devm_drm_dev_alloc() are), in which case there is | |
| 974 | + * already an unwind action registered. | |
| 973 | 975 | * |
| 974 | 976 | * A special form of unregistering for hotpluggable devices is drm_dev_unplug(), |
| 975 | 977 | * which can be called while there are still open users of @dev. |
| @@ -641,19 +641,27 @@ static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y, · 640 unmodified lines | ||
| 641 | 641 | static void drm_fb_helper_memory_range_to_clip(struct fb_info *info, off_t off, size_t len, |
| 642 | 642 | struct drm_rect *clip) |
| 643 | 643 | { |
| 644 | + u32 line_length = info->fix.line_length; | |
| 645 | + u32 fb_height = info->var.yres; | |
| 644 | 646 | off_t end = off + len; |
| 645 | 647 | u32 x1 = 0; |
| 646 | − u32 y1 = off / info->fix.line_length; | |
| 648 | + u32 y1 = off / line_length; | |
| 647 | 649 | u32 x2 = info->var.xres; |
| 648 | − u32 y2 = DIV_ROUND_UP(end, info->fix.line_length); | |
| 650 | + u32 y2 = DIV_ROUND_UP(end, line_length); | |
| 651 | + | |
| 652 | + /* Don't allow any of them beyond the bottom bound of display area */ | |
| 653 | + if (y1 > fb_height) | |
| 654 | + y1 = fb_height; | |
| 655 | + if (y2 > fb_height) | |
| 656 | + y2 = fb_height; | |
| 649 | 657 | |
| 650 | 658 | if ((y2 - y1) == 1) { |
| 651 | 659 | /* |
| 652 | 660 | * We've only written to a single scanline. Try to reduce |
| 653 | 661 | * the number of horizontal pixels that need an update. |
| 654 | 662 | */ |
| 655 | − off_t bit_off = (off % info->fix.line_length) * 8; | |
| 656 | − off_t bit_end = (end % info->fix.line_length) * 8; | |
| 663 | + off_t bit_off = (off % line_length) * 8; | |
| 664 | + off_t bit_end = (end % line_length) * 8; | |
| 657 | 665 | |
| 658 | 666 | x1 = bit_off / info->var.bits_per_pixel; |
| 659 | 667 | x2 = DIV_ROUND_UP(bit_end, info->var.bits_per_pixel); |
| @@ -706,95 +714,6 @@ void drm_fb_helper_deferred_io(struct fb_info *info, struct list_head *pagerefli · 46 unmodified lines | ||
| 706 | 714 | } |
| 707 | 715 | EXPORT_SYMBOL(drm_fb_helper_deferred_io); |
| 708 | 716 | |
| 709 | −typedef ssize_t (*drm_fb_helper_read_screen)(struct fb_info *info, char __user *buf, | |
| 710 | − size_t count, loff_t pos); | |
| 711 | − | |
| 712 | −static ssize_t __drm_fb_helper_read(struct fb_info *info, char __user *buf, size_t count, | |
| 713 | − loff_t *ppos, drm_fb_helper_read_screen read_screen) | |
| 714 | −{ | |
| 715 | − loff_t pos = *ppos; | |
| 716 | − size_t total_size; | |
| 717 | − ssize_t ret; | |
| 718 | − | |
| 719 | − if (info->screen_size) | |
| 720 | − total_size = info->screen_size; | |
| 721 | − else | |
| 722 | − total_size = info->fix.smem_len; | |
| 723 | − | |
| 724 | − if (pos >= total_size) | |
| 725 | − return 0; | |
| 726 | − if (count >= total_size) | |
| 727 | − count = total_size; | |
| 728 | − if (total_size - count < pos) | |
| 729 | − count = total_size - pos; | |
| 730 | − | |
| 731 | − if (info->fbops->fb_sync) | |
| 732 | − info->fbops->fb_sync(info); | |
| 733 | − | |
| 734 | − ret = read_screen(info, buf, count, pos); | |
| 735 | − if (ret > 0) | |
| 736 | − *ppos += ret; | |
| 737 | − | |
| 738 | − return ret; | |
| 739 | −} | |
| 740 | − | |
| 741 | −typedef ssize_t (*drm_fb_helper_write_screen)(struct fb_info *info, const char __user *buf, | |
| 742 | − size_t count, loff_t pos); | |
| 743 | − | |
| 744 | −static ssize_t __drm_fb_helper_write(struct fb_info *info, const char __user *buf, size_t count, | |
| 745 | − loff_t *ppos, drm_fb_helper_write_screen write_screen) | |
| 746 | −{ | |
| 747 | − loff_t pos = *ppos; | |
| 748 | − size_t total_size; | |
| 749 | − ssize_t ret; | |
| 750 | − int err = 0; | |
| 751 | − | |
| 752 | − if (info->screen_size) | |
| 753 | − total_size = info->screen_size; | |
| 754 | − else | |
| 755 | − total_size = info->fix.smem_len; | |
| 756 | − | |
| 757 | − if (pos > total_size) | |
| 758 | − return -EFBIG; | |
| 759 | − if (count > total_size) { | |
| 760 | − err = -EFBIG; | |
| 761 | − count = total_size; | |
| 762 | − } | |
| 763 | − if (total_size - count < pos) { | |
| 764 | − if (!err) | |
| 765 | − err = -ENOSPC; | |
| 766 | − count = total_size - pos; | |
| 767 | − } | |
| 768 | − | |
| 769 | − if (info->fbops->fb_sync) | |
| 770 | − info->fbops->fb_sync(info); | |
| 771 | − | |
| 772 | − /* | |
| 773 | − * Copy to framebuffer even if we already logged an error. Emulates | |
| 774 | − * the behavior of the original fbdev implementation. | |
| 775 | − */ | |
| 776 | − ret = write_screen(info, buf, count, pos); | |
| 777 | − if (ret < 0) | |
| 778 | − return ret; /* return last error, if any */ | |
| 779 | − else if (!ret) | |
| 780 | − return err; /* return previous error, if any */ | |
| 781 | − | |
| 782 | − *ppos += ret; | |
| 783 | − | |
| 784 | − return ret; | |
| 785 | −} | |
| 786 | − | |
| 787 | −static ssize_t drm_fb_helper_read_screen_buffer(struct fb_info *info, char __user *buf, | |
| 788 | − size_t count, loff_t pos) | |
| 789 | −{ | |
| 790 | − const char *src = info->screen_buffer + pos; | |
| 791 | − | |
| 792 | − if (copy_to_user(buf, src, count)) | |
| 793 | − return -EFAULT; | |
| 794 | − | |
| 795 | − return count; | |
| 796 | −} | |
| 797 | − | |
| 798 | 717 | /** |
| 799 | 718 | * drm_fb_helper_sys_read - Implements struct &fb_ops.fb_read for system memory |
| 800 | 719 | * @info: fb_info struct pointer |
| @@ -808,21 +727,10 @@ static ssize_t drm_fb_helper_read_screen_buffer(struct fb_info *info, char __use · 7 unmodified lines | ||
| 808 | 727 | ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf, |
| 809 | 728 | size_t count, loff_t *ppos) |
| 810 | 729 | { |
| 811 | − return __drm_fb_helper_read(info, buf, count, ppos, drm_fb_helper_read_screen_buffer); | |
| 730 | + return fb_sys_read(info, buf, count, ppos); | |
| 812 | 731 | } |
| 813 | 732 | EXPORT_SYMBOL(drm_fb_helper_sys_read); |
| 814 | 733 | |
| 815 | −static ssize_t drm_fb_helper_write_screen_buffer(struct fb_info *info, const char __user *buf, | |
| 816 | − size_t count, loff_t pos) | |
| 817 | −{ | |
| 818 | − char *dst = info->screen_buffer + pos; | |
| 819 | − | |
| 820 | − if (copy_from_user(dst, buf, count)) | |
| 821 | − return -EFAULT; | |
| 822 | − | |
| 823 | − return count; | |
| 824 | −} | |
| 825 | − | |
| 826 | 734 | /** |
| 827 | 735 | * drm_fb_helper_sys_write - Implements struct &fb_ops.fb_write for system memory |
| 828 | 736 | * @info: fb_info struct pointer |
| @@ -841,7 +749,7 @@ ssize_t drm_fb_helper_sys_write(struct fb_info *info, const char __user *buf, · 12 unmodified lines | ||
| 841 | 749 | ssize_t ret; |
| 842 | 750 | struct drm_rect damage_area; |
| 843 | 751 | |
| 844 | − ret = __drm_fb_helper_write(info, buf, count, ppos, drm_fb_helper_write_screen_buffer); | |
| 752 | + ret = fb_sys_write(info, buf, count, ppos); | |
| 845 | 753 | if (ret <= 0) |
| 846 | 754 | return ret; |
| 847 | 755 | |
| @@ -913,39 +821,6 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info, · 65 unmodified lines | ||
| 913 | 821 | } |
| 914 | 822 | EXPORT_SYMBOL(drm_fb_helper_sys_imageblit); |
| 915 | 823 | |
| 916 | −static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_t count, | |
| 917 | − loff_t pos) | |
| 918 | −{ | |
| 919 | − const char __iomem *src = info->screen_base + pos; | |
| 920 | − size_t alloc_size = min_t(size_t, count, PAGE_SIZE); | |
| 921 | − ssize_t ret = 0; | |
| 922 | − int err = 0; | |
| 923 | − char *tmp; | |
| 924 | − | |
| 925 | − tmp = kmalloc(alloc_size, GFP_KERNEL); | |
| 926 | − if (!tmp) | |
| 927 | − return -ENOMEM; | |
| 928 | − | |
| 929 | − while (count) { | |
| 930 | − size_t c = min_t(size_t, count, alloc_size); | |
| 931 | − | |
| 932 | − memcpy_fromio(tmp, src, c); | |
| 933 | − if (copy_to_user(buf, tmp, c)) { | |
| 934 | − err = -EFAULT; | |
| 935 | − break; | |
| 936 | − } | |
| 937 | − | |
| 938 | − src += c; | |
| 939 | − buf += c; | |
| 940 | − ret += c; | |
| 941 | − count -= c; | |
| 942 | − } | |
| 943 | − | |
| 944 | − kfree(tmp); | |
| 945 | − | |
| 946 | − return ret ? ret : err; | |
| 947 | −} | |
| 948 | − | |
| 949 | 824 | /** |
| 950 | 825 | * drm_fb_helper_cfb_read - Implements struct &fb_ops.fb_read for I/O memory |
| 951 | 826 | * @info: fb_info struct pointer |
| @@ -959,43 +834,10 @@ static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_ · 7 unmodified lines | ||
| 959 | 834 | ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf, |
| 960 | 835 | size_t count, loff_t *ppos) |
| 961 | 836 | { |
| 962 | − return __drm_fb_helper_read(info, buf, count, ppos, fb_read_screen_base); | |
| 837 | + return fb_io_read(info, buf, count, ppos); | |
| 963 | 838 | } |
| 964 | 839 | EXPORT_SYMBOL(drm_fb_helper_cfb_read); |
| 965 | 840 | |
| 966 | −static ssize_t fb_write_screen_base(struct fb_info *info, const char __user *buf, size_t count, | |
| 967 | − loff_t pos) | |
| 968 | −{ | |
| 969 | − char __iomem *dst = info->screen_base + pos; | |
| 970 | − size_t alloc_size = min_t(size_t, count, PAGE_SIZE); | |
| 971 | − ssize_t ret = 0; | |
| 972 | − int err = 0; | |
| 973 | − u8 *tmp; | |
| 974 | − | |
| 975 | − tmp = kmalloc(alloc_size, GFP_KERNEL); | |
| 976 | − if (!tmp) | |
| 977 | − return -ENOMEM; | |
| 978 | − | |
| 979 | − while (count) { | |
| 980 | − size_t c = min_t(size_t, count, alloc_size); | |
| 981 | − | |
| 982 | − if (copy_from_user(tmp, buf, c)) { | |
| 983 | − err = -EFAULT; | |
| 984 | − break; | |
| 985 | − } | |
| 986 | − memcpy_toio(dst, tmp, c); | |
| 987 | − | |
| 988 | − dst += c; | |
| 989 | − buf += c; | |
| 990 | − ret += c; | |
| 991 | − count -= c; | |
| 992 | − } | |
| 993 | − | |
| 994 | − kfree(tmp); | |
| 995 | − | |
| 996 | − return ret ? ret : err; | |
| 997 | −} | |
| 998 | − | |
| 999 | 841 | /** |
| 1000 | 842 | * drm_fb_helper_cfb_write - Implements struct &fb_ops.fb_write for I/O memory |
| 1001 | 843 | * @info: fb_info struct pointer |
| @@ -1014,7 +856,7 @@ ssize_t drm_fb_helper_cfb_write(struct fb_info *info, const char __user *buf, · 12 unmodified lines | ||
| 1014 | 856 | ssize_t ret; |
| 1015 | 857 | struct drm_rect damage_area; |
| 1016 | 858 | |
| 1017 | − ret = __drm_fb_helper_write(info, buf, count, ppos, fb_write_screen_base); | |
| 859 | + ret = fb_io_write(info, buf, count, ppos); | |
| 1018 | 860 | if (ret <= 0) |
| 1019 | 861 | return ret; |
| 1020 | 862 | |
| @@ -9,6 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | #include <linux/module.h> |
| 10 | 10 | |
| 11 | 11 | #include <drm/drm_damage_helper.h> |
| 12 | +#include <drm/drm_drv.h> | |
| 12 | 13 | #include <drm/drm_fourcc.h> |
| 13 | 14 | #include <drm/drm_framebuffer.h> |
| 14 | 15 | #include <drm/drm_gem.h> |
| @@ -164,6 +165,14 @@ int drm_gem_fb_init_with_funcs(struct drm_device *dev, · 149 unmodified lines | ||
| 164 | 165 | return -EINVAL; |
| 165 | 166 | } |
| 166 | 167 | |
| 168 | + if (drm_drv_uses_atomic_modeset(dev) && | |
| 169 | + !drm_any_plane_has_format(dev, mode_cmd->pixel_format, | |
| 170 | + mode_cmd->modifier[0])) { | |
| 171 | + drm_dbg(dev, "Unsupported pixel format %p4cc / modifier 0x%llx\n", | |
| 172 | + &mode_cmd->pixel_format, mode_cmd->modifier[0]); | |
| 173 | + return -EINVAL; | |
| 174 | + } | |
| 175 | + | |
| 167 | 176 | for (i = 0; i < info->num_planes; i++) { |
| 168 | 177 | unsigned int width = mode_cmd->width / (i ? info->hsub : 1); |
| 169 | 178 | unsigned int height = mode_cmd->height / (i ? info->vsub : 1); |
| @@ -45,7 +45,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs; · 44 unmodified lines | ||
| 45 | 45 | * the frame's scanout buffer or the cursor image. If there's no more space |
| 46 | 46 | * left in VRAM, inactive GEM objects can be moved to system memory. |
| 47 | 47 | * |
| 48 | − * To initialize the VRAM helper library call drmm_vram_helper_alloc_mm(). | |
| 48 | + * To initialize the VRAM helper library call drmm_vram_helper_init(). | |
| 49 | 49 | * The function allocates and initializes an instance of &struct drm_vram_mm |
| 50 | 50 | * in &struct drm_device.vram_mm . Use &DRM_GEM_VRAM_DRIVER to initialize |
| 51 | 51 | * &struct drm_driver and &DRM_VRAM_MM_FILE_OPERATIONS to initialize |
| @@ -73,7 +73,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs; · 21 unmodified lines | ||
| 73 | 73 | * // setup device, vram base and size |
| 74 | 74 | * // ... |
| 75 | 75 | * |
| 76 | − * ret = drmm_vram_helper_alloc_mm(dev, vram_base, vram_size); | |
| 76 | + * ret = drmm_vram_helper_init(dev, vram_base, vram_size); | |
| 77 | 77 | * if (ret) |
| 78 | 78 | * return ret; |
| 79 | 79 | * return 0; |
| @@ -86,7 +86,7 @@ static const struct drm_gem_object_funcs drm_gem_vram_object_funcs; · 6 unmodified lines | ||
| 86 | 86 | * to userspace. |
| 87 | 87 | * |
| 88 | 88 | * You don't have to clean up the instance of VRAM MM. |
| 89 | − * drmm_vram_helper_alloc_mm() is a managed interface that installs a | |
| 89 | + * drmm_vram_helper_init() is a managed interface that installs a | |
| 90 | 90 | * clean-up handler to run during the DRM device's release. |
| 91 | 91 | * |
| 92 | 92 | * For drawing or scanout operations, rsp. buffer objects have to be pinned |
| @@ -221,7 +221,7 @@ mipi_dsi_device_register_full(struct mipi_dsi_host *host, · 220 unmodified lines | ||
| 221 | 221 | return dsi; |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | − dsi->dev.of_node = info->node; | |
| 224 | + device_set_node(&dsi->dev, of_fwnode_handle(info->node)); | |
| 225 | 225 | dsi->channel = info->channel; |
| 226 | 226 | strlcpy(dsi->name, info->type, sizeof(dsi->name)); |
| 227 | 227 | |
| @@ -11,12 +11,14 @@ · 10 unmodified lines | ||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | #include <linux/acpi.h> |
| 14 | +#include <linux/component.h> | |
| 14 | 15 | #include <linux/device.h> |
| 15 | 16 | #include <linux/err.h> |
| 16 | 17 | #include <linux/export.h> |
| 17 | 18 | #include <linux/gfp.h> |
| 18 | 19 | #include <linux/i2c.h> |
| 19 | 20 | #include <linux/kdev_t.h> |
| 21 | +#include <linux/property.h> | |
| 20 | 22 | #include <linux/slab.h> |
| 21 | 23 | |
| 22 | 24 | #include <drm/drm_accel.h> |
| @@ -96,6 +98,34 @@ static char *drm_devnode(const struct device *dev, umode_t *mode) · 73 unmodified lines | ||
| 96 | 98 | return kasprintf(GFP_KERNEL, "dri/%s", dev_name(dev)); |
| 97 | 99 | } |
| 98 | 100 | |
| 101 | +static int typec_connector_bind(struct device *dev, | |
| 102 | + struct device *typec_connector, void *data) | |
| 103 | +{ | |
| 104 | + int ret; | |
| 105 | + | |
| 106 | + ret = sysfs_create_link(&dev->kobj, &typec_connector->kobj, "typec_connector"); | |
| 107 | + if (ret) | |
| 108 | + return ret; | |
| 109 | + | |
| 110 | + ret = sysfs_create_link(&typec_connector->kobj, &dev->kobj, "drm_connector"); | |
| 111 | + if (ret) | |
| 112 | + sysfs_remove_link(&dev->kobj, "typec_connector"); | |
| 113 | + | |
| 114 | + return ret; | |
| 115 | +} | |
| 116 | + | |
| 117 | +static void typec_connector_unbind(struct device *dev, | |
| 118 | + struct device *typec_connector, void *data) | |
| 119 | +{ | |
| 120 | + sysfs_remove_link(&typec_connector->kobj, "drm_connector"); | |
| 121 | + sysfs_remove_link(&dev->kobj, "typec_connector"); | |
| 122 | +} | |
| 123 | + | |
| 124 | +static const struct component_ops typec_connector_ops = { | |
| 125 | + .bind = typec_connector_bind, | |
| 126 | + .unbind = typec_connector_unbind, | |
| 127 | +}; | |
| 128 | + | |
| 99 | 129 | static CLASS_ATTR_STRING(version, S_IRUGO, "drm 1.1.0 20060810"); |
| 100 | 130 | |
| 101 | 131 | /** |
| @@ -282,16 +312,27 @@ static ssize_t modes_show(struct device *device, · 180 unmodified lines | ||
| 282 | 312 | return written; |
| 283 | 313 | } |
| 284 | 314 | |
| 315 | +static ssize_t connector_id_show(struct device *device, | |
| 316 | + struct device_attribute *attr, | |
| 317 | + char *buf) | |
| 318 | +{ | |
| 319 | + struct drm_connector *connector = to_drm_connector(device); | |
| 320 | + | |
| 321 | + return sysfs_emit(buf, "%d\n", connector->base.id); | |
| 322 | +} | |
| 323 | + | |
| 285 | 324 | static DEVICE_ATTR_RW(status); |
| 286 | 325 | static DEVICE_ATTR_RO(enabled); |
| 287 | 326 | static DEVICE_ATTR_RO(dpms); |
| 288 | 327 | static DEVICE_ATTR_RO(modes); |
| 328 | +static DEVICE_ATTR_RO(connector_id); | |
| 289 | 329 | |
| 290 | 330 | static struct attribute *connector_dev_attrs[] = { |
| 291 | 331 | &dev_attr_status.attr, |
| 292 | 332 | &dev_attr_enabled.attr, |
| 293 | 333 | &dev_attr_dpms.attr, |
| 294 | 334 | &dev_attr_modes.attr, |
| 335 | + &dev_attr_connector_id.attr, | |
| 295 | 336 | NULL |
| 296 | 337 | }; |
| 297 | 338 | |
| @@ -353,9 +394,16 @@ int drm_sysfs_connector_add(struct drm_connector *connector) · 55 unmodified lines | ||
| 353 | 394 | |
| 354 | 395 | connector->kdev = kdev; |
| 355 | 396 | |
| 397 | + if (dev_fwnode(kdev)) { | |
| 398 | + r = component_add(kdev, &typec_connector_ops); | |
| 399 | + if (r) | |
| 400 | + drm_err(dev, "failed to add component to create link to typec connector\n"); | |
| 401 | + } | |
| 402 | + | |
| 356 | 403 | if (connector->ddc) |
| 357 | 404 | return sysfs_create_link(&connector->kdev->kobj, |
| 358 | 405 | &connector->ddc->dev.kobj, "ddc"); |
| 406 | + | |
| 359 | 407 | return 0; |
| 360 | 408 | |
| 361 | 409 | err_free: |
| @@ -371,6 +419,9 @@ void drm_sysfs_connector_remove(struct drm_connector *connector) · 9 unmodified lines | ||
| 371 | 419 | if (connector->ddc) |
| 372 | 420 | sysfs_remove_link(&connector->kdev->kobj, "ddc"); |
| 373 | 421 | |
| 422 | + if (dev_fwnode(connector->kdev)) | |
| 423 | + component_del(connector->kdev, &typec_connector_ops); | |
| 424 | + | |
| 374 | 425 | DRM_DEBUG("removing \"%s\" from sysfs\n", |
| 375 | 426 | connector->name); |
| 376 | 427 | |
| @@ -231,7 +231,7 @@ static int psb_fbdev_fb_probe(struct drm_fb_helper *fb_helper, · 230 unmodified lines | ||
| 231 | 231 | info->fix.mmio_start = pci_resource_start(pdev, 0); |
| 232 | 232 | info->fix.mmio_len = pci_resource_len(pdev, 0); |
| 233 | 233 | |
| 234 | − memset(info->screen_base, 0, info->screen_size); | |
| 234 | + fb_memset_io(info->screen_base, 0, info->screen_size); | |
| 235 | 235 | |
| 236 | 236 | /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ |
| 237 | 237 | |
| @@ -7,6 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * |
| 8 | 8 | **************************************************************************/ |
| 9 | 9 | |
| 10 | +#include <linux/aperture.h> | |
| 10 | 11 | #include <linux/cpu.h> |
| 11 | 12 | #include <linux/module.h> |
| 12 | 13 | #include <linux/notifier.h> |
| @@ -19,7 +20,6 @@ · 6 unmodified lines | ||
| 19 | 20 | #include <acpi/video.h> |
| 20 | 21 | |
| 21 | 22 | #include <drm/drm.h> |
| 22 | −#include <drm/drm_aperture.h> | |
| 23 | 23 | #include <drm/drm_drv.h> |
| 24 | 24 | #include <drm/drm_file.h> |
| 25 | 25 | #include <drm/drm_ioctl.h> |
| @@ -414,20 +414,45 @@ out_err: · 388 unmodified lines | ||
| 414 | 414 | return ret; |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | +/* | |
| 418 | + * Hardware for gma500 is a hybrid device, which both acts as a PCI | |
| 419 | + * device (for legacy vga functionality) but also more like an | |
| 420 | + * integrated display on a SoC where the framebuffer simply | |
| 421 | + * resides in main memory and not in a special PCI bar (that | |
| 422 | + * internally redirects to a stolen range of main memory) like all | |
| 423 | + * other integrated PCI display devices implement it. | |
| 424 | + * | |
| 425 | + * To catch all cases we need to remove conflicting firmware devices | |
| 426 | + * for the stolen system memory and for the VGA functionality. As we | |
| 427 | + * currently cannot easily find the framebuffer's location in stolen | |
| 428 | + * memory, we remove all framebuffers here. | |
| 429 | + * | |
| 430 | + * TODO: Refactor psb_driver_load() to map vdc_reg earlier. Then | |
| 431 | + * we might be able to read the framebuffer range from the | |
| 432 | + * device. | |
| 433 | + */ | |
| 434 | +static int gma_remove_conflicting_framebuffers(struct pci_dev *pdev, | |
| 435 | + const struct drm_driver *req_driver) | |
| 436 | +{ | |
| 437 | + resource_size_t base = 0; | |
| 438 | + resource_size_t size = U32_MAX; /* 4 GiB HW limit */ | |
| 439 | + const char *name = req_driver->name; | |
| 440 | + int ret; | |
| 441 | + | |
| 442 | + ret = aperture_remove_conflicting_devices(base, size, name); | |
| 443 | + if (ret) | |
| 444 | + return ret; | |
| 445 | + | |
| 446 | + return __aperture_remove_legacy_vga_devices(pdev); | |
| 447 | +} | |
| 448 | + | |
| 417 | 449 | static int psb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
| 418 | 450 | { |
| 419 | 451 | struct drm_psb_private *dev_priv; |
| 420 | 452 | struct drm_device *dev; |
| 421 | 453 | int ret; |
| 422 | 454 | |
| 423 | − /* | |
| 424 | − * We cannot yet easily find the framebuffer's location in memory. So | |
| 425 | − * remove all framebuffers here. | |
| 426 | − * | |
| 427 | − * TODO: Refactor psb_driver_load() to map vdc_reg earlier. Then we | |
| 428 | − * might be able to read the framebuffer range from the device. | |
| 429 | − */ | |
| 430 | − ret = drm_aperture_remove_framebuffers(true, &driver); | |
| 455 | + ret = gma_remove_conflicting_framebuffers(pdev, &driver); | |
| 431 | 456 | if (ret) |
| 432 | 457 | return ret; |
| 433 | 458 | |
| @@ -74,7 +74,6 @@ static int hyperv_setup_vram(struct hyperv_drm_device *hv, · 73 unmodified lines | ||
| 74 | 74 | |
| 75 | 75 | drm_aperture_remove_conflicting_framebuffers(screen_info.lfb_base, |
| 76 | 76 | screen_info.lfb_size, |
| 77 | − false, | |
| 78 | 77 | &hyperv_driver); |
| 79 | 78 | |
| 80 | 79 | hv->fb_size = (unsigned long)hv->mmio_megabytes * 1024 * 1024; |
| @@ -195,6 +195,7 @@ i915-y += \ · 194 unmodified lines | ||
| 195 | 195 | # general-purpose microcontroller (GuC) support |
| 196 | 196 | i915-y += \ |
| 197 | 197 | gt/uc/intel_gsc_fw.o \ |
| 198 | + gt/uc/intel_gsc_proxy.o \ | |
| 198 | 199 | gt/uc/intel_gsc_uc.o \ |
| 199 | 200 | gt/uc/intel_gsc_uc_heci_cmd_submit.o\ |
| 200 | 201 | gt/uc/intel_guc.o \ |
| @@ -347,6 +348,7 @@ i915-y += \ · 146 unmodified lines | ||
| 347 | 348 | i915-$(CONFIG_DRM_I915_PXP) += \ |
| 348 | 349 | pxp/intel_pxp_cmd.o \ |
| 349 | 350 | pxp/intel_pxp_debugfs.o \ |
| 351 | + pxp/intel_pxp_gsccs.o \ | |
| 350 | 352 | pxp/intel_pxp_irq.o \ |
| 351 | 353 | pxp/intel_pxp_pm.o \ |
| 352 | 354 | pxp/intel_pxp_session.o |
| @@ -382,7 +384,7 @@ obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o · 29 unmodified lines | ||
| 382 | 384 | # |
| 383 | 385 | # Enable locally for CONFIG_DRM_I915_WERROR=y. See also scripts/Makefile.build |
| 384 | 386 | ifdef CONFIG_DRM_I915_WERROR |
| 385 | − cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $< | |
| 387 | + cmd_checkdoc = $(srctree)/scripts/kernel-doc -none -Werror $< | |
| 386 | 388 | endif |
| 387 | 389 | |
| 388 | 390 | # header test |
| @@ -397,7 +399,7 @@ always-$(CONFIG_DRM_I915_WERROR) += \ · 8 unmodified lines | ||
| 397 | 399 | |
| 398 | 400 | quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) |
| 399 | 401 | cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \ |
| 400 | − $(srctree)/scripts/kernel-doc -none $<; touch $@ | |
| 402 | + $(srctree)/scripts/kernel-doc -none -Werror $<; touch $@ | |
| 401 | 403 | |
| 402 | 404 | $(obj)/%.hdrtest: $(src)/%.h FORCE |
| 403 | 405 | $(call if_changed_dep,hdrtest) |
| @@ -43,24 +43,24 @@ static void gen8_set_pte(void __iomem *addr, gen8_pte_t pte) · 42 unmodified lines | ||
| 43 | 43 | static void dpt_insert_page(struct i915_address_space *vm, |
| 44 | 44 | dma_addr_t addr, |
| 45 | 45 | u64 offset, |
| 46 | − enum i915_cache_level level, | |
| 46 | + unsigned int pat_index, | |
| 47 | 47 | u32 flags) |
| 48 | 48 | { |
| 49 | 49 | struct i915_dpt *dpt = i915_vm_to_dpt(vm); |
| 50 | 50 | gen8_pte_t __iomem *base = dpt->iomem; |
| 51 | 51 | |
| 52 | 52 | gen8_set_pte(base + offset / I915_GTT_PAGE_SIZE, |
| 53 | − vm->pte_encode(addr, level, flags)); | |
| 53 | + vm->pte_encode(addr, pat_index, flags)); | |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | static void dpt_insert_entries(struct i915_address_space *vm, |
| 57 | 57 | struct i915_vma_resource *vma_res, |
| 58 | − enum i915_cache_level level, | |
| 58 | + unsigned int pat_index, | |
| 59 | 59 | u32 flags) |
| 60 | 60 | { |
| 61 | 61 | struct i915_dpt *dpt = i915_vm_to_dpt(vm); |
| 62 | 62 | gen8_pte_t __iomem *base = dpt->iomem; |
| 63 | − const gen8_pte_t pte_encode = vm->pte_encode(0, level, flags); | |
| 63 | + const gen8_pte_t pte_encode = vm->pte_encode(0, pat_index, flags); | |
| 64 | 64 | struct sgt_iter sgt_iter; |
| 65 | 65 | dma_addr_t addr; |
| 66 | 66 | int i; |
| @@ -83,7 +83,7 @@ static void dpt_clear_range(struct i915_address_space *vm, · 16 unmodified lines | ||
| 83 | 83 | static void dpt_bind_vma(struct i915_address_space *vm, |
| 84 | 84 | struct i915_vm_pt_stash *stash, |
| 85 | 85 | struct i915_vma_resource *vma_res, |
| 86 | − enum i915_cache_level cache_level, | |
| 86 | + unsigned int pat_index, | |
| 87 | 87 | u32 flags) |
| 88 | 88 | { |
| 89 | 89 | u32 pte_flags; |
| @@ -98,7 +98,7 @@ static void dpt_bind_vma(struct i915_address_space *vm, · 8 unmodified lines | ||
| 98 | 98 | if (vma_res->bi.lmem) |
| 99 | 99 | pte_flags |= PTE_LM; |
| 100 | 100 | |
| 101 | − vm->insert_entries(vm, vma_res, cache_level, pte_flags); | |
| 101 | + vm->insert_entries(vm, vma_res, pat_index, pte_flags); | |
| 102 | 102 | |
| 103 | 103 | vma_res->page_sizes_gtt = I915_GTT_PAGE_SIZE; |
| 104 | 104 | |
| @@ -300,7 +300,7 @@ intel_dpt_create(struct intel_framebuffer *fb) · 195 unmodified lines | ||
| 300 | 300 | vm->vma_ops.bind_vma = dpt_bind_vma; |
| 301 | 301 | vm->vma_ops.unbind_vma = dpt_unbind_vma; |
| 302 | 302 | |
| 303 | − vm->pte_encode = gen8_ggtt_pte_encode; | |
| 303 | + vm->pte_encode = vm->gt->ggtt->vm.pte_encode; | |
| 304 | 304 | |
| 305 | 305 | dpt->obj = dpt_obj; |
| 306 | 306 | dpt->obj->is_dpt = true; |
| @@ -1230,7 +1230,8 @@ bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb) · 1229 unmodified lines | ||
| 1230 | 1230 | { |
| 1231 | 1231 | struct drm_i915_private *i915 = to_i915(fb->base.dev); |
| 1232 | 1232 | |
| 1233 | − return IS_ALDERLAKE_P(i915) && intel_fb_uses_dpt(&fb->base); | |
| 1233 | + return (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14) && | |
| 1234 | + intel_fb_uses_dpt(&fb->base); | |
| 1234 | 1235 | } |
| 1235 | 1236 | |
| 1236 | 1237 | static int intel_fb_pitch(const struct intel_framebuffer *fb, int color_plane, unsigned int rotation) |
| @@ -1366,9 +1367,10 @@ plane_view_scanout_stride(const struct intel_framebuffer *fb, int color_plane, · 129 unmodified lines | ||
| 1366 | 1367 | unsigned int tile_width, |
| 1367 | 1368 | unsigned int src_stride_tiles, unsigned int dst_stride_tiles) |
| 1368 | 1369 | { |
| 1370 | + struct drm_i915_private *i915 = to_i915(fb->base.dev); | |
| 1369 | 1371 | unsigned int stride_tiles; |
| 1370 | 1372 | |
| 1371 | − if (IS_ALDERLAKE_P(to_i915(fb->base.dev))) | |
| 1373 | + if (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14) | |
| 1372 | 1374 | stride_tiles = src_stride_tiles; |
| 1373 | 1375 | else |
| 1374 | 1376 | stride_tiles = dst_stride_tiles; |
| @@ -1562,7 +1564,8 @@ static void intel_fb_view_init(struct drm_i915_private *i915, struct intel_fb_vi · 187 unmodified lines | ||
| 1562 | 1564 | memset(view, 0, sizeof(*view)); |
| 1563 | 1565 | view->gtt.type = view_type; |
| 1564 | 1566 | |
| 1565 | − if (view_type == I915_GTT_VIEW_REMAPPED && IS_ALDERLAKE_P(i915)) | |
| 1567 | + if (view_type == I915_GTT_VIEW_REMAPPED && | |
| 1568 | + (IS_ALDERLAKE_P(i915) || DISPLAY_VER(i915) >= 14)) | |
| 1566 | 1569 | view->gtt.remapped.plane_alignment = SZ_2M / PAGE_SIZE; |
| 1567 | 1570 | } |
| 1568 | 1571 | |
| @@ -40,8 +40,10 @@ · 39 unmodified lines | ||
| 40 | 40 | #include <drm/drm_crtc.h> |
| 41 | 41 | #include <drm/drm_fb_helper.h> |
| 42 | 42 | #include <drm/drm_fourcc.h> |
| 43 | +#include <drm/drm_gem_framebuffer_helper.h> | |
| 43 | 44 | |
| 44 | 45 | #include "gem/i915_gem_lmem.h" |
| 46 | +#include "gem/i915_gem_mman.h" | |
| 45 | 47 | |
| 46 | 48 | #include "i915_drv.h" |
| 47 | 49 | #include "intel_display_types.h" |
| @@ -67,6 +69,11 @@ struct intel_fbdev { · 19 unmodified lines | ||
| 67 | 69 | struct mutex hpd_lock; |
| 68 | 70 | }; |
| 69 | 71 | |
| 72 | +static struct intel_fbdev *to_intel_fbdev(struct drm_fb_helper *fb_helper) | |
| 73 | +{ | |
| 74 | + return container_of(fb_helper, struct intel_fbdev, helper); | |
| 75 | +} | |
| 76 | + | |
| 70 | 77 | static struct intel_frontbuffer *to_frontbuffer(struct intel_fbdev *ifbdev) |
| 71 | 78 | { |
| 72 | 79 | return ifbdev->fb->frontbuffer; |
| @@ -79,9 +86,7 @@ static void intel_fbdev_invalidate(struct intel_fbdev *ifbdev) · 6 unmodified lines | ||
| 79 | 86 | |
| 80 | 87 | static int intel_fbdev_set_par(struct fb_info *info) |
| 81 | 88 | { |
| 82 | − struct drm_fb_helper *fb_helper = info->par; | |
| 83 | − struct intel_fbdev *ifbdev = | |
| 84 | − container_of(fb_helper, struct intel_fbdev, helper); | |
| 89 | + struct intel_fbdev *ifbdev = to_intel_fbdev(info->par); | |
| 85 | 90 | int ret; |
| 86 | 91 | |
| 87 | 92 | ret = drm_fb_helper_set_par(info); |
| @@ -93,9 +98,7 @@ static int intel_fbdev_set_par(struct fb_info *info) · 5 unmodified lines | ||
| 93 | 98 | |
| 94 | 99 | static int intel_fbdev_blank(int blank, struct fb_info *info) |
| 95 | 100 | { |
| 96 | − struct drm_fb_helper *fb_helper = info->par; | |
| 97 | − struct intel_fbdev *ifbdev = | |
| 98 | − container_of(fb_helper, struct intel_fbdev, helper); | |
| 101 | + struct intel_fbdev *ifbdev = to_intel_fbdev(info->par); | |
| 99 | 102 | int ret; |
| 100 | 103 | |
| 101 | 104 | ret = drm_fb_helper_blank(blank, info); |
| @@ -108,9 +111,7 @@ static int intel_fbdev_blank(int blank, struct fb_info *info) · 6 unmodified lines | ||
| 108 | 111 | static int intel_fbdev_pan_display(struct fb_var_screeninfo *var, |
| 109 | 112 | struct fb_info *info) |
| 110 | 113 | { |
| 111 | − struct drm_fb_helper *fb_helper = info->par; | |
| 112 | − struct intel_fbdev *ifbdev = | |
| 113 | − container_of(fb_helper, struct intel_fbdev, helper); | |
| 114 | + struct intel_fbdev *ifbdev = to_intel_fbdev(info->par); | |
| 114 | 115 | int ret; |
| 115 | 116 | |
| 116 | 117 | ret = drm_fb_helper_pan_display(var, info); |
| @@ -120,6 +121,15 @@ static int intel_fbdev_pan_display(struct fb_var_screeninfo *var, · 3 unmodified lines | ||
| 120 | 121 | return ret; |
| 121 | 122 | } |
| 122 | 123 | |
| 124 | +static int intel_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma) | |
| 125 | +{ | |
| 126 | + struct intel_fbdev *fbdev = to_intel_fbdev(info->par); | |
| 127 | + struct drm_gem_object *bo = drm_gem_fb_get_obj(&fbdev->fb->base, 0); | |
| 128 | + struct drm_i915_gem_object *obj = to_intel_bo(bo); | |
| 129 | + | |
| 130 | + return i915_gem_fb_mmap(obj, vma); | |
| 131 | +} | |
| 132 | + | |
| 123 | 133 | static const struct fb_ops intelfb_ops = { |
| 124 | 134 | .owner = THIS_MODULE, |
| 125 | 135 | DRM_FB_HELPER_DEFAULT_OPS, |
| @@ -131,13 +141,13 @@ static const struct fb_ops intelfb_ops = { · 5 unmodified lines | ||
| 131 | 141 | .fb_imageblit = drm_fb_helper_cfb_imageblit, |
| 132 | 142 | .fb_pan_display = intel_fbdev_pan_display, |
| 133 | 143 | .fb_blank = intel_fbdev_blank, |
| 144 | + .fb_mmap = intel_fbdev_mmap, | |
| 134 | 145 | }; |
| 135 | 146 | |
| 136 | 147 | static int intelfb_alloc(struct drm_fb_helper *helper, |
| 137 | 148 | struct drm_fb_helper_surface_size *sizes) |
| 138 | 149 | { |
| 139 | − struct intel_fbdev *ifbdev = | |
| 140 | − container_of(helper, struct intel_fbdev, helper); | |
| 150 | + struct intel_fbdev *ifbdev = to_intel_fbdev(helper); | |
| 141 | 151 | struct drm_framebuffer *fb; |
| 142 | 152 | struct drm_device *dev = helper->dev; |
| 143 | 153 | struct drm_i915_private *dev_priv = to_i915(dev); |
| @@ -163,7 +173,8 @@ static int intelfb_alloc(struct drm_fb_helper *helper, · 19 unmodified lines | ||
| 163 | 173 | obj = ERR_PTR(-ENODEV); |
| 164 | 174 | if (HAS_LMEM(dev_priv)) { |
| 165 | 175 | obj = i915_gem_object_create_lmem(dev_priv, size, |
| 166 | − I915_BO_ALLOC_CONTIGUOUS); | |
| 176 | + I915_BO_ALLOC_CONTIGUOUS | | |
| 177 | + I915_BO_ALLOC_USER); | |
| 167 | 178 | } else { |
| 168 | 179 | /* |
| 169 | 180 | * If the FB is too big, just don't use it since fbdev is not very |
| @@ -193,8 +204,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper, · 23 unmodified lines | ||
| 193 | 204 | static int intelfb_create(struct drm_fb_helper *helper, |
| 194 | 205 | struct drm_fb_helper_surface_size *sizes) |
| 195 | 206 | { |
| 196 | − struct intel_fbdev *ifbdev = | |
| 197 | − container_of(helper, struct intel_fbdev, helper); | |
| 207 | + struct intel_fbdev *ifbdev = to_intel_fbdev(helper); | |
| 198 | 208 | struct intel_framebuffer *intel_fb = ifbdev->fb; |
| 199 | 209 | struct drm_device *dev = helper->dev; |
| 200 | 210 | struct drm_i915_private *dev_priv = to_i915(dev); |
| @@ -110,7 +110,9 @@ initial_plane_vma(struct drm_i915_private *i915, · 109 unmodified lines | ||
| 110 | 110 | size * 2 > i915->dsm.usable_size) |
| 111 | 111 | return NULL; |
| 112 | 112 | |
| 113 | − obj = i915_gem_object_create_region_at(mem, phys_base, size, 0); | |
| 113 | + obj = i915_gem_object_create_region_at(mem, phys_base, size, | |
| 114 | + I915_BO_ALLOC_USER | | |
| 115 | + I915_BO_PREALLOC); | |
| 114 | 116 | if (IS_ERR(obj)) |
| 115 | 117 | return NULL; |
| 116 | 118 | |
| @@ -27,8 +27,15 @@ static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) · 26 unmodified lines | ||
| 27 | 27 | if (IS_DGFX(i915)) |
| 28 | 28 | return false; |
| 29 | 29 | |
| 30 | − return !(obj->cache_level == I915_CACHE_NONE || | |
| 31 | − obj->cache_level == I915_CACHE_WT); | |
| 30 | + /* | |
| 31 | + * For objects created by userspace through GEM_CREATE with pat_index | |
| 32 | + * set by set_pat extension, i915_gem_object_has_cache_level() will | |
| 33 | + * always return true, because the coherency of such object is managed | |
| 34 | + * by userspace. Othereise the call here would fall back to checking | |
| 35 | + * whether the object is un-cached or write-through. | |
| 36 | + */ | |
| 37 | + return !(i915_gem_object_has_cache_level(obj, I915_CACHE_NONE) || | |
| 38 | + i915_gem_object_has_cache_level(obj, I915_CACHE_WT)); | |
| 32 | 39 | } |
| 33 | 40 | |
| 34 | 41 | bool i915_gem_cpu_write_needs_clflush(struct drm_i915_gem_object *obj) |
| @@ -267,7 +274,13 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, · 232 unmodified lines | ||
| 267 | 274 | { |
| 268 | 275 | int ret; |
| 269 | 276 | |
| 270 | − if (obj->cache_level == cache_level) | |
| 277 | + /* | |
| 278 | + * For objects created by userspace through GEM_CREATE with pat_index | |
| 279 | + * set by set_pat extension, simply return 0 here without touching | |
| 280 | + * the cache setting, because such objects should have an immutable | |
| 281 | + * cache setting by desgin and always managed by userspace. | |
| 282 | + */ | |
| 283 | + if (i915_gem_object_has_cache_level(obj, cache_level)) | |
| 271 | 284 | return 0; |
| 272 | 285 | |
| 273 | 286 | ret = i915_gem_object_wait(obj, |
| @@ -278,10 +291,8 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, · 4 unmodified lines | ||
| 278 | 291 | return ret; |
| 279 | 292 | |
| 280 | 293 | /* Always invalidate stale cachelines */ |
| 281 | − if (obj->cache_level != cache_level) { | |
| 282 | − i915_gem_object_set_cache_coherency(obj, cache_level); | |
| 283 | − obj->cache_dirty = true; | |
| 284 | − } | |
| 294 | + i915_gem_object_set_cache_coherency(obj, cache_level); | |
| 295 | + obj->cache_dirty = true; | |
| 285 | 296 | |
| 286 | 297 | /* The cache-level will be applied when each vma is rebound. */ |
| 287 | 298 | return i915_gem_object_unbind(obj, |
| @@ -306,20 +317,22 @@ int i915_gem_get_caching_ioctl(struct drm_device *dev, void *data, · 18 unmodified lines | ||
| 306 | 317 | goto out; |
| 307 | 318 | } |
| 308 | 319 | |
| 309 | − switch (obj->cache_level) { | |
| 310 | − case I915_CACHE_LLC: | |
| 311 | − case I915_CACHE_L3_LLC: | |
| 312 | − args->caching = I915_CACHING_CACHED; | |
| 313 | − break; | |
| 320 | + /* | |
| 321 | + * This ioctl should be disabled for the objects with pat_index | |
| 322 | + * set by user space. | |
| 323 | + */ | |
| 324 | + if (obj->pat_set_by_user) { | |
| 325 | + err = -EOPNOTSUPP; | |
| 326 | + goto out; | |
| 327 | + } | |
| 314 | 328 | |
| 315 | − case I915_CACHE_WT: | |
| 329 | + if (i915_gem_object_has_cache_level(obj, I915_CACHE_LLC) || | |
| 330 | + i915_gem_object_has_cache_level(obj, I915_CACHE_L3_LLC)) | |
| 331 | + args->caching = I915_CACHING_CACHED; | |
| 332 | + else if (i915_gem_object_has_cache_level(obj, I915_CACHE_WT)) | |
| 316 | 333 | args->caching = I915_CACHING_DISPLAY; |
| 317 | − break; | |
| 318 | − | |
| 319 | − default: | |
| 334 | + else | |
| 320 | 335 | args->caching = I915_CACHING_NONE; |
| 321 | − break; | |
| 322 | − } | |
| 323 | 336 | out: |
| 324 | 337 | rcu_read_unlock(); |
| 325 | 338 | return err; |
| @@ -337,6 +350,9 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data, · 11 unmodified lines | ||
| 337 | 350 | if (IS_DGFX(i915)) |
| 338 | 351 | return -ENODEV; |
| 339 | 352 | |
| 353 | + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70)) | |
| 354 | + return -EOPNOTSUPP; | |
| 355 | + | |
| 340 | 356 | switch (args->caching) { |
| 341 | 357 | case I915_CACHING_NONE: |
| 342 | 358 | level = I915_CACHE_NONE; |
| @@ -364,6 +380,15 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data, · 21 unmodified lines | ||
| 364 | 380 | if (!obj) |
| 365 | 381 | return -ENOENT; |
| 366 | 382 | |
| 383 | + /* | |
| 384 | + * This ioctl should be disabled for the objects with pat_index | |
| 385 | + * set by user space. | |
| 386 | + */ | |
| 387 | + if (obj->pat_set_by_user) { | |
| 388 | + ret = -EOPNOTSUPP; | |
| 389 | + goto out; | |
| 390 | + } | |
| 391 | + | |
| 367 | 392 | /* |
| 368 | 393 | * The caching mode of proxy object is handled by its generator, and |
| 369 | 394 | * not allowed to be changed by userspace. |
| @@ -640,9 +640,15 @@ static inline int use_cpu_reloc(const struct reloc_cache *cache, · 639 unmodified lines | ||
| 640 | 640 | if (DBG_FORCE_RELOC == FORCE_GTT_RELOC) |
| 641 | 641 | return false; |
| 642 | 642 | |
| 643 | + /* | |
| 644 | + * For objects created by userspace through GEM_CREATE with pat_index | |
| 645 | + * set by set_pat extension, i915_gem_object_has_cache_level() always | |
| 646 | + * return true, otherwise the call would fall back to checking whether | |
| 647 | + * the object is un-cached. | |
| 648 | + */ | |
| 643 | 649 | return (cache->has_llc || |
| 644 | 650 | obj->cache_dirty || |
| 645 | − obj->cache_level != I915_CACHE_NONE); | |
| 651 | + !i915_gem_object_has_cache_level(obj, I915_CACHE_NONE)); | |
| 646 | 652 | } |
| 647 | 653 | |
| 648 | 654 | static int eb_reserve_vma(struct i915_execbuffer *eb, |
| @@ -1324,7 +1330,10 @@ static void *reloc_iomap(struct i915_vma *batch, · 675 unmodified lines | ||
| 1324 | 1330 | if (drm_mm_node_allocated(&cache->node)) { |
| 1325 | 1331 | ggtt->vm.insert_page(&ggtt->vm, |
| 1326 | 1332 | i915_gem_object_get_dma_address(obj, page), |
| 1327 | − offset, I915_CACHE_NONE, 0); | |
| 1333 | + offset, | |
| 1334 | + i915_gem_get_pat_index(ggtt->vm.i915, | |
| 1335 | + I915_CACHE_NONE), | |
| 1336 | + 0); | |
| 1328 | 1337 | } else { |
| 1329 | 1338 | offset += page << PAGE_SHIFT; |
| 1330 | 1339 | } |
| @@ -1464,7 +1473,7 @@ eb_relocate_entry(struct i915_execbuffer *eb, · 133 unmodified lines | ||
| 1464 | 1473 | reloc_cache_unmap(&eb->reloc_cache); |
| 1465 | 1474 | mutex_lock(&vma->vm->mutex); |
| 1466 | 1475 | err = i915_vma_bind(target->vma, |
| 1467 | − target->vma->obj->cache_level, | |
| 1476 | + target->vma->obj->pat_index, | |
| 1468 | 1477 | PIN_GLOBAL, NULL, NULL); |
| 1469 | 1478 | mutex_unlock(&vma->vm->mutex); |
| 1470 | 1479 | reloc_cache_remap(&eb->reloc_cache, ev->vma->obj); |
| @@ -383,7 +383,16 @@ retry: · 382 unmodified lines | ||
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | /* Access to snoopable pages through the GTT is incoherent. */ |
| 386 | − if (obj->cache_level != I915_CACHE_NONE && !HAS_LLC(i915)) { | |
| 386 | + /* | |
| 387 | + * For objects created by userspace through GEM_CREATE with pat_index | |
| 388 | + * set by set_pat extension, coherency is managed by userspace, make | |
| 389 | + * sure we don't fail handling the vm fault by calling | |
| 390 | + * i915_gem_object_has_cache_level() which always return true for such | |
| 391 | + * objects. Otherwise this helper function would fall back to checking | |
| 392 | + * whether the object is un-cached. | |
| 393 | + */ | |
| 394 | + if (!(i915_gem_object_has_cache_level(obj, I915_CACHE_NONE) || | |
| 395 | + HAS_LLC(i915))) { | |
| 387 | 396 | ret = -EFAULT; |
| 388 | 397 | goto err_unpin; |
| 389 | 398 | } |
| @@ -927,53 +936,15 @@ static struct file *mmap_singleton(struct drm_i915_private *i915) · 537 unmodified lines | ||
| 927 | 936 | return file; |
| 928 | 937 | } |
| 929 | 938 | |
| 930 | −/* | |
| 931 | − * This overcomes the limitation in drm_gem_mmap's assignment of a | |
| 932 | − * drm_gem_object as the vma->vm_private_data. Since we need to | |
| 933 | − * be able to resolve multiple mmap offsets which could be tied | |
| 934 | − * to a single gem object. | |
| 935 | − */ | |
| 936 | −int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |
| 939 | +static int | |
| 940 | +i915_gem_object_mmap(struct drm_i915_gem_object *obj, | |
| 941 | + struct i915_mmap_offset *mmo, | |
| 942 | + struct vm_area_struct *vma) | |
| 937 | 943 | { |
| 938 | − struct drm_vma_offset_node *node; | |
| 939 | − struct drm_file *priv = filp->private_data; | |
| 940 | − struct drm_device *dev = priv->minor->dev; | |
| 941 | − struct drm_i915_gem_object *obj = NULL; | |
| 942 | − struct i915_mmap_offset *mmo = NULL; | |
| 944 | + struct drm_i915_private *i915 = to_i915(obj->base.dev); | |
| 945 | + struct drm_device *dev = &i915->drm; | |
| 943 | 946 | struct file *anon; |
| 944 | 947 | |
| 945 | − if (drm_dev_is_unplugged(dev)) | |
| 946 | − return -ENODEV; | |
| 947 | − | |
| 948 | − rcu_read_lock(); | |
| 949 | − drm_vma_offset_lock_lookup(dev->vma_offset_manager); | |
| 950 | − node = drm_vma_offset_exact_lookup_locked(dev->vma_offset_manager, | |
| 951 | − vma->vm_pgoff, | |
| 952 | − vma_pages(vma)); | |
| 953 | − if (node && drm_vma_node_is_allowed(node, priv)) { | |
| 954 | − /* | |
| 955 | − * Skip 0-refcnted objects as it is in the process of being | |
| 956 | − * destroyed and will be invalid when the vma manager lock | |
| 957 | − * is released. | |
| 958 | − */ | |
| 959 | − if (!node->driver_private) { | |
| 960 | − mmo = container_of(node, struct i915_mmap_offset, vma_node); | |
| 961 | − obj = i915_gem_object_get_rcu(mmo->obj); | |
| 962 | − | |
| 963 | − GEM_BUG_ON(obj && obj->ops->mmap_ops); | |
| 964 | − } else { | |
| 965 | − obj = i915_gem_object_get_rcu | |
| 966 | − (container_of(node, struct drm_i915_gem_object, | |
| 967 | − base.vma_node)); | |
| 968 | − | |
| 969 | − GEM_BUG_ON(obj && !obj->ops->mmap_ops); | |
| 970 | − } | |
| 971 | − } | |
| 972 | − drm_vma_offset_unlock_lookup(dev->vma_offset_manager); | |
| 973 | − rcu_read_unlock(); | |
| 974 | − if (!obj) | |
| 975 | − return node ? -EACCES : -EINVAL; | |
| 976 | − | |
| 977 | 948 | if (i915_gem_object_is_readonly(obj)) { |
| 978 | 949 | if (vma->vm_flags & VM_WRITE) { |
| 979 | 950 | i915_gem_object_put(obj); |
| @@ -1005,7 +976,7 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) · 25 unmodified lines | ||
| 1005 | 976 | if (obj->ops->mmap_ops) { |
| 1006 | 977 | vma->vm_page_prot = pgprot_decrypted(vm_get_page_prot(vma->vm_flags)); |
| 1007 | 978 | vma->vm_ops = obj->ops->mmap_ops; |
| 1008 | − vma->vm_private_data = node->driver_private; | |
| 979 | + vma->vm_private_data = obj->base.vma_node.driver_private; | |
| 1009 | 980 | return 0; |
| 1010 | 981 | } |
| 1011 | 982 | |
| @@ -1043,6 +1014,91 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) · 31 unmodified lines | ||
| 1043 | 1014 | return 0; |
| 1044 | 1015 | } |
| 1045 | 1016 | |
| 1017 | +/* | |
| 1018 | + * This overcomes the limitation in drm_gem_mmap's assignment of a | |
| 1019 | + * drm_gem_object as the vma->vm_private_data. Since we need to | |
| 1020 | + * be able to resolve multiple mmap offsets which could be tied | |
| 1021 | + * to a single gem object. | |
| 1022 | + */ | |
| 1023 | +int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |
| 1024 | +{ | |
| 1025 | + struct drm_vma_offset_node *node; | |
| 1026 | + struct drm_file *priv = filp->private_data; | |
| 1027 | + struct drm_device *dev = priv->minor->dev; | |
| 1028 | + struct drm_i915_gem_object *obj = NULL; | |
| 1029 | + struct i915_mmap_offset *mmo = NULL; | |
| 1030 | + | |
| 1031 | + if (drm_dev_is_unplugged(dev)) | |
| 1032 | + return -ENODEV; | |
| 1033 | + | |
| 1034 | + rcu_read_lock(); | |
| 1035 | + drm_vma_offset_lock_lookup(dev->vma_offset_manager); | |
| 1036 | + node = drm_vma_offset_exact_lookup_locked(dev->vma_offset_manager, | |
| 1037 | + vma->vm_pgoff, | |
| 1038 | + vma_pages(vma)); | |
| 1039 | + if (node && drm_vma_node_is_allowed(node, priv)) { | |
| 1040 | + /* | |
| 1041 | + * Skip 0-refcnted objects as it is in the process of being | |
| 1042 | + * destroyed and will be invalid when the vma manager lock | |
| 1043 | + * is released. | |
| 1044 | + */ | |
| 1045 | + if (!node->driver_private) { | |
| 1046 | + mmo = container_of(node, struct i915_mmap_offset, vma_node); | |
| 1047 | + obj = i915_gem_object_get_rcu(mmo->obj); | |
| 1048 | + | |
| 1049 | + GEM_BUG_ON(obj && obj->ops->mmap_ops); | |
| 1050 | + } else { | |
| 1051 | + obj = i915_gem_object_get_rcu | |
| 1052 | + (container_of(node, struct drm_i915_gem_object, | |
| 1053 | + base.vma_node)); | |
| 1054 | + | |
| 1055 | + GEM_BUG_ON(obj && !obj->ops->mmap_ops); | |
| 1056 | + } | |
| 1057 | + } | |
| 1058 | + drm_vma_offset_unlock_lookup(dev->vma_offset_manager); | |
| 1059 | + rcu_read_unlock(); | |
| 1060 | + if (!obj) | |
| 1061 | + return node ? -EACCES : -EINVAL; | |
| 1062 | + | |
| 1063 | + return i915_gem_object_mmap(obj, mmo, vma); | |
| 1064 | +} | |
| 1065 | + | |
| 1066 | +int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma) | |
| 1067 | +{ | |
| 1068 | + struct drm_i915_private *i915 = to_i915(obj->base.dev); | |
| 1069 | + struct drm_device *dev = &i915->drm; | |
| 1070 | + struct i915_mmap_offset *mmo = NULL; | |
| 1071 | + enum i915_mmap_type mmap_type; | |
| 1072 | + struct i915_ggtt *ggtt = to_gt(i915)->ggtt; | |
| 1073 | + | |
| 1074 | + if (drm_dev_is_unplugged(dev)) | |
| 1075 | + return -ENODEV; | |
| 1076 | + | |
| 1077 | + /* handle ttm object */ | |
| 1078 | + if (obj->ops->mmap_ops) { | |
| 1079 | + /* | |
| 1080 | + * ttm fault handler, ttm_bo_vm_fault_reserved() uses fake offset | |
| 1081 | + * to calculate page offset so set that up. | |
| 1082 | + */ | |
| 1083 | + vma->vm_pgoff += drm_vma_node_start(&obj->base.vma_node); | |
| 1084 | + } else { | |
| 1085 | + /* handle stolen and smem objects */ | |
| 1086 | + mmap_type = i915_ggtt_has_aperture(ggtt) ? I915_MMAP_TYPE_GTT : I915_MMAP_TYPE_WC; | |
| 1087 | + mmo = mmap_offset_attach(obj, mmap_type, NULL); | |
| 1088 | + if (!mmo) | |
| 1089 | + return -ENODEV; | |
| 1090 | + } | |
| 1091 | + | |
| 1092 | + /* | |
| 1093 | + * When we install vm_ops for mmap we are too late for | |
| 1094 | + * the vm_ops->open() which increases the ref_count of | |
| 1095 | + * this obj and then it gets decreased by the vm_ops->close(). | |
| 1096 | + * To balance this increase the obj ref_count here. | |
| 1097 | + */ | |
| 1098 | + obj = i915_gem_object_get(obj); | |
| 1099 | + return i915_gem_object_mmap(obj, mmo, vma); | |
| 1100 | +} | |
| 1101 | + | |
| 1046 | 1102 | #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) |
| 1047 | 1103 | #include "selftests/i915_gem_mman.c" |
| 1048 | 1104 | #endif |
| @@ -29,5 +29,5 @@ void i915_gem_object_release_mmap_gtt(struct drm_i915_gem_object *obj); · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | void i915_gem_object_runtime_pm_release_mmap_offset(struct drm_i915_gem_object *obj); |
| 31 | 31 | void i915_gem_object_release_mmap_offset(struct drm_i915_gem_object *obj); |
| 32 | − | |
| 32 | +int i915_gem_fb_mmap(struct drm_i915_gem_object *obj, struct vm_area_struct *vma); | |
| 33 | 33 | #endif |
| @@ -45,6 +45,33 @@ static struct kmem_cache *slab_objects; · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | static const struct drm_gem_object_funcs i915_gem_object_funcs; |
| 47 | 47 | |
| 48 | +unsigned int i915_gem_get_pat_index(struct drm_i915_private *i915, | |
| 49 | + enum i915_cache_level level) | |
| 50 | +{ | |
| 51 | + if (drm_WARN_ON(&i915->drm, level >= I915_MAX_CACHE_LEVEL)) | |
| 52 | + return 0; | |
| 53 | + | |
| 54 | + return INTEL_INFO(i915)->cachelevel_to_pat[level]; | |
| 55 | +} | |
| 56 | + | |
| 57 | +bool i915_gem_object_has_cache_level(const struct drm_i915_gem_object *obj, | |
| 58 | + enum i915_cache_level lvl) | |
| 59 | +{ | |
| 60 | + /* | |
| 61 | + * In case the pat_index is set by user space, this kernel mode | |
| 62 | + * driver should leave the coherency to be managed by user space, | |
| 63 | + * simply return true here. | |
| 64 | + */ | |
| 65 | + if (obj->pat_set_by_user) | |
| 66 | + return true; | |
| 67 | + | |
| 68 | + /* | |
| 69 | + * Otherwise the pat_index should have been converted from cache_level | |
| 70 | + * so that the following comparison is valid. | |
| 71 | + */ | |
| 72 | + return obj->pat_index == i915_gem_get_pat_index(obj_to_i915(obj), lvl); | |
| 73 | +} | |
| 74 | + | |
| 48 | 75 | struct drm_i915_gem_object *i915_gem_object_alloc(void) |
| 49 | 76 | { |
| 50 | 77 | struct drm_i915_gem_object *obj; |
| @@ -124,7 +151,7 @@ void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj, · 73 unmodified lines | ||
| 124 | 151 | { |
| 125 | 152 | struct drm_i915_private *i915 = to_i915(obj->base.dev); |
| 126 | 153 | |
| 127 | − obj->cache_level = cache_level; | |
| 154 | + obj->pat_index = i915_gem_get_pat_index(i915, cache_level); | |
| 128 | 155 | |
| 129 | 156 | if (cache_level != I915_CACHE_NONE) |
| 130 | 157 | obj->cache_coherent = (I915_BO_CACHE_COHERENT_FOR_READ | |
| @@ -139,6 +166,37 @@ void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj, · 8 unmodified lines | ||
| 139 | 166 | !IS_DGFX(i915); |
| 140 | 167 | } |
| 141 | 168 | |
| 169 | +/** | |
| 170 | + * i915_gem_object_set_pat_index - set PAT index to be used in PTE encode | |
| 171 | + * @obj: #drm_i915_gem_object | |
| 172 | + * @pat_index: PAT index | |
| 173 | + * | |
| 174 | + * This is a clone of i915_gem_object_set_cache_coherency taking pat index | |
| 175 | + * instead of cache_level as its second argument. | |
| 176 | + */ | |
| 177 | +void i915_gem_object_set_pat_index(struct drm_i915_gem_object *obj, | |
| 178 | + unsigned int pat_index) | |
| 179 | +{ | |
| 180 | + struct drm_i915_private *i915 = to_i915(obj->base.dev); | |
| 181 | + | |
| 182 | + if (obj->pat_index == pat_index) | |
| 183 | + return; | |
| 184 | + | |
| 185 | + obj->pat_index = pat_index; | |
| 186 | + | |
| 187 | + if (pat_index != i915_gem_get_pat_index(i915, I915_CACHE_NONE)) | |
| 188 | + obj->cache_coherent = (I915_BO_CACHE_COHERENT_FOR_READ | | |
| 189 | + I915_BO_CACHE_COHERENT_FOR_WRITE); | |
| 190 | + else if (HAS_LLC(i915)) | |
| 191 | + obj->cache_coherent = I915_BO_CACHE_COHERENT_FOR_READ; | |
| 192 | + else | |
| 193 | + obj->cache_coherent = 0; | |
| 194 | + | |
| 195 | + obj->cache_dirty = | |
| 196 | + !(obj->cache_coherent & I915_BO_CACHE_COHERENT_FOR_WRITE) && | |
| 197 | + !IS_DGFX(i915); | |
| 198 | +} | |
| 199 | + | |
| 142 | 200 | bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj) |
| 143 | 201 | { |
| 144 | 202 | struct drm_i915_private *i915 = to_i915(obj->base.dev); |
| @@ -20,6 +20,8 @@ · 19 unmodified lines | ||
| 20 | 20 | |
| 21 | 21 | enum intel_region_id; |
| 22 | 22 | |
| 23 | +#define obj_to_i915(obj__) to_i915((obj__)->base.dev) | |
| 24 | + | |
| 23 | 25 | static inline bool i915_gem_object_size_2big(u64 size) |
| 24 | 26 | { |
| 25 | 27 | struct drm_i915_gem_object *obj; |
| @@ -30,6 +32,10 @@ static inline bool i915_gem_object_size_2big(u64 size) · 4 unmodified lines | ||
| 30 | 32 | return false; |
| 31 | 33 | } |
| 32 | 34 | |
| 35 | +unsigned int i915_gem_get_pat_index(struct drm_i915_private *i915, | |
| 36 | + enum i915_cache_level level); | |
| 37 | +bool i915_gem_object_has_cache_level(const struct drm_i915_gem_object *obj, | |
| 38 | + enum i915_cache_level lvl); | |
| 33 | 39 | void i915_gem_init__objects(struct drm_i915_private *i915); |
| 34 | 40 | |
| 35 | 41 | void i915_objects_module_exit(void); |
| @@ -80,7 +86,7 @@ __i915_gem_object_unset_pages(struct drm_i915_gem_object *obj); · 44 unmodified lines | ||
| 80 | 86 | |
| 81 | 87 | /** |
| 82 | 88 | * i915_gem_object_lookup_rcu - look up a temporary GEM object from its handle |
| 83 | − * @filp: DRM file private date | |
| 89 | + * @file: DRM file private date | |
| 84 | 90 | * @handle: userspace handle |
| 85 | 91 | * |
| 86 | 92 | * Returns: |
| @@ -760,6 +766,8 @@ bool i915_gem_object_has_unknown_state(struct drm_i915_gem_object *obj); · 673 unmodified lines | ||
| 760 | 766 | |
| 761 | 767 | void i915_gem_object_set_cache_coherency(struct drm_i915_gem_object *obj, |
| 762 | 768 | unsigned int cache_level); |
| 769 | +void i915_gem_object_set_pat_index(struct drm_i915_gem_object *obj, | |
| 770 | + unsigned int pat_index); | |
| 763 | 771 | bool i915_gem_object_can_bypass_llc(struct drm_i915_gem_object *obj); |
| 764 | 772 | void i915_gem_object_flush_if_display(struct drm_i915_gem_object *obj); |
| 765 | 773 | void i915_gem_object_flush_if_display_locked(struct drm_i915_gem_object *obj); |
| @@ -194,6 +194,13 @@ enum i915_cache_level { · 193 unmodified lines | ||
| 194 | 194 | * engine. |
| 195 | 195 | */ |
| 196 | 196 | I915_CACHE_WT, |
| 197 | + /** | |
| 198 | + * @I915_MAX_CACHE_LEVEL: | |
| 199 | + * | |
| 200 | + * Mark the last entry in the enum. Used for defining cachelevel_to_pat | |
| 201 | + * array for cache_level to pat translation table. | |
| 202 | + */ | |
| 203 | + I915_MAX_CACHE_LEVEL, | |
| 197 | 204 | }; |
| 198 | 205 | |
| 199 | 206 | enum i915_map_type { |
| @@ -328,6 +335,12 @@ struct drm_i915_gem_object { · 128 unmodified lines | ||
| 328 | 335 | */ |
| 329 | 336 | #define I915_BO_ALLOC_GPU_ONLY BIT(6) |
| 330 | 337 | #define I915_BO_ALLOC_CCS_AUX BIT(7) |
| 338 | +/* | |
| 339 | + * Object is allowed to retain its initial data and will not be cleared on first | |
| 340 | + * access if used along with I915_BO_ALLOC_USER. This is mainly to keep | |
| 341 | + * preallocated framebuffer data intact while transitioning it to i915drmfb. | |
| 342 | + */ | |
| 343 | +#define I915_BO_PREALLOC BIT(8) | |
| 331 | 344 | #define I915_BO_ALLOC_FLAGS (I915_BO_ALLOC_CONTIGUOUS | \ |
| 332 | 345 | I915_BO_ALLOC_VOLATILE | \ |
| 333 | 346 | I915_BO_ALLOC_CPU_CLEAR | \ |
| @@ -335,10 +348,11 @@ struct drm_i915_gem_object { · 1 unmodified line | ||
| 335 | 348 | I915_BO_ALLOC_PM_VOLATILE | \ |
| 336 | 349 | I915_BO_ALLOC_PM_EARLY | \ |
| 337 | 350 | I915_BO_ALLOC_GPU_ONLY | \ |
| 338 | − I915_BO_ALLOC_CCS_AUX) | |
| 339 | −#define I915_BO_READONLY BIT(8) | |
| 340 | −#define I915_TILING_QUIRK_BIT 9 /* unknown swizzling; do not release! */ | |
| 341 | −#define I915_BO_PROTECTED BIT(10) | |
| 351 | + I915_BO_ALLOC_CCS_AUX | \ | |
| 352 | + I915_BO_PREALLOC) | |
| 353 | +#define I915_BO_READONLY BIT(9) | |
| 354 | +#define I915_TILING_QUIRK_BIT 10 /* unknown swizzling; do not release! */ | |
| 355 | +#define I915_BO_PROTECTED BIT(11) | |
| 342 | 356 | /** |
| 343 | 357 | * @mem_flags - Mutable placement-related flags |
| 344 | 358 | * |
| @@ -350,15 +364,43 @@ struct drm_i915_gem_object { · 5 unmodified lines | ||
| 350 | 364 | #define I915_BO_FLAG_STRUCT_PAGE BIT(0) /* Object backed by struct pages */ |
| 351 | 365 | #define I915_BO_FLAG_IOMEM BIT(1) /* Object backed by IO memory */ |
| 352 | 366 | /** |
| 353 | − * @cache_level: The desired GTT caching level. | |
| 367 | + * @pat_index: The desired PAT index. | |
| 368 | + * | |
| 369 | + * See hardware specification for valid PAT indices for each platform. | |
| 370 | + * This field replaces the @cache_level that contains a value of enum | |
| 371 | + * i915_cache_level since PAT indices are being used by both userspace | |
| 372 | + * and kernel mode driver for caching policy control after GEN12. | |
| 373 | + * In the meantime platform specific tables are created to translate | |
| 374 | + * i915_cache_level into pat index, for more details check the macros | |
| 375 | + * defined i915/i915_pci.c, e.g. PVC_CACHELEVEL. | |
| 376 | + * For backward compatibility, this field contains values exactly match | |
| 377 | + * the entries of enum i915_cache_level for pre-GEN12 platforms (See | |
| 378 | + * LEGACY_CACHELEVEL), so that the PTE encode functions for these | |
| 379 | + * legacy platforms can stay the same. | |
| 380 | + */ | |
| 381 | + unsigned int pat_index:6; | |
| 382 | + /** | |
| 383 | + * @pat_set_by_user: Indicate whether pat_index is set by user space | |
| 354 | 384 | * |
| 355 | − * See enum i915_cache_level for possible values, along with what | |
| 356 | − * each does. | |
| 385 | + * This field is set to false by default, only set to true if the | |
| 386 | + * pat_index is set by user space. By design, user space is capable of | |
| 387 | + * managing caching behavior by setting pat_index, in which case this | |
| 388 | + * kernel mode driver should never touch the pat_index. | |
| 357 | 389 | */ |
| 358 | − unsigned int cache_level:3; | |
| 390 | + unsigned int pat_set_by_user:1; | |
| 359 | 391 | /** |
| 360 | 392 | * @cache_coherent: |
| 361 | 393 | * |
| 394 | + * Note: with the change above which replaced @cache_level with pat_index, | |
| 395 | + * the use of @cache_coherent is limited to the objects created by kernel | |
| 396 | + * or by userspace without pat index specified. | |
| 397 | + * Check for @pat_set_by_user to find out if an object has pat index set | |
| 398 | + * by userspace. The ioctl's to change cache settings have also been | |
| 399 | + * disabled for the objects with pat index set by userspace. Please don't | |
| 400 | + * assume @cache_coherent having the flags set as describe here. A helper | |
| 401 | + * function i915_gem_object_has_cache_level() provides one way to bypass | |
| 402 | + * the use of this field. | |
| 403 | + * | |
| 362 | 404 | * Track whether the pages are coherent with the GPU if reading or |
| 363 | 405 | * writing through the CPU caches. The largely depends on the |
| 364 | 406 | * @cache_level setting. |
| @@ -432,6 +474,16 @@ struct drm_i915_gem_object { · 67 unmodified lines | ||
| 432 | 474 | /** |
| 433 | 475 | * @cache_dirty: |
| 434 | 476 | * |
| 477 | + * Note: with the change above which replaced cache_level with pat_index, | |
| 478 | + * the use of @cache_dirty is limited to the objects created by kernel | |
| 479 | + * or by userspace without pat index specified. | |
| 480 | + * Check for @pat_set_by_user to find out if an object has pat index set | |
| 481 | + * by userspace. The ioctl's to change cache settings have also been | |
| 482 | + * disabled for the objects with pat_index set by userspace. Please don't | |
| 483 | + * assume @cache_dirty is set as describe here. Also see helper function | |
| 484 | + * i915_gem_object_has_cache_level() for possible ways to bypass the use | |
| 485 | + * of this field. | |
| 486 | + * | |
| 435 | 487 | * Track if we are we dirty with writes through the CPU cache for this |
| 436 | 488 | * object. As a result reading directly from main memory might yield |
| 437 | 489 | * stale data. |
| @@ -469,7 +469,10 @@ enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915, · 468 unmodified lines | ||
| 469 | 469 | struct drm_i915_gem_object *obj, |
| 470 | 470 | bool always_coherent) |
| 471 | 471 | { |
| 472 | − if (i915_gem_object_is_lmem(obj)) | |
| 472 | + /* | |
| 473 | + * Wa_22016122933: always return I915_MAP_WC for MTL | |
| 474 | + */ | |
| 475 | + if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915)) | |
| 473 | 476 | return I915_MAP_WC; |
| 474 | 477 | if (HAS_LLC(i915) || always_coherent) |
| 475 | 478 | return I915_MAP_WB; |
| @@ -22,9 +22,7 @@ struct i915_gem_apply_to_region; · 21 unmodified lines | ||
| 22 | 22 | */ |
| 23 | 23 | struct i915_gem_apply_to_region_ops { |
| 24 | 24 | /** |
| 25 | − * process_obj - Process the current object | |
| 26 | − * @apply: Embed this for private data. | |
| 27 | − * @obj: The current object. | |
| 25 | + * @process_obj: Process the current object | |
| 28 | 26 | * |
| 29 | 27 | * Note that if this function is part of a ww transaction, and |
| 30 | 28 | * if returns -EDEADLK for one of the objects, it may be |
| @@ -601,7 +601,14 @@ static int shmem_object_init(struct intel_memory_region *mem, · 600 unmodified lines | ||
| 601 | 601 | obj->write_domain = I915_GEM_DOMAIN_CPU; |
| 602 | 602 | obj->read_domains = I915_GEM_DOMAIN_CPU; |
| 603 | 603 | |
| 604 | − if (HAS_LLC(i915)) | |
| 604 | + /* | |
| 605 | + * MTL doesn't snoop CPU cache by default for GPU access (namely | |
| 606 | + * 1-way coherency). However some UMD's are currently depending on | |
| 607 | + * that. Make 1-way coherent the default setting for MTL. A follow | |
| 608 | + * up patch will extend the GEM_CREATE uAPI to allow UMD's specify | |
| 609 | + * caching mode at BO creation time | |
| 610 | + */ | |
| 611 | + if (HAS_LLC(i915) || (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70))) | |
| 605 | 612 | /* On some devices, we can have the GPU use the LLC (the CPU |
| 606 | 613 | * cache) for about a 10% performance improvement |
| 607 | 614 | * compared to uncached. Graphics requests other than |
| @@ -460,8 +460,6 @@ void i915_gem_shrinker_taints_mutex(struct drm_i915_private *i915, · 459 unmodified lines | ||
| 460 | 460 | fs_reclaim_release(GFP_KERNEL); |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | −#define obj_to_i915(obj__) to_i915((obj__)->base.dev) | |
| 464 | − | |
| 465 | 463 | /** |
| 466 | 464 | * i915_gem_object_make_unshrinkable - Hide the object from the shrinker. By |
| 467 | 465 | * default all object types that support shrinking(see IS_SHRINKABLE), will also |
| @@ -535,6 +535,14 @@ static int i915_gem_init_stolen(struct intel_memory_region *mem) · 534 unmodified lines | ||
| 535 | 535 | /* Basic memrange allocator for stolen space. */ |
| 536 | 536 | drm_mm_init(&i915->mm.stolen, 0, i915->dsm.usable_size); |
| 537 | 537 | |
| 538 | + /* | |
| 539 | + * Access to stolen lmem beyond certain size for MTL A0 stepping | |
| 540 | + * would crash the machine. Disable stolen lmem for userspace access | |
| 541 | + * by setting usable_size to zero. | |
| 542 | + */ | |
| 543 | + if (IS_METEORLAKE(i915) && INTEL_REVID(i915) == 0x0) | |
| 544 | + i915->dsm.usable_size = 0; | |
| 545 | + | |
| 538 | 546 | return 0; |
| 539 | 547 | } |
| 540 | 548 | |
| @@ -557,7 +565,9 @@ static void dbg_poison(struct i915_ggtt *ggtt, · 16 unmodified lines | ||
| 557 | 565 | |
| 558 | 566 | ggtt->vm.insert_page(&ggtt->vm, addr, |
| 559 | 567 | ggtt->error_capture.start, |
| 560 | − I915_CACHE_NONE, 0); | |
| 568 | + i915_gem_get_pat_index(ggtt->vm.i915, | |
| 569 | + I915_CACHE_NONE), | |
| 570 | + 0); | |
| 561 | 571 | mb(); |
| 562 | 572 | |
| 563 | 573 | s = io_mapping_map_wc(&ggtt->iomap, |
| @@ -42,8 +42,9 @@ static inline bool i915_ttm_is_ghost_object(struct ttm_buffer_object *bo) · 41 unmodified lines | ||
| 42 | 42 | /** |
| 43 | 43 | * i915_ttm_to_gem - Convert a struct ttm_buffer_object to an embedding |
| 44 | 44 | * struct drm_i915_gem_object. |
| 45 | + * @bo: Pointer to the ttm buffer object | |
| 45 | 46 | * |
| 46 | − * Return: Pointer to the embedding struct ttm_buffer_object. | |
| 47 | + * Return: Pointer to the embedding struct drm_i915_gem_object. | |
| 47 | 48 | */ |
| 48 | 49 | static inline struct drm_i915_gem_object * |
| 49 | 50 | i915_ttm_to_gem(struct ttm_buffer_object *bo) |
| @@ -214,7 +214,8 @@ static struct dma_fence *i915_ttm_accel_move(struct ttm_buffer_object *bo, · 213 unmodified lines | ||
| 214 | 214 | |
| 215 | 215 | intel_engine_pm_get(to_gt(i915)->migrate.context->engine); |
| 216 | 216 | ret = intel_context_migrate_clear(to_gt(i915)->migrate.context, deps, |
| 217 | − dst_st->sgl, dst_level, | |
| 217 | + dst_st->sgl, | |
| 218 | + i915_gem_get_pat_index(i915, dst_level), | |
| 218 | 219 | i915_ttm_gtt_binds_lmem(dst_mem), |
| 219 | 220 | 0, &rq); |
| 220 | 221 | } else { |
| @@ -228,9 +229,10 @@ static struct dma_fence *i915_ttm_accel_move(struct ttm_buffer_object *bo, · 7 unmodified lines | ||
| 228 | 229 | intel_engine_pm_get(to_gt(i915)->migrate.context->engine); |
| 229 | 230 | ret = intel_context_migrate_copy(to_gt(i915)->migrate.context, |
| 230 | 231 | deps, src_rsgt->table.sgl, |
| 231 | − src_level, | |
| 232 | + i915_gem_get_pat_index(i915, src_level), | |
| 232 | 233 | i915_ttm_gtt_binds_lmem(bo->resource), |
| 233 | − dst_st->sgl, dst_level, | |
| 234 | + dst_st->sgl, | |
| 235 | + i915_gem_get_pat_index(i915, dst_level), | |
| 234 | 236 | i915_ttm_gtt_binds_lmem(dst_mem), |
| 235 | 237 | &rq); |
| 236 | 238 | |
| @@ -576,7 +578,7 @@ int i915_ttm_move(struct ttm_buffer_object *bo, bool evict, · 339 unmodified lines | ||
| 576 | 578 | struct dma_fence *migration_fence = NULL; |
| 577 | 579 | struct ttm_tt *ttm = bo->ttm; |
| 578 | 580 | struct i915_refct_sgt *dst_rsgt; |
| 579 | − bool clear; | |
| 581 | + bool clear, prealloc_bo; | |
| 580 | 582 | int ret; |
| 581 | 583 | |
| 582 | 584 | if (GEM_WARN_ON(i915_ttm_is_ghost_object(bo))) { |
| @@ -632,7 +634,8 @@ int i915_ttm_move(struct ttm_buffer_object *bo, bool evict, · 49 unmodified lines | ||
| 632 | 634 | return PTR_ERR(dst_rsgt); |
| 633 | 635 | |
| 634 | 636 | clear = !i915_ttm_cpu_maps_iomem(bo->resource) && (!ttm || !ttm_tt_is_populated(ttm)); |
| 635 | − if (!(clear && ttm && !(ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC))) { | |
| 637 | + prealloc_bo = obj->flags & I915_BO_PREALLOC; | |
| 638 | + if (!(clear && ttm && !((ttm->page_flags & TTM_TT_FLAG_ZERO_ALLOC) && !prealloc_bo))) { | |
| 636 | 639 | struct i915_deps deps; |
| 637 | 640 | |
| 638 | 641 | i915_deps_init(&deps, GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN); |
| @@ -354,7 +354,7 @@ fake_huge_pages_object(struct drm_i915_private *i915, u64 size, bool single) · 353 unmodified lines | ||
| 354 | 354 | |
| 355 | 355 | obj->write_domain = I915_GEM_DOMAIN_CPU; |
| 356 | 356 | obj->read_domains = I915_GEM_DOMAIN_CPU; |
| 357 | − obj->cache_level = I915_CACHE_NONE; | |
| 357 | + obj->pat_index = i915_gem_get_pat_index(i915, I915_CACHE_NONE); | |
| 358 | 358 | |
| 359 | 359 | return obj; |
| 360 | 360 | } |
| @@ -695,8 +695,7 @@ out_put: · 334 unmodified lines | ||
| 695 | 695 | return err; |
| 696 | 696 | } |
| 697 | 697 | |
| 698 | −static void close_object_list(struct list_head *objects, | |
| 699 | − struct i915_ppgtt *ppgtt) | |
| 698 | +static void close_object_list(struct list_head *objects) | |
| 700 | 699 | { |
| 701 | 700 | struct drm_i915_gem_object *obj, *on; |
| 702 | 701 | |
| @@ -710,17 +709,36 @@ static void close_object_list(struct list_head *objects, · 7 unmodified lines | ||
| 710 | 709 | } |
| 711 | 710 | } |
| 712 | 711 | |
| 713 | −static int igt_mock_ppgtt_huge_fill(void *arg) | |
| 712 | +static int igt_ppgtt_huge_fill(void *arg) | |
| 714 | 713 | { |
| 715 | − struct i915_ppgtt *ppgtt = arg; | |
| 716 | − struct drm_i915_private *i915 = ppgtt->vm.i915; | |
| 717 | − unsigned long max_pages = ppgtt->vm.total >> PAGE_SHIFT; | |
| 714 | + struct drm_i915_private *i915 = arg; | |
| 715 | + unsigned int supported = RUNTIME_INFO(i915)->page_sizes; | |
| 716 | + bool has_pte64 = GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50); | |
| 717 | + struct i915_address_space *vm; | |
| 718 | + struct i915_gem_context *ctx; | |
| 719 | + unsigned long max_pages; | |
| 718 | 720 | unsigned long page_num; |
| 721 | + struct file *file; | |
| 719 | 722 | bool single = false; |
| 720 | 723 | LIST_HEAD(objects); |
| 721 | 724 | IGT_TIMEOUT(end_time); |
| 722 | 725 | int err = -ENODEV; |
| 723 | 726 | |
| 727 | + if (supported == I915_GTT_PAGE_SIZE_4K) | |
| 728 | + return 0; | |
| 729 | + | |
| 730 | + file = mock_file(i915); | |
| 731 | + if (IS_ERR(file)) | |
| 732 | + return PTR_ERR(file); | |
| 733 | + | |
| 734 | + ctx = hugepage_ctx(i915, file); | |
| 735 | + if (IS_ERR(ctx)) { | |
| 736 | + err = PTR_ERR(ctx); | |
| 737 | + goto out; | |
| 738 | + } | |
| 739 | + vm = i915_gem_context_get_eb_vm(ctx); | |
| 740 | + max_pages = vm->total >> PAGE_SHIFT; | |
| 741 | + | |
| 724 | 742 | for_each_prime_number_from(page_num, 1, max_pages) { |
| 725 | 743 | struct drm_i915_gem_object *obj; |
| 726 | 744 | u64 size = page_num << PAGE_SHIFT; |
| @@ -750,13 +768,14 @@ static int igt_mock_ppgtt_huge_fill(void *arg) · 23 unmodified lines | ||
| 750 | 768 | |
| 751 | 769 | list_add(&obj->st_link, &objects); |
| 752 | 770 | |
| 753 | − vma = i915_vma_instance(obj, &ppgtt->vm, NULL); | |
| 771 | + vma = i915_vma_instance(obj, vm, NULL); | |
| 754 | 772 | if (IS_ERR(vma)) { |
| 755 | 773 | err = PTR_ERR(vma); |
| 756 | 774 | break; |
| 757 | 775 | } |
| 758 | 776 | |
| 759 | − err = i915_vma_pin(vma, 0, 0, PIN_USER); | |
| 777 | + /* vma start must be aligned to BIT(21) to allow 2M PTEs */ | |
| 778 | + err = i915_vma_pin(vma, 0, BIT(21), PIN_USER); | |
| 760 | 779 | if (err) |
| 761 | 780 | break; |
| 762 | 781 | |
| @@ -784,12 +803,13 @@ static int igt_mock_ppgtt_huge_fill(void *arg) · 21 unmodified lines | ||
| 784 | 803 | GEM_BUG_ON(!expected_gtt); |
| 785 | 804 | GEM_BUG_ON(size); |
| 786 | 805 | |
| 787 | − if (expected_gtt & I915_GTT_PAGE_SIZE_4K) | |
| 806 | + if (!has_pte64 && (obj->base.size < I915_GTT_PAGE_SIZE_2M || | |
| 807 | + expected_gtt & I915_GTT_PAGE_SIZE_2M)) | |
| 788 | 808 | expected_gtt &= ~I915_GTT_PAGE_SIZE_64K; |
| 789 | 809 | |
| 790 | 810 | i915_vma_unpin(vma); |
| 791 | 811 | |
| 792 | − if (vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) { | |
| 812 | + if (!has_pte64 && vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) { | |
| 793 | 813 | if (!IS_ALIGNED(vma->node.start, |
| 794 | 814 | I915_GTT_PAGE_SIZE_2M)) { |
| 795 | 815 | pr_err("node.start(%llx) not aligned to 2M\n", |
| @@ -808,7 +828,7 @@ static int igt_mock_ppgtt_huge_fill(void *arg) · 12 unmodified lines | ||
| 808 | 828 | } |
| 809 | 829 | |
| 810 | 830 | if (vma->resource->page_sizes_gtt != expected_gtt) { |
| 811 | − pr_err("gtt=%u, expected=%u, size=%zd, single=%s\n", | |
| 831 | + pr_err("gtt=%#x, expected=%#x, size=0x%zx, single=%s\n", | |
| 812 | 832 | vma->resource->page_sizes_gtt, expected_gtt, |
| 813 | 833 | obj->base.size, str_yes_no(!!single)); |
| 814 | 834 | err = -EINVAL; |
| @@ -823,19 +843,25 @@ static int igt_mock_ppgtt_huge_fill(void *arg) · 8 unmodified lines | ||
| 823 | 843 | single = !single; |
| 824 | 844 | } |
| 825 | 845 | |
| 826 | − close_object_list(&objects, ppgtt); | |
| 846 | + close_object_list(&objects); | |
| 827 | 847 | |
| 828 | 848 | if (err == -ENOMEM || err == -ENOSPC) |
| 829 | 849 | err = 0; |
| 830 | 850 | |
| 851 | + i915_vm_put(vm); | |
| 852 | +out: | |
| 853 | + fput(file); | |
| 831 | 854 | return err; |
| 832 | 855 | } |
| 833 | 856 | |
| 834 | −static int igt_mock_ppgtt_64K(void *arg) | |
| 857 | +static int igt_ppgtt_64K(void *arg) | |
| 835 | 858 | { |
| 836 | − struct i915_ppgtt *ppgtt = arg; | |
| 837 | − struct drm_i915_private *i915 = ppgtt->vm.i915; | |
| 859 | + struct drm_i915_private *i915 = arg; | |
| 860 | + bool has_pte64 = GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50); | |
| 838 | 861 | struct drm_i915_gem_object *obj; |
| 862 | + struct i915_address_space *vm; | |
| 863 | + struct i915_gem_context *ctx; | |
| 864 | + struct file *file; | |
| 839 | 865 | const struct object_info { |
| 840 | 866 | unsigned int size; |
| 841 | 867 | unsigned int gtt; |
| @@ -907,16 +933,41 @@ static int igt_mock_ppgtt_64K(void *arg) · 65 unmodified lines | ||
| 907 | 933 | if (!HAS_PAGE_SIZES(i915, I915_GTT_PAGE_SIZE_64K)) |
| 908 | 934 | return 0; |
| 909 | 935 | |
| 936 | + file = mock_file(i915); | |
| 937 | + if (IS_ERR(file)) | |
| 938 | + return PTR_ERR(file); | |
| 939 | + | |
| 940 | + ctx = hugepage_ctx(i915, file); | |
| 941 | + if (IS_ERR(ctx)) { | |
| 942 | + err = PTR_ERR(ctx); | |
| 943 | + goto out; | |
| 944 | + } | |
| 945 | + vm = i915_gem_context_get_eb_vm(ctx); | |
| 946 | + | |
| 910 | 947 | for (i = 0; i < ARRAY_SIZE(objects); ++i) { |
| 911 | 948 | unsigned int size = objects[i].size; |
| 912 | 949 | unsigned int expected_gtt = objects[i].gtt; |
| 913 | 950 | unsigned int offset = objects[i].offset; |
| 914 | 951 | unsigned int flags = PIN_USER; |
| 915 | 952 | |
| 953 | + /* | |
| 954 | + * For modern GTT models, the requirements for marking a page-table | |
| 955 | + * as 64K have been relaxed. Account for this. | |
| 956 | + */ | |
| 957 | + if (has_pte64) { | |
| 958 | + expected_gtt = 0; | |
| 959 | + if (size >= SZ_64K) | |
| 960 | + expected_gtt |= I915_GTT_PAGE_SIZE_64K; | |
| 961 | + if (size & (SZ_64K - 1)) | |
| 962 | + expected_gtt |= I915_GTT_PAGE_SIZE_4K; | |
| 963 | + } | |
| 964 | + | |
| 916 | 965 | for (single = 0; single <= 1; single++) { |
| 917 | 966 | obj = fake_huge_pages_object(i915, size, !!single); |
| 918 | − if (IS_ERR(obj)) | |
| 919 | − return PTR_ERR(obj); | |
| 967 | + if (IS_ERR(obj)) { | |
| 968 | + err = PTR_ERR(obj); | |
| 969 | + goto out_vm; | |
| 970 | + } | |
| 920 | 971 | |
| 921 | 972 | err = i915_gem_object_pin_pages_unlocked(obj); |
| 922 | 973 | if (err) |
| @@ -928,7 +979,7 @@ static int igt_mock_ppgtt_64K(void *arg) · 5 unmodified lines | ||
| 928 | 979 | */ |
| 929 | 980 | obj->mm.page_sizes.sg &= ~I915_GTT_PAGE_SIZE_2M; |
| 930 | 981 | |
| 931 | − vma = i915_vma_instance(obj, &ppgtt->vm, NULL); | |
| 982 | + vma = i915_vma_instance(obj, vm, NULL); | |
| 932 | 983 | if (IS_ERR(vma)) { |
| 933 | 984 | err = PTR_ERR(vma); |
| 934 | 985 | goto out_object_unpin; |
| @@ -945,7 +996,8 @@ static int igt_mock_ppgtt_64K(void *arg) · 10 unmodified lines | ||
| 945 | 996 | if (err) |
| 946 | 997 | goto out_vma_unpin; |
| 947 | 998 | |
| 948 | − if (!offset && vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) { | |
| 999 | + if (!has_pte64 && !offset && | |
| 1000 | + vma->page_sizes.sg & I915_GTT_PAGE_SIZE_64K) { | |
| 949 | 1001 | if (!IS_ALIGNED(vma->node.start, |
| 950 | 1002 | I915_GTT_PAGE_SIZE_2M)) { |
| 951 | 1003 | pr_err("node.start(%llx) not aligned to 2M\n", |
| @@ -964,9 +1016,10 @@ static int igt_mock_ppgtt_64K(void *arg) · 12 unmodified lines | ||
| 964 | 1016 | } |
| 965 | 1017 | |
| 966 | 1018 | if (vma->resource->page_sizes_gtt != expected_gtt) { |
| 967 | − pr_err("gtt=%u, expected=%u, i=%d, single=%s\n", | |
| 1019 | + pr_err("gtt=%#x, expected=%#x, i=%d, single=%s offset=%#x size=%#x\n", | |
| 968 | 1020 | vma->resource->page_sizes_gtt, |
| 969 | − expected_gtt, i, str_yes_no(!!single)); | |
| 1021 | + expected_gtt, i, str_yes_no(!!single), | |
| 1022 | + offset, size); | |
| 970 | 1023 | err = -EINVAL; |
| 971 | 1024 | goto out_vma_unpin; |
| 972 | 1025 | } |
| @@ -982,7 +1035,7 @@ static int igt_mock_ppgtt_64K(void *arg) · 9 unmodified lines | ||
| 982 | 1035 | } |
| 983 | 1036 | } |
| 984 | 1037 | |
| 985 | − return 0; | |
| 1038 | + goto out_vm; | |
| 986 | 1039 | |
| 987 | 1040 | out_vma_unpin: |
| 988 | 1041 | i915_vma_unpin(vma); |
| @@ -992,7 +1045,10 @@ out_object_unpin: · 3 unmodified lines | ||
| 992 | 1045 | i915_gem_object_unlock(obj); |
| 993 | 1046 | out_object_put: |
| 994 | 1047 | i915_gem_object_put(obj); |
| 995 | − | |
| 1048 | +out_vm: | |
| 1049 | + i915_vm_put(vm); | |
| 1050 | +out: | |
| 1051 | + fput(file); | |
| 996 | 1052 | return err; |
| 997 | 1053 | } |
| 998 | 1054 | |
| @@ -1910,8 +1966,6 @@ int i915_gem_huge_page_mock_selftests(void) · 911 unmodified lines | ||
| 1910 | 1966 | SUBTEST(igt_mock_exhaust_device_supported_pages), |
| 1911 | 1967 | SUBTEST(igt_mock_memory_region_huge_pages), |
| 1912 | 1968 | SUBTEST(igt_mock_ppgtt_misaligned_dma), |
| 1913 | − SUBTEST(igt_mock_ppgtt_huge_fill), | |
| 1914 | − SUBTEST(igt_mock_ppgtt_64K), | |
| 1915 | 1969 | }; |
| 1916 | 1970 | struct drm_i915_private *dev_priv; |
| 1917 | 1971 | struct i915_ppgtt *ppgtt; |
| @@ -1962,6 +2016,8 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915) · 44 unmodified lines | ||
| 1962 | 2016 | SUBTEST(igt_ppgtt_sanity_check), |
| 1963 | 2017 | SUBTEST(igt_ppgtt_compact), |
| 1964 | 2018 | SUBTEST(igt_ppgtt_mixed), |
| 2019 | + SUBTEST(igt_ppgtt_huge_fill), | |
| 2020 | + SUBTEST(igt_ppgtt_64K), | |
| 1965 | 2021 | }; |
| 1966 | 2022 | |
| 1967 | 2023 | if (!HAS_PPGTT(i915)) { |
| @@ -66,7 +66,7 @@ static int live_nop_switch(void *arg) · 65 unmodified lines | ||
| 66 | 66 | ctx[n] = live_context(i915, file); |
| 67 | 67 | if (IS_ERR(ctx[n])) { |
| 68 | 68 | err = PTR_ERR(ctx[n]); |
| 69 | − goto out_file; | |
| 69 | + goto out_ctx; | |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| @@ -82,7 +82,7 @@ static int live_nop_switch(void *arg) · 9 unmodified lines | ||
| 82 | 82 | this = igt_request_alloc(ctx[n], engine); |
| 83 | 83 | if (IS_ERR(this)) { |
| 84 | 84 | err = PTR_ERR(this); |
| 85 | − goto out_file; | |
| 85 | + goto out_ctx; | |
| 86 | 86 | } |
| 87 | 87 | if (rq) { |
| 88 | 88 | i915_request_await_dma_fence(this, &rq->fence); |
| @@ -93,10 +93,10 @@ static int live_nop_switch(void *arg) · 4 unmodified lines | ||
| 93 | 93 | } |
| 94 | 94 | if (i915_request_wait(rq, 0, 10 * HZ) < 0) { |
| 95 | 95 | pr_err("Failed to populated %d contexts\n", nctx); |
| 96 | − intel_gt_set_wedged(to_gt(i915)); | |
| 96 | + intel_gt_set_wedged(engine->gt); | |
| 97 | 97 | i915_request_put(rq); |
| 98 | 98 | err = -EIO; |
| 99 | − goto out_file; | |
| 99 | + goto out_ctx; | |
| 100 | 100 | } |
| 101 | 101 | i915_request_put(rq); |
| 102 | 102 | |
| @@ -107,7 +107,7 @@ static int live_nop_switch(void *arg) · 4 unmodified lines | ||
| 107 | 107 | |
| 108 | 108 | err = igt_live_test_begin(&t, i915, __func__, engine->name); |
| 109 | 109 | if (err) |
| 110 | − goto out_file; | |
| 110 | + goto out_ctx; | |
| 111 | 111 | |
| 112 | 112 | end_time = jiffies + i915_selftest.timeout_jiffies; |
| 113 | 113 | for_each_prime_number_from(prime, 2, 8192) { |
| @@ -120,7 +120,7 @@ static int live_nop_switch(void *arg) · 6 unmodified lines | ||
| 120 | 120 | this = igt_request_alloc(ctx[n % nctx], engine); |
| 121 | 121 | if (IS_ERR(this)) { |
| 122 | 122 | err = PTR_ERR(this); |
| 123 | − goto out_file; | |
| 123 | + goto out_ctx; | |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (rq) { /* Force submission order */ |
| @@ -149,7 +149,7 @@ static int live_nop_switch(void *arg) · 22 unmodified lines | ||
| 149 | 149 | if (i915_request_wait(rq, 0, HZ / 5) < 0) { |
| 150 | 150 | pr_err("Switching between %ld contexts timed out\n", |
| 151 | 151 | prime); |
| 152 | − intel_gt_set_wedged(to_gt(i915)); | |
| 152 | + intel_gt_set_wedged(engine->gt); | |
| 153 | 153 | i915_request_put(rq); |
| 154 | 154 | break; |
| 155 | 155 | } |
| @@ -165,7 +165,7 @@ static int live_nop_switch(void *arg) · 9 unmodified lines | ||
| 165 | 165 | |
| 166 | 166 | err = igt_live_test_end(&t); |
| 167 | 167 | if (err) |
| 168 | − goto out_file; | |
| 168 | + goto out_ctx; | |
| 169 | 169 | |
| 170 | 170 | pr_info("Switch latencies on %s: 1 = %lluns, %lu = %lluns\n", |
| 171 | 171 | engine->name, |
| @@ -173,6 +173,8 @@ static int live_nop_switch(void *arg) · 1 unmodified line | ||
| 173 | 173 | prime - 1, div64_u64(ktime_to_ns(times[1]), prime - 1)); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | +out_ctx: | |
| 177 | + kfree(ctx); | |
| 176 | 178 | out_file: |
| 177 | 179 | fput(file); |
| 178 | 180 | return err; |
| @@ -219,7 +219,7 @@ static int __igt_lmem_pages_migrate(struct intel_gt *gt, · 218 unmodified lines | ||
| 219 | 219 | continue; |
| 220 | 220 | |
| 221 | 221 | err = intel_migrate_clear(>->migrate, &ww, deps, |
| 222 | − obj->mm.pages->sgl, obj->cache_level, | |
| 222 | + obj->mm.pages->sgl, obj->pat_index, | |
| 223 | 223 | i915_gem_object_is_lmem(obj), |
| 224 | 224 | 0xdeadbeaf, &rq); |
| 225 | 225 | if (rq) { |
| @@ -1222,7 +1222,7 @@ static int __igt_mmap_migrate(struct intel_memory_region **placements, · 1221 unmodified lines | ||
| 1222 | 1222 | } |
| 1223 | 1223 | |
| 1224 | 1224 | err = intel_context_migrate_clear(to_gt(i915)->migrate.context, NULL, |
| 1225 | − obj->mm.pages->sgl, obj->cache_level, | |
| 1225 | + obj->mm.pages->sgl, obj->pat_index, | |
| 1226 | 1226 | i915_gem_object_is_lmem(obj), |
| 1227 | 1227 | expand32(POISON_INUSE), &rq); |
| 1228 | 1228 | i915_gem_object_unpin_pages(obj); |
| @@ -109,7 +109,7 @@ static void gen6_ppgtt_clear_range(struct i915_address_space *vm, · 108 unmodified lines | ||
| 109 | 109 | |
| 110 | 110 | static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, |
| 111 | 111 | struct i915_vma_resource *vma_res, |
| 112 | − enum i915_cache_level cache_level, | |
| 112 | + unsigned int pat_index, | |
| 113 | 113 | u32 flags) |
| 114 | 114 | { |
| 115 | 115 | struct i915_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); |
| @@ -117,7 +117,7 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, · 1 unmodified line | ||
| 117 | 117 | unsigned int first_entry = vma_res->start / I915_GTT_PAGE_SIZE; |
| 118 | 118 | unsigned int act_pt = first_entry / GEN6_PTES; |
| 119 | 119 | unsigned int act_pte = first_entry % GEN6_PTES; |
| 120 | − const u32 pte_encode = vm->pte_encode(0, cache_level, flags); | |
| 120 | + const u32 pte_encode = vm->pte_encode(0, pat_index, flags); | |
| 121 | 121 | struct sgt_dma iter = sgt_dma(vma_res); |
| 122 | 122 | gen6_pte_t *vaddr; |
| 123 | 123 | |
| @@ -227,7 +227,9 @@ static int gen6_ppgtt_init_scratch(struct gen6_ppgtt *ppgtt) · 103 unmodified lines | ||
| 227 | 227 | |
| 228 | 228 | vm->scratch[0]->encode = |
| 229 | 229 | vm->pte_encode(px_dma(vm->scratch[0]), |
| 230 | − I915_CACHE_NONE, PTE_READ_ONLY); | |
| 230 | + i915_gem_get_pat_index(vm->i915, | |
| 231 | + I915_CACHE_NONE), | |
| 232 | + PTE_READ_ONLY); | |
| 231 | 233 | |
| 232 | 234 | vm->scratch[1] = vm->alloc_pt_dma(vm, I915_GTT_PAGE_SIZE_4K); |
| 233 | 235 | if (IS_ERR(vm->scratch[1])) { |
| @@ -278,7 +280,7 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm) · 44 unmodified lines | ||
| 278 | 280 | static void pd_vma_bind(struct i915_address_space *vm, |
| 279 | 281 | struct i915_vm_pt_stash *stash, |
| 280 | 282 | struct i915_vma_resource *vma_res, |
| 281 | − enum i915_cache_level cache_level, | |
| 283 | + unsigned int pat_index, | |
| 282 | 284 | u32 unused) |
| 283 | 285 | { |
| 284 | 286 | struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); |
| @@ -29,7 +29,7 @@ static u64 gen8_pde_encode(const dma_addr_t addr, · 28 unmodified lines | ||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | static u64 gen8_pte_encode(dma_addr_t addr, |
| 32 | − enum i915_cache_level level, | |
| 32 | + unsigned int pat_index, | |
| 33 | 33 | u32 flags) |
| 34 | 34 | { |
| 35 | 35 | gen8_pte_t pte = addr | GEN8_PAGE_PRESENT | GEN8_PAGE_RW; |
| @@ -40,7 +40,12 @@ static u64 gen8_pte_encode(dma_addr_t addr, · 4 unmodified lines | ||
| 40 | 40 | if (flags & PTE_LM) |
| 41 | 41 | pte |= GEN12_PPGTT_PTE_LM; |
| 42 | 42 | |
| 43 | − switch (level) { | |
| 43 | + /* | |
| 44 | + * For pre-gen12 platforms pat_index is the same as enum | |
| 45 | + * i915_cache_level, so the switch-case here is still valid. | |
| 46 | + * See translation table defined by LEGACY_CACHELEVEL. | |
| 47 | + */ | |
| 48 | + switch (pat_index) { | |
| 44 | 49 | case I915_CACHE_NONE: |
| 45 | 50 | pte |= PPAT_UNCACHED; |
| 46 | 51 | break; |
| @@ -55,6 +60,33 @@ static u64 gen8_pte_encode(dma_addr_t addr, · 8 unmodified lines | ||
| 55 | 60 | return pte; |
| 56 | 61 | } |
| 57 | 62 | |
| 63 | +static u64 gen12_pte_encode(dma_addr_t addr, | |
| 64 | + unsigned int pat_index, | |
| 65 | + u32 flags) | |
| 66 | +{ | |
| 67 | + gen8_pte_t pte = addr | GEN8_PAGE_PRESENT | GEN8_PAGE_RW; | |
| 68 | + | |
| 69 | + if (unlikely(flags & PTE_READ_ONLY)) | |
| 70 | + pte &= ~GEN8_PAGE_RW; | |
| 71 | + | |
| 72 | + if (flags & PTE_LM) | |
| 73 | + pte |= GEN12_PPGTT_PTE_LM; | |
| 74 | + | |
| 75 | + if (pat_index & BIT(0)) | |
| 76 | + pte |= GEN12_PPGTT_PTE_PAT0; | |
| 77 | + | |
| 78 | + if (pat_index & BIT(1)) | |
| 79 | + pte |= GEN12_PPGTT_PTE_PAT1; | |
| 80 | + | |
| 81 | + if (pat_index & BIT(2)) | |
| 82 | + pte |= GEN12_PPGTT_PTE_PAT2; | |
| 83 | + | |
| 84 | + if (pat_index & BIT(3)) | |
| 85 | + pte |= MTL_PPGTT_PTE_PAT3; | |
| 86 | + | |
| 87 | + return pte; | |
| 88 | +} | |
| 89 | + | |
| 58 | 90 | static void gen8_ppgtt_notify_vgt(struct i915_ppgtt *ppgtt, bool create) |
| 59 | 91 | { |
| 60 | 92 | struct drm_i915_private *i915 = ppgtt->vm.i915; |
| @@ -423,11 +455,11 @@ gen8_ppgtt_insert_pte(struct i915_ppgtt *ppgtt, · 362 unmodified lines | ||
| 423 | 455 | struct i915_page_directory *pdp, |
| 424 | 456 | struct sgt_dma *iter, |
| 425 | 457 | u64 idx, |
| 426 | − enum i915_cache_level cache_level, | |
| 458 | + unsigned int pat_index, | |
| 427 | 459 | u32 flags) |
| 428 | 460 | { |
| 429 | 461 | struct i915_page_directory *pd; |
| 430 | − const gen8_pte_t pte_encode = gen8_pte_encode(0, cache_level, flags); | |
| 462 | + const gen8_pte_t pte_encode = ppgtt->vm.pte_encode(0, pat_index, flags); | |
| 431 | 463 | gen8_pte_t *vaddr; |
| 432 | 464 | |
| 433 | 465 | pd = i915_pd_entry(pdp, gen8_pd_index(idx, 2)); |
| @@ -470,10 +502,10 @@ static void · 36 unmodified lines | ||
| 470 | 502 | xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm, |
| 471 | 503 | struct i915_vma_resource *vma_res, |
| 472 | 504 | struct sgt_dma *iter, |
| 473 | − enum i915_cache_level cache_level, | |
| 505 | + unsigned int pat_index, | |
| 474 | 506 | u32 flags) |
| 475 | 507 | { |
| 476 | − const gen8_pte_t pte_encode = vm->pte_encode(0, cache_level, flags); | |
| 508 | + const gen8_pte_t pte_encode = vm->pte_encode(0, pat_index, flags); | |
| 477 | 509 | unsigned int rem = sg_dma_len(iter->sg); |
| 478 | 510 | u64 start = vma_res->start; |
| 479 | 511 | u64 end = start + vma_res->vma_size; |
| @@ -570,6 +602,7 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm, · 90 unmodified lines | ||
| 570 | 602 | } |
| 571 | 603 | } while (rem >= page_size && index < max); |
| 572 | 604 | |
| 605 | + drm_clflush_virt_range(vaddr, PAGE_SIZE); | |
| 573 | 606 | vma_res->page_sizes_gtt |= page_size; |
| 574 | 607 | } while (iter->sg && sg_dma_len(iter->sg)); |
| 575 | 608 | } |
| @@ -577,10 +610,10 @@ xehpsdv_ppgtt_insert_huge(struct i915_address_space *vm, · 1 unmodified line | ||
| 577 | 610 | static void gen8_ppgtt_insert_huge(struct i915_address_space *vm, |
| 578 | 611 | struct i915_vma_resource *vma_res, |
| 579 | 612 | struct sgt_dma *iter, |
| 580 | − enum i915_cache_level cache_level, | |
| 613 | + unsigned int pat_index, | |
| 581 | 614 | u32 flags) |
| 582 | 615 | { |
| 583 | − const gen8_pte_t pte_encode = gen8_pte_encode(0, cache_level, flags); | |
| 616 | + const gen8_pte_t pte_encode = vm->pte_encode(0, pat_index, flags); | |
| 584 | 617 | unsigned int rem = sg_dma_len(iter->sg); |
| 585 | 618 | u64 start = vma_res->start; |
| 586 | 619 | |
| @@ -700,17 +733,17 @@ static void gen8_ppgtt_insert_huge(struct i915_address_space *vm, · 113 unmodified lines | ||
| 700 | 733 | |
| 701 | 734 | static void gen8_ppgtt_insert(struct i915_address_space *vm, |
| 702 | 735 | struct i915_vma_resource *vma_res, |
| 703 | − enum i915_cache_level cache_level, | |
| 736 | + unsigned int pat_index, | |
| 704 | 737 | u32 flags) |
| 705 | 738 | { |
| 706 | 739 | struct i915_ppgtt * const ppgtt = i915_vm_to_ppgtt(vm); |
| 707 | 740 | struct sgt_dma iter = sgt_dma(vma_res); |
| 708 | 741 | |
| 709 | 742 | if (vma_res->bi.page_sizes.sg > I915_GTT_PAGE_SIZE) { |
| 710 | − if (HAS_64K_PAGES(vm->i915)) | |
| 711 | − xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags); | |
| 743 | + if (GRAPHICS_VER_FULL(vm->i915) >= IP_VER(12, 50)) | |
| 744 | + xehpsdv_ppgtt_insert_huge(vm, vma_res, &iter, pat_index, flags); | |
| 712 | 745 | else |
| 713 | − gen8_ppgtt_insert_huge(vm, vma_res, &iter, cache_level, flags); | |
| 746 | + gen8_ppgtt_insert_huge(vm, vma_res, &iter, pat_index, flags); | |
| 714 | 747 | } else { |
| 715 | 748 | u64 idx = vma_res->start >> GEN8_PTE_SHIFT; |
| 716 | 749 | |
| @@ -719,7 +752,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm, · 2 unmodified lines | ||
| 719 | 752 | gen8_pdp_for_page_index(vm, idx); |
| 720 | 753 | |
| 721 | 754 | idx = gen8_ppgtt_insert_pte(ppgtt, pdp, &iter, idx, |
| 722 | − cache_level, flags); | |
| 755 | + pat_index, flags); | |
| 723 | 756 | } while (idx); |
| 724 | 757 | |
| 725 | 758 | vma_res->page_sizes_gtt = I915_GTT_PAGE_SIZE; |
| @@ -729,7 +762,7 @@ static void gen8_ppgtt_insert(struct i915_address_space *vm, · 3 unmodified lines | ||
| 729 | 762 | static void gen8_ppgtt_insert_entry(struct i915_address_space *vm, |
| 730 | 763 | dma_addr_t addr, |
| 731 | 764 | u64 offset, |
| 732 | − enum i915_cache_level level, | |
| 765 | + unsigned int pat_index, | |
| 733 | 766 | u32 flags) |
| 734 | 767 | { |
| 735 | 768 | u64 idx = offset >> GEN8_PTE_SHIFT; |
| @@ -743,14 +776,14 @@ static void gen8_ppgtt_insert_entry(struct i915_address_space *vm, · 7 unmodified lines | ||
| 743 | 776 | GEM_BUG_ON(pt->is_compact); |
| 744 | 777 | |
| 745 | 778 | vaddr = px_vaddr(pt); |
| 746 | − vaddr[gen8_pd_index(idx, 0)] = gen8_pte_encode(addr, level, flags); | |
| 779 | + vaddr[gen8_pd_index(idx, 0)] = vm->pte_encode(addr, pat_index, flags); | |
| 747 | 780 | drm_clflush_virt_range(&vaddr[gen8_pd_index(idx, 0)], sizeof(*vaddr)); |
| 748 | 781 | } |
| 749 | 782 | |
| 750 | 783 | static void __xehpsdv_ppgtt_insert_entry_lm(struct i915_address_space *vm, |
| 751 | 784 | dma_addr_t addr, |
| 752 | 785 | u64 offset, |
| 753 | − enum i915_cache_level level, | |
| 786 | + unsigned int pat_index, | |
| 754 | 787 | u32 flags) |
| 755 | 788 | { |
| 756 | 789 | u64 idx = offset >> GEN8_PTE_SHIFT; |
| @@ -773,20 +806,20 @@ static void __xehpsdv_ppgtt_insert_entry_lm(struct i915_address_space *vm, · 16 unmodified lines | ||
| 773 | 806 | } |
| 774 | 807 | |
| 775 | 808 | vaddr = px_vaddr(pt); |
| 776 | − vaddr[gen8_pd_index(idx, 0) / 16] = gen8_pte_encode(addr, level, flags); | |
| 809 | + vaddr[gen8_pd_index(idx, 0) / 16] = vm->pte_encode(addr, pat_index, flags); | |
| 777 | 810 | } |
| 778 | 811 | |
| 779 | 812 | static void xehpsdv_ppgtt_insert_entry(struct i915_address_space *vm, |
| 780 | 813 | dma_addr_t addr, |
| 781 | 814 | u64 offset, |
| 782 | − enum i915_cache_level level, | |
| 815 | + unsigned int pat_index, | |
| 783 | 816 | u32 flags) |
| 784 | 817 | { |
| 785 | 818 | if (flags & PTE_LM) |
| 786 | 819 | return __xehpsdv_ppgtt_insert_entry_lm(vm, addr, offset, |
| 787 | − level, flags); | |
| 820 | + pat_index, flags); | |
| 788 | 821 | |
| 789 | − return gen8_ppgtt_insert_entry(vm, addr, offset, level, flags); | |
| 822 | + return gen8_ppgtt_insert_entry(vm, addr, offset, pat_index, flags); | |
| 790 | 823 | } |
| 791 | 824 | |
| 792 | 825 | static int gen8_init_scratch(struct i915_address_space *vm) |
| @@ -820,8 +853,10 @@ static int gen8_init_scratch(struct i915_address_space *vm) · 27 unmodified lines | ||
| 820 | 853 | pte_flags |= PTE_LM; |
| 821 | 854 | |
| 822 | 855 | vm->scratch[0]->encode = |
| 823 | − gen8_pte_encode(px_dma(vm->scratch[0]), | |
| 824 | − I915_CACHE_NONE, pte_flags); | |
| 856 | + vm->pte_encode(px_dma(vm->scratch[0]), | |
| 857 | + i915_gem_get_pat_index(vm->i915, | |
| 858 | + I915_CACHE_NONE), | |
| 859 | + pte_flags); | |
| 825 | 860 | |
| 826 | 861 | for (i = 1; i <= vm->top; i++) { |
| 827 | 862 | struct drm_i915_gem_object *obj; |
| @@ -963,7 +998,10 @@ struct i915_ppgtt *gen8_ppgtt_create(struct intel_gt *gt, · 135 unmodified lines | ||
| 963 | 998 | */ |
| 964 | 999 | ppgtt->vm.alloc_scratch_dma = alloc_pt_dma; |
| 965 | 1000 | |
| 966 | − ppgtt->vm.pte_encode = gen8_pte_encode; | |
| 1001 | + if (GRAPHICS_VER(gt->i915) >= 12) | |
| 1002 | + ppgtt->vm.pte_encode = gen12_pte_encode; | |
| 1003 | + else | |
| 1004 | + ppgtt->vm.pte_encode = gen8_pte_encode; | |
| 967 | 1005 | |
| 968 | 1006 | ppgtt->vm.bind_async_flags = I915_VMA_LOCAL_BIND; |
| 969 | 1007 | ppgtt->vm.insert_entries = gen8_ppgtt_insert; |
| @@ -10,13 +10,12 @@ · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | struct i915_address_space; |
| 12 | 12 | struct intel_gt; |
| 13 | −enum i915_cache_level; | |
| 14 | 13 | |
| 15 | 14 | struct i915_ppgtt *gen8_ppgtt_create(struct intel_gt *gt, |
| 16 | 15 | unsigned long lmem_pt_obj_flags); |
| 17 | 16 | |
| 18 | 17 | u64 gen8_ggtt_pte_encode(dma_addr_t addr, |
| 19 | − enum i915_cache_level level, | |
| 18 | + unsigned int pat_index, | |
| 20 | 19 | u32 flags); |
| 21 | 20 | |
| 22 | 21 | #endif |
| @@ -578,10 +578,13 @@ void intel_context_bind_parent_child(struct intel_context *parent, · 577 unmodified lines | ||
| 578 | 578 | child->parallel.parent = parent; |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | −u64 intel_context_get_total_runtime_ns(const struct intel_context *ce) | |
| 581 | +u64 intel_context_get_total_runtime_ns(struct intel_context *ce) | |
| 582 | 582 | { |
| 583 | 583 | u64 total, active; |
| 584 | 584 | |
| 585 | + if (ce->ops->update_stats) | |
| 586 | + ce->ops->update_stats(ce); | |
| 587 | + | |
| 585 | 588 | total = ce->stats.runtime.total; |
| 586 | 589 | if (ce->ops->flags & COPS_RUNTIME_CYCLES) |
| 587 | 590 | total *= ce->engine->gt->clock_period_ns; |
| @@ -97,7 +97,7 @@ void intel_context_bind_parent_child(struct intel_context *parent, · 96 unmodified lines | ||
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * intel_context_lock_pinned - Stablises the 'pinned' status of the HW context |
| 100 | − * @ce - the context | |
| 100 | + * @ce: the context | |
| 101 | 101 | * |
| 102 | 102 | * Acquire a lock on the pinned status of the HW context, such that the context |
| 103 | 103 | * can neither be bound to the GPU or unbound whilst the lock is held, i.e. |
| @@ -111,7 +111,7 @@ static inline int intel_context_lock_pinned(struct intel_context *ce) · 7 unmodified lines | ||
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * intel_context_is_pinned - Reports the 'pinned' status |
| 114 | − * @ce - the context | |
| 114 | + * @ce: the context | |
| 115 | 115 | * |
| 116 | 116 | * While in use by the GPU, the context, along with its ring and page |
| 117 | 117 | * tables is pinned into memory and the GTT. |
| @@ -133,7 +133,7 @@ static inline void intel_context_cancel_request(struct intel_context *ce, · 15 unmodified lines | ||
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | 135 | * intel_context_unlock_pinned - Releases the earlier locking of 'pinned' status |
| 136 | − * @ce - the context | |
| 136 | + * @ce: the context | |
| 137 | 137 | * |
| 138 | 138 | * Releases the lock earlier acquired by intel_context_unlock_pinned(). |
| 139 | 139 | */ |
| @@ -375,7 +375,7 @@ intel_context_clear_nopreempt(struct intel_context *ce) · 235 unmodified lines | ||
| 375 | 375 | clear_bit(CONTEXT_NOPREEMPT, &ce->flags); |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | −u64 intel_context_get_total_runtime_ns(const struct intel_context *ce); | |
| 378 | +u64 intel_context_get_total_runtime_ns(struct intel_context *ce); | |
| 379 | 379 | u64 intel_context_get_avg_runtime_ns(struct intel_context *ce); |
| 380 | 380 | |
| 381 | 381 | static inline u64 intel_context_clock(void) |
| @@ -58,6 +58,8 @@ struct intel_context_ops { · 57 unmodified lines | ||
| 58 | 58 | |
| 59 | 59 | void (*sched_disable)(struct intel_context *ce); |
| 60 | 60 | |
| 61 | + void (*update_stats)(struct intel_context *ce); | |
| 62 | + | |
| 61 | 63 | void (*reset)(struct intel_context *ce); |
| 62 | 64 | void (*destroy)(struct kref *kref); |
| 63 | 65 | |
| @@ -1515,7 +1515,7 @@ int intel_engines_init(struct intel_gt *gt) · 1514 unmodified lines | ||
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | 1517 | /** |
| 1518 | − * intel_engines_cleanup_common - cleans up the engine state created by | |
| 1518 | + * intel_engine_cleanup_common - cleans up the engine state created by | |
| 1519 | 1519 | * the common initiailizers. |
| 1520 | 1520 | * @engine: Engine to cleanup. |
| 1521 | 1521 | * |
| @@ -289,6 +289,7 @@ struct intel_engine_execlists { · 288 unmodified lines | ||
| 289 | 289 | */ |
| 290 | 290 | u8 csb_head; |
| 291 | 291 | |
| 292 | + /* private: selftest */ | |
| 292 | 293 | I915_SELFTEST_DECLARE(struct st_preempt_hang preempt_hang;) |
| 293 | 294 | }; |
| 294 | 295 | |
| @@ -117,7 +117,7 @@ static void set_scheduler_caps(struct drm_i915_private *i915) · 116 unmodified lines | ||
| 117 | 117 | disabled |= (I915_SCHEDULER_CAP_ENABLED | |
| 118 | 118 | I915_SCHEDULER_CAP_PRIORITY); |
| 119 | 119 | |
| 120 | − if (intel_uc_uses_guc_submission(&to_gt(i915)->uc)) | |
| 120 | + if (intel_uc_uses_guc_submission(&engine->gt->uc)) | |
| 121 | 121 | enabled |= I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP; |
| 122 | 122 | |
| 123 | 123 | for (i = 0; i < ARRAY_SIZE(map); i++) { |
| @@ -220,8 +220,28 @@ static void guc_ggtt_invalidate(struct i915_ggtt *ggtt) · 219 unmodified lines | ||
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | +static u64 mtl_ggtt_pte_encode(dma_addr_t addr, | |
| 224 | + unsigned int pat_index, | |
| 225 | + u32 flags) | |
| 226 | +{ | |
| 227 | + gen8_pte_t pte = addr | GEN8_PAGE_PRESENT; | |
| 228 | + | |
| 229 | + WARN_ON_ONCE(addr & ~GEN12_GGTT_PTE_ADDR_MASK); | |
| 230 | + | |
| 231 | + if (flags & PTE_LM) | |
| 232 | + pte |= GEN12_GGTT_PTE_LM; | |
| 233 | + | |
| 234 | + if (pat_index & BIT(0)) | |
| 235 | + pte |= MTL_GGTT_PTE_PAT0; | |
| 236 | + | |
| 237 | + if (pat_index & BIT(1)) | |
| 238 | + pte |= MTL_GGTT_PTE_PAT1; | |
| 239 | + | |
| 240 | + return pte; | |
| 241 | +} | |
| 242 | + | |
| 223 | 243 | u64 gen8_ggtt_pte_encode(dma_addr_t addr, |
| 224 | − enum i915_cache_level level, | |
| 244 | + unsigned int pat_index, | |
| 225 | 245 | u32 flags) |
| 226 | 246 | { |
| 227 | 247 | gen8_pte_t pte = addr | GEN8_PAGE_PRESENT; |
| @@ -240,25 +260,25 @@ static void gen8_set_pte(void __iomem *addr, gen8_pte_t pte) · 12 unmodified lines | ||
| 240 | 260 | static void gen8_ggtt_insert_page(struct i915_address_space *vm, |
| 241 | 261 | dma_addr_t addr, |
| 242 | 262 | u64 offset, |
| 243 | − enum i915_cache_level level, | |
| 263 | + unsigned int pat_index, | |
| 244 | 264 | u32 flags) |
| 245 | 265 | { |
| 246 | 266 | struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); |
| 247 | 267 | gen8_pte_t __iomem *pte = |
| 248 | 268 | (gen8_pte_t __iomem *)ggtt->gsm + offset / I915_GTT_PAGE_SIZE; |
| 249 | 269 | |
| 250 | − gen8_set_pte(pte, gen8_ggtt_pte_encode(addr, level, flags)); | |
| 270 | + gen8_set_pte(pte, ggtt->vm.pte_encode(addr, pat_index, flags)); | |
| 251 | 271 | |
| 252 | 272 | ggtt->invalidate(ggtt); |
| 253 | 273 | } |
| 254 | 274 | |
| 255 | 275 | static void gen8_ggtt_insert_entries(struct i915_address_space *vm, |
| 256 | 276 | struct i915_vma_resource *vma_res, |
| 257 | − enum i915_cache_level level, | |
| 277 | + unsigned int pat_index, | |
| 258 | 278 | u32 flags) |
| 259 | 279 | { |
| 260 | − const gen8_pte_t pte_encode = gen8_ggtt_pte_encode(0, level, flags); | |
| 261 | 280 | struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); |
| 281 | + const gen8_pte_t pte_encode = ggtt->vm.pte_encode(0, pat_index, flags); | |
| 262 | 282 | gen8_pte_t __iomem *gte; |
| 263 | 283 | gen8_pte_t __iomem *end; |
| 264 | 284 | struct sgt_iter iter; |
| @@ -315,14 +335,14 @@ static void gen8_ggtt_clear_range(struct i915_address_space *vm, · 50 unmodified lines | ||
| 315 | 335 | static void gen6_ggtt_insert_page(struct i915_address_space *vm, |
| 316 | 336 | dma_addr_t addr, |
| 317 | 337 | u64 offset, |
| 318 | − enum i915_cache_level level, | |
| 338 | + unsigned int pat_index, | |
| 319 | 339 | u32 flags) |
| 320 | 340 | { |
| 321 | 341 | struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); |
| 322 | 342 | gen6_pte_t __iomem *pte = |
| 323 | 343 | (gen6_pte_t __iomem *)ggtt->gsm + offset / I915_GTT_PAGE_SIZE; |
| 324 | 344 | |
| 325 | − iowrite32(vm->pte_encode(addr, level, flags), pte); | |
| 345 | + iowrite32(vm->pte_encode(addr, pat_index, flags), pte); | |
| 326 | 346 | |
| 327 | 347 | ggtt->invalidate(ggtt); |
| 328 | 348 | } |
| @@ -335,7 +355,7 @@ static void gen6_ggtt_insert_page(struct i915_address_space *vm, · 6 unmodified lines | ||
| 335 | 355 | */ |
| 336 | 356 | static void gen6_ggtt_insert_entries(struct i915_address_space *vm, |
| 337 | 357 | struct i915_vma_resource *vma_res, |
| 338 | − enum i915_cache_level level, | |
| 358 | + unsigned int pat_index, | |
| 339 | 359 | u32 flags) |
| 340 | 360 | { |
| 341 | 361 | struct i915_ggtt *ggtt = i915_vm_to_ggtt(vm); |
| @@ -352,7 +372,7 @@ static void gen6_ggtt_insert_entries(struct i915_address_space *vm, · 10 unmodified lines | ||
| 352 | 372 | iowrite32(vm->scratch[0]->encode, gte++); |
| 353 | 373 | end += (vma_res->node_size + vma_res->guard) / I915_GTT_PAGE_SIZE; |
| 354 | 374 | for_each_sgt_daddr(addr, iter, vma_res->bi.pages) |
| 355 | − iowrite32(vm->pte_encode(addr, level, flags), gte++); | |
| 375 | + iowrite32(vm->pte_encode(addr, pat_index, flags), gte++); | |
| 356 | 376 | GEM_BUG_ON(gte > end); |
| 357 | 377 | |
| 358 | 378 | /* Fill the allocated but "unused" space beyond the end of the buffer */ |
| @@ -387,14 +407,15 @@ struct insert_page { · 28 unmodified lines | ||
| 387 | 407 | struct i915_address_space *vm; |
| 388 | 408 | dma_addr_t addr; |
| 389 | 409 | u64 offset; |
| 390 | − enum i915_cache_level level; | |
| 410 | + unsigned int pat_index; | |
| 391 | 411 | }; |
| 392 | 412 | |
| 393 | 413 | static int bxt_vtd_ggtt_insert_page__cb(void *_arg) |
| 394 | 414 | { |
| 395 | 415 | struct insert_page *arg = _arg; |
| 396 | 416 | |
| 397 | − gen8_ggtt_insert_page(arg->vm, arg->addr, arg->offset, arg->level, 0); | |
| 417 | + gen8_ggtt_insert_page(arg->vm, arg->addr, arg->offset, | |
| 418 | + arg->pat_index, 0); | |
| 398 | 419 | bxt_vtd_ggtt_wa(arg->vm); |
| 399 | 420 | |
| 400 | 421 | return 0; |
| @@ -403,10 +424,10 @@ static int bxt_vtd_ggtt_insert_page__cb(void *_arg) · 2 unmodified lines | ||
| 403 | 424 | static void bxt_vtd_ggtt_insert_page__BKL(struct i915_address_space *vm, |
| 404 | 425 | dma_addr_t addr, |
| 405 | 426 | u64 offset, |
| 406 | − enum i915_cache_level level, | |
| 427 | + unsigned int pat_index, | |
| 407 | 428 | u32 unused) |
| 408 | 429 | { |
| 409 | − struct insert_page arg = { vm, addr, offset, level }; | |
| 430 | + struct insert_page arg = { vm, addr, offset, pat_index }; | |
| 410 | 431 | |
| 411 | 432 | stop_machine(bxt_vtd_ggtt_insert_page__cb, &arg, NULL); |
| 412 | 433 | } |
| @@ -414,7 +435,7 @@ static void bxt_vtd_ggtt_insert_page__BKL(struct i915_address_space *vm, · 1 unmodified line | ||
| 414 | 435 | struct insert_entries { |
| 415 | 436 | struct i915_address_space *vm; |
| 416 | 437 | struct i915_vma_resource *vma_res; |
| 417 | − enum i915_cache_level level; | |
| 438 | + unsigned int pat_index; | |
| 418 | 439 | u32 flags; |
| 419 | 440 | }; |
| 420 | 441 | |
| @@ -422,7 +443,8 @@ static int bxt_vtd_ggtt_insert_entries__cb(void *_arg) · 1 unmodified line | ||
| 422 | 443 | { |
| 423 | 444 | struct insert_entries *arg = _arg; |
| 424 | 445 | |
| 425 | − gen8_ggtt_insert_entries(arg->vm, arg->vma_res, arg->level, arg->flags); | |
| 446 | + gen8_ggtt_insert_entries(arg->vm, arg->vma_res, | |
| 447 | + arg->pat_index, arg->flags); | |
| 426 | 448 | bxt_vtd_ggtt_wa(arg->vm); |
| 427 | 449 | |
| 428 | 450 | return 0; |
| @@ -430,10 +452,10 @@ static int bxt_vtd_ggtt_insert_entries__cb(void *_arg) · 1 unmodified line | ||
| 430 | 452 | |
| 431 | 453 | static void bxt_vtd_ggtt_insert_entries__BKL(struct i915_address_space *vm, |
| 432 | 454 | struct i915_vma_resource *vma_res, |
| 433 | − enum i915_cache_level level, | |
| 455 | + unsigned int pat_index, | |
| 434 | 456 | u32 flags) |
| 435 | 457 | { |
| 436 | − struct insert_entries arg = { vm, vma_res, level, flags }; | |
| 458 | + struct insert_entries arg = { vm, vma_res, pat_index, flags }; | |
| 437 | 459 | |
| 438 | 460 | stop_machine(bxt_vtd_ggtt_insert_entries__cb, &arg, NULL); |
| 439 | 461 | } |
| @@ -462,7 +484,7 @@ static void gen6_ggtt_clear_range(struct i915_address_space *vm, · 22 unmodified lines | ||
| 462 | 484 | void intel_ggtt_bind_vma(struct i915_address_space *vm, |
| 463 | 485 | struct i915_vm_pt_stash *stash, |
| 464 | 486 | struct i915_vma_resource *vma_res, |
| 465 | − enum i915_cache_level cache_level, | |
| 487 | + unsigned int pat_index, | |
| 466 | 488 | u32 flags) |
| 467 | 489 | { |
| 468 | 490 | u32 pte_flags; |
| @@ -479,7 +501,7 @@ void intel_ggtt_bind_vma(struct i915_address_space *vm, · 10 unmodified lines | ||
| 479 | 501 | if (vma_res->bi.lmem) |
| 480 | 502 | pte_flags |= PTE_LM; |
| 481 | 503 | |
| 482 | − vm->insert_entries(vm, vma_res, cache_level, pte_flags); | |
| 504 | + vm->insert_entries(vm, vma_res, pat_index, pte_flags); | |
| 483 | 505 | vma_res->page_sizes_gtt = I915_GTT_PAGE_SIZE; |
| 484 | 506 | } |
| 485 | 507 | |
| @@ -628,7 +650,7 @@ err: · 142 unmodified lines | ||
| 628 | 650 | static void aliasing_gtt_bind_vma(struct i915_address_space *vm, |
| 629 | 651 | struct i915_vm_pt_stash *stash, |
| 630 | 652 | struct i915_vma_resource *vma_res, |
| 631 | − enum i915_cache_level cache_level, | |
| 653 | + unsigned int pat_index, | |
| 632 | 654 | u32 flags) |
| 633 | 655 | { |
| 634 | 656 | u32 pte_flags; |
| @@ -640,10 +662,10 @@ static void aliasing_gtt_bind_vma(struct i915_address_space *vm, · 5 unmodified lines | ||
| 640 | 662 | |
| 641 | 663 | if (flags & I915_VMA_LOCAL_BIND) |
| 642 | 664 | ppgtt_bind_vma(&i915_vm_to_ggtt(vm)->alias->vm, |
| 643 | − stash, vma_res, cache_level, flags); | |
| 665 | + stash, vma_res, pat_index, flags); | |
| 644 | 666 | |
| 645 | 667 | if (flags & I915_VMA_GLOBAL_BIND) |
| 646 | − vm->insert_entries(vm, vma_res, cache_level, pte_flags); | |
| 668 | + vm->insert_entries(vm, vma_res, pat_index, pte_flags); | |
| 647 | 669 | |
| 648 | 670 | vma_res->bound_flags |= flags; |
| 649 | 671 | } |
| @@ -900,7 +922,9 @@ static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size) · 250 unmodified lines | ||
| 900 | 922 | |
| 901 | 923 | ggtt->vm.scratch[0]->encode = |
| 902 | 924 | ggtt->vm.pte_encode(px_dma(ggtt->vm.scratch[0]), |
| 903 | − I915_CACHE_NONE, pte_flags); | |
| 925 | + i915_gem_get_pat_index(i915, | |
| 926 | + I915_CACHE_NONE), | |
| 927 | + pte_flags); | |
| 904 | 928 | |
| 905 | 929 | return 0; |
| 906 | 930 | } |
| @@ -981,11 +1005,19 @@ static int gen8_gmch_probe(struct i915_ggtt *ggtt) · 74 unmodified lines | ||
| 981 | 1005 | ggtt->vm.vma_ops.bind_vma = intel_ggtt_bind_vma; |
| 982 | 1006 | ggtt->vm.vma_ops.unbind_vma = intel_ggtt_unbind_vma; |
| 983 | 1007 | |
| 984 | − ggtt->vm.pte_encode = gen8_ggtt_pte_encode; | |
| 1008 | + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70)) | |
| 1009 | + ggtt->vm.pte_encode = mtl_ggtt_pte_encode; | |
| 1010 | + else | |
| 1011 | + ggtt->vm.pte_encode = gen8_ggtt_pte_encode; | |
| 985 | 1012 | |
| 986 | 1013 | return ggtt_probe_common(ggtt, size); |
| 987 | 1014 | } |
| 988 | 1015 | |
| 1016 | +/* | |
| 1017 | + * For pre-gen8 platforms pat_index is the same as enum i915_cache_level, | |
| 1018 | + * so these PTE encode functions are left with using cache_level. | |
| 1019 | + * See translation table LEGACY_CACHELEVEL. | |
| 1020 | + */ | |
| 989 | 1021 | static u64 snb_pte_encode(dma_addr_t addr, |
| 990 | 1022 | enum i915_cache_level level, |
| 991 | 1023 | u32 flags) |
| @@ -1266,7 +1298,9 @@ bool i915_ggtt_resume_vm(struct i915_address_space *vm) · 274 unmodified lines | ||
| 1266 | 1298 | */ |
| 1267 | 1299 | vma->resource->bound_flags = 0; |
| 1268 | 1300 | vma->ops->bind_vma(vm, NULL, vma->resource, |
| 1269 | − obj ? obj->cache_level : 0, | |
| 1301 | + obj ? obj->pat_index : | |
| 1302 | + i915_gem_get_pat_index(vm->i915, | |
| 1303 | + I915_CACHE_NONE), | |
| 1270 | 1304 | was_bound); |
| 1271 | 1305 | |
| 1272 | 1306 | if (obj) { /* only used during resume => exclusive access */ |
| @@ -16,6 +16,7 @@ · 15 unmodified lines | ||
| 16 | 16 | #include "intel_uncore.h" |
| 17 | 17 | #include "intel_rps.h" |
| 18 | 18 | #include "pxp/intel_pxp_irq.h" |
| 19 | +#include "uc/intel_gsc_proxy.h" | |
| 19 | 20 | |
| 20 | 21 | static void guc_irq_handler(struct intel_guc *guc, u16 iir) |
| 21 | 22 | { |
| @@ -82,6 +83,9 @@ gen11_other_irq_handler(struct intel_gt *gt, const u8 instance, · 60 unmodified lines | ||
| 82 | 83 | if (instance == OTHER_GSC_INSTANCE) |
| 83 | 84 | return intel_gsc_irq_handler(gt, iir); |
| 84 | 85 | |
| 86 | + if (instance == OTHER_GSC_HECI_2_INSTANCE) | |
| 87 | + return intel_gsc_proxy_irq_handler(>->uc.gsc, iir); | |
| 88 | + | |
| 85 | 89 | WARN_ONCE(1, "unhandled other interrupt instance=0x%x, iir=0x%x\n", |
| 86 | 90 | instance, iir); |
| 87 | 91 | } |
| @@ -101,7 +105,10 @@ static struct intel_gt *pick_gt(struct intel_gt *gt, u8 class, u8 instance) · 13 unmodified lines | ||
| 101 | 105 | case VIDEO_ENHANCEMENT_CLASS: |
| 102 | 106 | return media_gt; |
| 103 | 107 | case OTHER_CLASS: |
| 104 | − if (instance == OTHER_GSC_INSTANCE && HAS_ENGINE(media_gt, GSC0)) | |
| 108 | + if (instance == OTHER_GSC_HECI_2_INSTANCE) | |
| 109 | + return media_gt; | |
| 110 | + if ((instance == OTHER_GSC_INSTANCE || instance == OTHER_KCR_INSTANCE) && | |
| 111 | + HAS_ENGINE(media_gt, GSC0)) | |
| 105 | 112 | return media_gt; |
| 106 | 113 | fallthrough; |
| 107 | 114 | default: |
| @@ -257,6 +264,7 @@ void gen11_gt_irq_postinstall(struct intel_gt *gt) · 149 unmodified lines | ||
| 257 | 264 | u32 irqs = GT_RENDER_USER_INTERRUPT; |
| 258 | 265 | u32 guc_mask = intel_uc_wants_guc(>->uc) ? GUC_INTR_GUC2HOST : 0; |
| 259 | 266 | u32 gsc_mask = 0; |
| 267 | + u32 heci_mask = 0; | |
| 260 | 268 | u32 dmask; |
| 261 | 269 | u32 smask; |
| 262 | 270 | |
| @@ -268,10 +276,16 @@ void gen11_gt_irq_postinstall(struct intel_gt *gt) · 5 unmodified lines | ||
| 268 | 276 | dmask = irqs << 16 | irqs; |
| 269 | 277 | smask = irqs << 16; |
| 270 | 278 | |
| 271 | − if (HAS_ENGINE(gt, GSC0)) | |
| 279 | + if (HAS_ENGINE(gt, GSC0)) { | |
| 280 | + /* | |
| 281 | + * the heci2 interrupt is enabled via the same register as the | |
| 282 | + * GSC interrupt, but it has its own mask register. | |
| 283 | + */ | |
| 272 | 284 | gsc_mask = irqs; |
| 273 | − else if (HAS_HECI_GSC(gt->i915)) | |
| 285 | + heci_mask = GSC_IRQ_INTF(1); /* HECI2 IRQ for SW Proxy*/ | |
| 286 | + } else if (HAS_HECI_GSC(gt->i915)) { | |
| 274 | 287 | gsc_mask = GSC_IRQ_INTF(0) | GSC_IRQ_INTF(1); |
| 288 | + } | |
| 275 | 289 | |
| 276 | 290 | BUILD_BUG_ON(irqs & 0xffff0000); |
| 277 | 291 | |
| @@ -281,7 +295,7 @@ void gen11_gt_irq_postinstall(struct intel_gt *gt) · 3 unmodified lines | ||
| 281 | 295 | if (CCS_MASK(gt)) |
| 282 | 296 | intel_uncore_write(uncore, GEN12_CCS_RSVD_INTR_ENABLE, smask); |
| 283 | 297 | if (gsc_mask) |
| 284 | − intel_uncore_write(uncore, GEN11_GUNIT_CSME_INTR_ENABLE, gsc_mask); | |
| 298 | + intel_uncore_write(uncore, GEN11_GUNIT_CSME_INTR_ENABLE, gsc_mask | heci_mask); | |
| 285 | 299 | |
| 286 | 300 | /* Unmask irqs on RCS, BCS, VCS and VECS engines. */ |
| 287 | 301 | intel_uncore_write(uncore, GEN11_RCS0_RSVD_INTR_MASK, ~smask); |
| @@ -309,6 +323,9 @@ void gen11_gt_irq_postinstall(struct intel_gt *gt) · 21 unmodified lines | ||
| 309 | 323 | intel_uncore_write(uncore, GEN12_CCS2_CCS3_INTR_MASK, ~dmask); |
| 310 | 324 | if (gsc_mask) |
| 311 | 325 | intel_uncore_write(uncore, GEN11_GUNIT_CSME_INTR_MASK, ~gsc_mask); |
| 326 | + if (heci_mask) | |
| 327 | + intel_uncore_write(uncore, GEN12_HECI2_RSVD_INTR_MASK, | |
| 328 | + ~REG_FIELD_PREP(ENGINE1_MASK, heci_mask)); | |
| 312 | 329 | |
| 313 | 330 | if (guc_mask) { |
| 314 | 331 | /* the enable bit is common for both GTs but the masks are separate */ |
| @@ -87,7 +87,7 @@ static int __gt_unpark(struct intel_wakeref *wf) · 86 unmodified lines | ||
| 87 | 87 | |
| 88 | 88 | intel_rc6_unpark(>->rc6); |
| 89 | 89 | intel_rps_unpark(>->rps); |
| 90 | − i915_pmu_gt_unparked(i915); | |
| 90 | + i915_pmu_gt_unparked(gt); | |
| 91 | 91 | intel_guc_busyness_unpark(gt); |
| 92 | 92 | |
| 93 | 93 | intel_gt_unpark_requests(gt); |
| @@ -109,7 +109,7 @@ static int __gt_park(struct intel_wakeref *wf) · 15 unmodified lines | ||
| 109 | 109 | |
| 110 | 110 | intel_guc_busyness_park(gt); |
| 111 | 111 | i915_vma_parked(gt); |
| 112 | − i915_pmu_gt_parked(i915); | |
| 112 | + i915_pmu_gt_parked(gt); | |
| 113 | 113 | intel_rps_park(>->rps); |
| 114 | 114 | intel_rc6_park(>->rc6); |
| 115 | 115 | |
| @@ -539,7 +539,10 @@ static bool rps_eval(void *data) · 538 unmodified lines | ||
| 539 | 539 | { |
| 540 | 540 | struct intel_gt *gt = data; |
| 541 | 541 | |
| 542 | − return HAS_RPS(gt->i915); | |
| 542 | + if (intel_guc_slpc_is_used(>->uc.guc)) | |
| 543 | + return false; | |
| 544 | + else | |
| 545 | + return HAS_RPS(gt->i915); | |
| 543 | 546 | } |
| 544 | 547 | |
| 545 | 548 | DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(rps_boost); |
| @@ -357,7 +357,11 @@ · 356 unmodified lines | ||
| 357 | 357 | #define GEN7_TLB_RD_ADDR _MMIO(0x4700) |
| 358 | 358 | |
| 359 | 359 | #define GEN12_PAT_INDEX(index) _MMIO(0x4800 + (index) * 4) |
| 360 | −#define XEHP_PAT_INDEX(index) MCR_REG(0x4800 + (index) * 4) | |
| 360 | +#define _PAT_INDEX(index) _PICK_EVEN_2RANGES(index, 8, \ | |
| 361 | + 0x4800, 0x4804, \ | |
| 362 | + 0x4848, 0x484c) | |
| 363 | +#define XEHP_PAT_INDEX(index) MCR_REG(_PAT_INDEX(index)) | |
| 364 | +#define XELPMP_PAT_INDEX(index) _MMIO(_PAT_INDEX(index)) | |
| 361 | 365 | |
| 362 | 366 | #define XEHP_TILE0_ADDR_RANGE MCR_REG(0x4900) |
| 363 | 367 | #define XEHP_TILE_LMEM_RANGE_SHIFT 8 |
| @@ -526,6 +530,11 @@ · 162 unmodified lines | ||
| 526 | 530 | |
| 527 | 531 | #define GEN8_RC6_CTX_INFO _MMIO(0x8504) |
| 528 | 532 | |
| 533 | +#define GEN12_SQCNT1 _MMIO(0x8718) | |
| 534 | +#define GEN12_SQCNT1_PMON_ENABLE REG_BIT(30) | |
| 535 | +#define GEN12_SQCNT1_OABPC REG_BIT(29) | |
| 536 | +#define GEN12_STRICT_RAR_ENABLE REG_BIT(23) | |
| 537 | + | |
| 529 | 538 | #define XEHP_SQCM MCR_REG(0x8724) |
| 530 | 539 | #define EN_32B_ACCESS REG_BIT(30) |
| 531 | 540 | |
| @@ -1588,6 +1597,7 @@ · 1056 unmodified lines | ||
| 1588 | 1597 | |
| 1589 | 1598 | #define GEN11_GT_INTR_DW(x) _MMIO(0x190018 + ((x) * 4)) |
| 1590 | 1599 | #define GEN11_CSME (31) |
| 1600 | +#define GEN12_HECI_2 (30) | |
| 1591 | 1601 | #define GEN11_GUNIT (28) |
| 1592 | 1602 | #define GEN11_GUC (25) |
| 1593 | 1603 | #define MTL_MGUC (24) |
| @@ -1629,6 +1639,7 @@ · 35 unmodified lines | ||
| 1629 | 1639 | /* irq instances for OTHER_CLASS */ |
| 1630 | 1640 | #define OTHER_GUC_INSTANCE 0 |
| 1631 | 1641 | #define OTHER_GTPM_INSTANCE 1 |
| 1642 | +#define OTHER_GSC_HECI_2_INSTANCE 3 | |
| 1632 | 1643 | #define OTHER_KCR_INSTANCE 4 |
| 1633 | 1644 | #define OTHER_GSC_INSTANCE 6 |
| 1634 | 1645 | #define OTHER_MEDIA_GUC_INSTANCE 16 |
| @@ -1644,6 +1655,7 @@ · 9 unmodified lines | ||
| 1644 | 1655 | #define GEN12_VCS6_VCS7_INTR_MASK _MMIO(0x1900b4) |
| 1645 | 1656 | #define GEN11_VECS0_VECS1_INTR_MASK _MMIO(0x1900d0) |
| 1646 | 1657 | #define GEN12_VECS2_VECS3_INTR_MASK _MMIO(0x1900d4) |
| 1658 | +#define GEN12_HECI2_RSVD_INTR_MASK _MMIO(0x1900e4) | |
| 1647 | 1659 | #define GEN11_GUC_SG_INTR_MASK _MMIO(0x1900e8) |
| 1648 | 1660 | #define MTL_GUC_MGUC_INTR_MASK _MMIO(0x1900e8) /* MTL+ */ |
| 1649 | 1661 | #define GEN11_GPM_WGBOXPERF_INTR_MASK _MMIO(0x1900ec) |
| @@ -451,6 +451,33 @@ static ssize_t punit_req_freq_mhz_show(struct kobject *kobj, · 450 unmodified lines | ||
| 451 | 451 | return sysfs_emit(buff, "%u\n", preq); |
| 452 | 452 | } |
| 453 | 453 | |
| 454 | +static ssize_t slpc_ignore_eff_freq_show(struct kobject *kobj, | |
| 455 | + struct kobj_attribute *attr, | |
| 456 | + char *buff) | |
| 457 | +{ | |
| 458 | + struct intel_gt *gt = intel_gt_sysfs_get_drvdata(kobj, attr->attr.name); | |
| 459 | + struct intel_guc_slpc *slpc = >->uc.guc.slpc; | |
| 460 | + | |
| 461 | + return sysfs_emit(buff, "%u\n", slpc->ignore_eff_freq); | |
| 462 | +} | |
| 463 | + | |
| 464 | +static ssize_t slpc_ignore_eff_freq_store(struct kobject *kobj, | |
| 465 | + struct kobj_attribute *attr, | |
| 466 | + const char *buff, size_t count) | |
| 467 | +{ | |
| 468 | + struct intel_gt *gt = intel_gt_sysfs_get_drvdata(kobj, attr->attr.name); | |
| 469 | + struct intel_guc_slpc *slpc = >->uc.guc.slpc; | |
| 470 | + int err; | |
| 471 | + u32 val; | |
| 472 | + | |
| 473 | + err = kstrtou32(buff, 0, &val); | |
| 474 | + if (err) | |
| 475 | + return err; | |
| 476 | + | |
| 477 | + err = intel_guc_slpc_set_ignore_eff_freq(slpc, val); | |
| 478 | + return err ?: count; | |
| 479 | +} | |
| 480 | + | |
| 454 | 481 | struct intel_gt_bool_throttle_attr { |
| 455 | 482 | struct attribute attr; |
| 456 | 483 | ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, |
| @@ -663,6 +690,8 @@ static struct kobj_attribute attr_media_freq_factor_scale = · 206 unmodified lines | ||
| 663 | 690 | INTEL_GT_ATTR_RO(media_RP0_freq_mhz); |
| 664 | 691 | INTEL_GT_ATTR_RO(media_RPn_freq_mhz); |
| 665 | 692 | |
| 693 | +INTEL_GT_ATTR_RW(slpc_ignore_eff_freq); | |
| 694 | + | |
| 666 | 695 | static const struct attribute *media_perf_power_attrs[] = { |
| 667 | 696 | &attr_media_freq_factor.attr, |
| 668 | 697 | &attr_media_freq_factor_scale.attr, |
| @@ -744,6 +773,12 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj) · 75 unmodified lines | ||
| 744 | 773 | if (ret) |
| 745 | 774 | gt_warn(gt, "failed to create punit_req_freq_mhz sysfs (%pe)", ERR_PTR(ret)); |
| 746 | 775 | |
| 776 | + if (intel_uc_uses_guc_slpc(>->uc)) { | |
| 777 | + ret = sysfs_create_file(kobj, &attr_slpc_ignore_eff_freq.attr); | |
| 778 | + if (ret) | |
| 779 | + gt_warn(gt, "failed to create ignore_eff_freq sysfs (%pe)", ERR_PTR(ret)); | |
| 780 | + } | |
| 781 | + | |
| 747 | 782 | if (i915_mmio_reg_valid(intel_gt_perf_limit_reasons_reg(gt))) { |
| 748 | 783 | ret = sysfs_create_files(kobj, throttle_reason_attrs); |
| 749 | 784 | if (ret) |
| @@ -468,6 +468,44 @@ void gtt_write_workarounds(struct intel_gt *gt) · 467 unmodified lines | ||
| 468 | 468 | } |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | +static void xelpmp_setup_private_ppat(struct intel_uncore *uncore) | |
| 472 | +{ | |
| 473 | + intel_uncore_write(uncore, XELPMP_PAT_INDEX(0), | |
| 474 | + MTL_PPAT_L4_0_WB); | |
| 475 | + intel_uncore_write(uncore, XELPMP_PAT_INDEX(1), | |
| 476 | + MTL_PPAT_L4_1_WT); | |
| 477 | + intel_uncore_write(uncore, XELPMP_PAT_INDEX(2), | |
| 478 | + MTL_PPAT_L4_3_UC); | |
| 479 | + intel_uncore_write(uncore, XELPMP_PAT_INDEX(3), | |
| 480 | + MTL_PPAT_L4_0_WB | MTL_2_COH_1W); | |
| 481 | + intel_uncore_write(uncore, XELPMP_PAT_INDEX(4), | |
| 482 | + MTL_PPAT_L4_0_WB | MTL_3_COH_2W); | |
| 483 | + | |
| 484 | + /* | |
| 485 | + * Remaining PAT entries are left at the hardware-default | |
| 486 | + * fully-cached setting | |
| 487 | + */ | |
| 488 | +} | |
| 489 | + | |
| 490 | +static void xelpg_setup_private_ppat(struct intel_gt *gt) | |
| 491 | +{ | |
| 492 | + intel_gt_mcr_multicast_write(gt, XEHP_PAT_INDEX(0), | |
| 493 | + MTL_PPAT_L4_0_WB); | |
| 494 | + intel_gt_mcr_multicast_write(gt, XEHP_PAT_INDEX(1), | |
| 495 | + MTL_PPAT_L4_1_WT); | |
| 496 | + intel_gt_mcr_multicast_write(gt, XEHP_PAT_INDEX(2), | |
| 497 | + MTL_PPAT_L4_3_UC); | |
| 498 | + intel_gt_mcr_multicast_write(gt, XEHP_PAT_INDEX(3), | |
| 499 | + MTL_PPAT_L4_0_WB | MTL_2_COH_1W); | |
| 500 | + intel_gt_mcr_multicast_write(gt, XEHP_PAT_INDEX(4), | |
| 501 | + MTL_PPAT_L4_0_WB | MTL_3_COH_2W); | |
| 502 | + | |
| 503 | + /* | |
| 504 | + * Remaining PAT entries are left at the hardware-default | |
| 505 | + * fully-cached setting | |
| 506 | + */ | |
| 507 | +} | |
| 508 | + | |
| 471 | 509 | static void tgl_setup_private_ppat(struct intel_uncore *uncore) |
| 472 | 510 | { |
| 473 | 511 | /* TGL doesn't support LLC or AGE settings */ |
| @@ -603,7 +641,14 @@ void setup_private_pat(struct intel_gt *gt) · 129 unmodified lines | ||
| 603 | 641 | |
| 604 | 642 | GEM_BUG_ON(GRAPHICS_VER(i915) < 8); |
| 605 | 643 | |
| 606 | − if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) | |
| 644 | + if (gt->type == GT_MEDIA) { | |
| 645 | + xelpmp_setup_private_ppat(gt->uncore); | |
| 646 | + return; | |
| 647 | + } | |
| 648 | + | |
| 649 | + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70)) | |
| 650 | + xelpg_setup_private_ppat(gt); | |
| 651 | + else if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) | |
| 607 | 652 | xehp_setup_private_ppat(gt); |
| 608 | 653 | else if (GRAPHICS_VER(i915) >= 12) |
| 609 | 654 | tgl_setup_private_ppat(uncore); |
| @@ -88,9 +88,17 @@ typedef u64 gen8_pte_t; · 87 unmodified lines | ||
| 88 | 88 | #define BYT_PTE_SNOOPED_BY_CPU_CACHES REG_BIT(2) |
| 89 | 89 | #define BYT_PTE_WRITEABLE REG_BIT(1) |
| 90 | 90 | |
| 91 | +#define MTL_PPGTT_PTE_PAT3 BIT_ULL(62) | |
| 91 | 92 | #define GEN12_PPGTT_PTE_LM BIT_ULL(11) |
| 93 | +#define GEN12_PPGTT_PTE_PAT2 BIT_ULL(7) | |
| 94 | +#define GEN12_PPGTT_PTE_PAT1 BIT_ULL(4) | |
| 95 | +#define GEN12_PPGTT_PTE_PAT0 BIT_ULL(3) | |
| 92 | 96 | |
| 93 | −#define GEN12_GGTT_PTE_LM BIT_ULL(1) | |
| 97 | +#define GEN12_GGTT_PTE_LM BIT_ULL(1) | |
| 98 | +#define MTL_GGTT_PTE_PAT0 BIT_ULL(52) | |
| 99 | +#define MTL_GGTT_PTE_PAT1 BIT_ULL(53) | |
| 100 | +#define GEN12_GGTT_PTE_ADDR_MASK GENMASK_ULL(45, 12) | |
| 101 | +#define MTL_GGTT_PTE_PAT_MASK GENMASK_ULL(53, 52) | |
| 94 | 102 | |
| 95 | 103 | #define GEN12_PDE_64K BIT(6) |
| 96 | 104 | #define GEN12_PTE_PS64 BIT(8) |
| @@ -147,7 +155,13 @@ typedef u64 gen8_pte_t; · 50 unmodified lines | ||
| 147 | 155 | #define GEN8_PDE_IPS_64K BIT(11) |
| 148 | 156 | #define GEN8_PDE_PS_2M BIT(7) |
| 149 | 157 | |
| 150 | −enum i915_cache_level; | |
| 158 | +#define MTL_PPAT_L4_CACHE_POLICY_MASK REG_GENMASK(3, 2) | |
| 159 | +#define MTL_PAT_INDEX_COH_MODE_MASK REG_GENMASK(1, 0) | |
| 160 | +#define MTL_PPAT_L4_3_UC REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 3) | |
| 161 | +#define MTL_PPAT_L4_1_WT REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 1) | |
| 162 | +#define MTL_PPAT_L4_0_WB REG_FIELD_PREP(MTL_PPAT_L4_CACHE_POLICY_MASK, 0) | |
| 163 | +#define MTL_3_COH_2W REG_FIELD_PREP(MTL_PAT_INDEX_COH_MODE_MASK, 3) | |
| 164 | +#define MTL_2_COH_1W REG_FIELD_PREP(MTL_PAT_INDEX_COH_MODE_MASK, 2) | |
| 151 | 165 | |
| 152 | 166 | struct drm_i915_gem_object; |
| 153 | 167 | struct i915_fence_reg; |
| @@ -216,7 +230,7 @@ struct i915_vma_ops { · 62 unmodified lines | ||
| 216 | 230 | void (*bind_vma)(struct i915_address_space *vm, |
| 217 | 231 | struct i915_vm_pt_stash *stash, |
| 218 | 232 | struct i915_vma_resource *vma_res, |
| 219 | − enum i915_cache_level cache_level, | |
| 233 | + unsigned int pat_index, | |
| 220 | 234 | u32 flags); |
| 221 | 235 | /* |
| 222 | 236 | * Unmap an object from an address space. This usually consists of |
| @@ -288,7 +302,7 @@ struct i915_address_space { · 65 unmodified lines | ||
| 288 | 302 | (*alloc_scratch_dma)(struct i915_address_space *vm, int sz); |
| 289 | 303 | |
| 290 | 304 | u64 (*pte_encode)(dma_addr_t addr, |
| 291 | − enum i915_cache_level level, | |
| 305 | + unsigned int pat_index, | |
| 292 | 306 | u32 flags); /* Create a valid PTE */ |
| 293 | 307 | #define PTE_READ_ONLY BIT(0) |
| 294 | 308 | #define PTE_LM BIT(1) |
| @@ -303,20 +317,20 @@ struct i915_address_space { · 8 unmodified lines | ||
| 303 | 317 | void (*insert_page)(struct i915_address_space *vm, |
| 304 | 318 | dma_addr_t addr, |
| 305 | 319 | u64 offset, |
| 306 | − enum i915_cache_level cache_level, | |
| 320 | + unsigned int pat_index, | |
| 307 | 321 | u32 flags); |
| 308 | 322 | void (*insert_entries)(struct i915_address_space *vm, |
| 309 | 323 | struct i915_vma_resource *vma_res, |
| 310 | − enum i915_cache_level cache_level, | |
| 324 | + unsigned int pat_index, | |
| 311 | 325 | u32 flags); |
| 312 | 326 | void (*raw_insert_page)(struct i915_address_space *vm, |
| 313 | 327 | dma_addr_t addr, |
| 314 | 328 | u64 offset, |
| 315 | − enum i915_cache_level cache_level, | |
| 329 | + unsigned int pat_index, | |
| 316 | 330 | u32 flags); |
| 317 | 331 | void (*raw_insert_entries)(struct i915_address_space *vm, |
| 318 | 332 | struct i915_vma_resource *vma_res, |
| 319 | − enum i915_cache_level cache_level, | |
| 333 | + unsigned int pat_index, | |
| 320 | 334 | u32 flags); |
| 321 | 335 | void (*cleanup)(struct i915_address_space *vm); |
| 322 | 336 | |
| @@ -493,7 +507,7 @@ static inline void i915_vm_put(struct i915_address_space *vm) · 170 unmodified lines | ||
| 493 | 507 | |
| 494 | 508 | /** |
| 495 | 509 | * i915_vm_resv_put - Release a reference on the vm's reservation lock |
| 496 | − * @resv: Pointer to a reservation lock obtained from i915_vm_resv_get() | |
| 510 | + * @vm: The vm whose reservation lock reference we want to release | |
| 497 | 511 | */ |
| 498 | 512 | static inline void i915_vm_resv_put(struct i915_address_space *vm) |
| 499 | 513 | { |
| @@ -563,7 +577,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt, · 63 unmodified lines | ||
| 563 | 577 | void intel_ggtt_bind_vma(struct i915_address_space *vm, |
| 564 | 578 | struct i915_vm_pt_stash *stash, |
| 565 | 579 | struct i915_vma_resource *vma_res, |
| 566 | − enum i915_cache_level cache_level, | |
| 580 | + unsigned int pat_index, | |
| 567 | 581 | u32 flags); |
| 568 | 582 | void intel_ggtt_unbind_vma(struct i915_address_space *vm, |
| 569 | 583 | struct i915_vma_resource *vma_res); |
| @@ -641,7 +655,7 @@ void gen6_ggtt_invalidate(struct i915_ggtt *ggtt); · 71 unmodified lines | ||
| 641 | 655 | void ppgtt_bind_vma(struct i915_address_space *vm, |
| 642 | 656 | struct i915_vm_pt_stash *stash, |
| 643 | 657 | struct i915_vma_resource *vma_res, |
| 644 | − enum i915_cache_level cache_level, | |
| 658 | + unsigned int pat_index, | |
| 645 | 659 | u32 flags); |
| 646 | 660 | void ppgtt_unbind_vma(struct i915_address_space *vm, |
| 647 | 661 | struct i915_vma_resource *vma_res); |
| @@ -1370,7 +1370,9 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs) · 1369 unmodified lines | ||
| 1370 | 1370 | cs, GEN12_GFX_CCS_AUX_NV); |
| 1371 | 1371 | |
| 1372 | 1372 | /* Wa_16014892111 */ |
| 1373 | − if (IS_DG2(ce->engine->i915)) | |
| 1373 | + if (IS_MTL_GRAPHICS_STEP(ce->engine->i915, M, STEP_A0, STEP_B0) || | |
| 1374 | + IS_MTL_GRAPHICS_STEP(ce->engine->i915, P, STEP_A0, STEP_B0) || | |
| 1375 | + IS_DG2(ce->engine->i915)) | |
| 1374 | 1376 | cs = dg2_emit_draw_watermark_setting(cs); |
| 1375 | 1377 | |
| 1376 | 1378 | return cs; |
| @@ -45,7 +45,9 @@ static void xehpsdv_toggle_pdes(struct i915_address_space *vm, · 44 unmodified lines | ||
| 45 | 45 | * Insert a dummy PTE into every PT that will map to LMEM to ensure |
| 46 | 46 | * we have a correctly setup PDE structure for later use. |
| 47 | 47 | */ |
| 48 | − vm->insert_page(vm, 0, d->offset, I915_CACHE_NONE, PTE_LM); | |
| 48 | + vm->insert_page(vm, 0, d->offset, | |
| 49 | + i915_gem_get_pat_index(vm->i915, I915_CACHE_NONE), | |
| 50 | + PTE_LM); | |
| 49 | 51 | GEM_BUG_ON(!pt->is_compact); |
| 50 | 52 | d->offset += SZ_2M; |
| 51 | 53 | } |
| @@ -63,7 +65,9 @@ static void xehpsdv_insert_pte(struct i915_address_space *vm, · 11 unmodified lines | ||
| 63 | 65 | * alignment is 64K underneath for the pt, and we are careful |
| 64 | 66 | * not to access the space in the void. |
| 65 | 67 | */ |
| 66 | − vm->insert_page(vm, px_dma(pt), d->offset, I915_CACHE_NONE, PTE_LM); | |
| 68 | + vm->insert_page(vm, px_dma(pt), d->offset, | |
| 69 | + i915_gem_get_pat_index(vm->i915, I915_CACHE_NONE), | |
| 70 | + PTE_LM); | |
| 67 | 71 | d->offset += SZ_64K; |
| 68 | 72 | } |
| 69 | 73 | |
| @@ -73,7 +77,8 @@ static void insert_pte(struct i915_address_space *vm, · 3 unmodified lines | ||
| 73 | 77 | { |
| 74 | 78 | struct insert_pte_data *d = data; |
| 75 | 79 | |
| 76 | − vm->insert_page(vm, px_dma(pt), d->offset, I915_CACHE_NONE, | |
| 80 | + vm->insert_page(vm, px_dma(pt), d->offset, | |
| 81 | + i915_gem_get_pat_index(vm->i915, I915_CACHE_NONE), | |
| 77 | 82 | i915_gem_object_is_lmem(pt->base) ? PTE_LM : 0); |
| 78 | 83 | d->offset += PAGE_SIZE; |
| 79 | 84 | } |
| @@ -356,13 +361,13 @@ static int max_pte_pkt_size(struct i915_request *rq, int pkt) · 276 unmodified lines | ||
| 356 | 361 | |
| 357 | 362 | static int emit_pte(struct i915_request *rq, |
| 358 | 363 | struct sgt_dma *it, |
| 359 | − enum i915_cache_level cache_level, | |
| 364 | + unsigned int pat_index, | |
| 360 | 365 | bool is_lmem, |
| 361 | 366 | u64 offset, |
| 362 | 367 | int length) |
| 363 | 368 | { |
| 364 | 369 | bool has_64K_pages = HAS_64K_PAGES(rq->engine->i915); |
| 365 | − const u64 encode = rq->context->vm->pte_encode(0, cache_level, | |
| 370 | + const u64 encode = rq->context->vm->pte_encode(0, pat_index, | |
| 366 | 371 | is_lmem ? PTE_LM : 0); |
| 367 | 372 | struct intel_ring *ring = rq->ring; |
| 368 | 373 | int pkt, dword_length; |
| @@ -673,17 +678,17 @@ int · 304 unmodified lines | ||
| 673 | 678 | intel_context_migrate_copy(struct intel_context *ce, |
| 674 | 679 | const struct i915_deps *deps, |
| 675 | 680 | struct scatterlist *src, |
| 676 | − enum i915_cache_level src_cache_level, | |
| 681 | + unsigned int src_pat_index, | |
| 677 | 682 | bool src_is_lmem, |
| 678 | 683 | struct scatterlist *dst, |
| 679 | − enum i915_cache_level dst_cache_level, | |
| 684 | + unsigned int dst_pat_index, | |
| 680 | 685 | bool dst_is_lmem, |
| 681 | 686 | struct i915_request **out) |
| 682 | 687 | { |
| 683 | 688 | struct sgt_dma it_src = sg_sgt(src), it_dst = sg_sgt(dst), it_ccs; |
| 684 | 689 | struct drm_i915_private *i915 = ce->engine->i915; |
| 685 | 690 | u64 ccs_bytes_to_cpy = 0, bytes_to_cpy; |
| 686 | − enum i915_cache_level ccs_cache_level; | |
| 691 | + unsigned int ccs_pat_index; | |
| 687 | 692 | u32 src_offset, dst_offset; |
| 688 | 693 | u8 src_access, dst_access; |
| 689 | 694 | struct i915_request *rq; |
| @@ -707,12 +712,12 @@ intel_context_migrate_copy(struct intel_context *ce, · 17 unmodified lines | ||
| 707 | 712 | dst_sz = scatter_list_length(dst); |
| 708 | 713 | if (src_is_lmem) { |
| 709 | 714 | it_ccs = it_dst; |
| 710 | − ccs_cache_level = dst_cache_level; | |
| 715 | + ccs_pat_index = dst_pat_index; | |
| 711 | 716 | ccs_is_src = false; |
| 712 | 717 | } else if (dst_is_lmem) { |
| 713 | 718 | bytes_to_cpy = dst_sz; |
| 714 | 719 | it_ccs = it_src; |
| 715 | − ccs_cache_level = src_cache_level; | |
| 720 | + ccs_pat_index = src_pat_index; | |
| 716 | 721 | ccs_is_src = true; |
| 717 | 722 | } |
| 718 | 723 | |
| @@ -773,7 +778,7 @@ intel_context_migrate_copy(struct intel_context *ce, · 54 unmodified lines | ||
| 773 | 778 | src_sz = calculate_chunk_sz(i915, src_is_lmem, |
| 774 | 779 | bytes_to_cpy, ccs_bytes_to_cpy); |
| 775 | 780 | |
| 776 | − len = emit_pte(rq, &it_src, src_cache_level, src_is_lmem, | |
| 781 | + len = emit_pte(rq, &it_src, src_pat_index, src_is_lmem, | |
| 777 | 782 | src_offset, src_sz); |
| 778 | 783 | if (!len) { |
| 779 | 784 | err = -EINVAL; |
| @@ -784,7 +789,7 @@ intel_context_migrate_copy(struct intel_context *ce, · 4 unmodified lines | ||
| 784 | 789 | goto out_rq; |
| 785 | 790 | } |
| 786 | 791 | |
| 787 | − err = emit_pte(rq, &it_dst, dst_cache_level, dst_is_lmem, | |
| 792 | + err = emit_pte(rq, &it_dst, dst_pat_index, dst_is_lmem, | |
| 788 | 793 | dst_offset, len); |
| 789 | 794 | if (err < 0) |
| 790 | 795 | goto out_rq; |
| @@ -811,7 +816,7 @@ intel_context_migrate_copy(struct intel_context *ce, · 20 unmodified lines | ||
| 811 | 816 | goto out_rq; |
| 812 | 817 | |
| 813 | 818 | ccs_sz = GET_CCS_BYTES(i915, len); |
| 814 | − err = emit_pte(rq, &it_ccs, ccs_cache_level, false, | |
| 819 | + err = emit_pte(rq, &it_ccs, ccs_pat_index, false, | |
| 815 | 820 | ccs_is_src ? src_offset : dst_offset, |
| 816 | 821 | ccs_sz); |
| 817 | 822 | if (err < 0) |
| @@ -920,7 +925,7 @@ static int emit_clear(struct i915_request *rq, u32 offset, int size, · 102 unmodified lines | ||
| 920 | 925 | |
| 921 | 926 | GEM_BUG_ON(size >> PAGE_SHIFT > S16_MAX); |
| 922 | 927 | |
| 923 | − if (HAS_FLAT_CCS(i915) && ver >= 12) | |
| 928 | + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) | |
| 924 | 929 | ring_sz = XY_FAST_COLOR_BLT_DW; |
| 925 | 930 | else if (ver >= 8) |
| 926 | 931 | ring_sz = 8; |
| @@ -931,7 +936,7 @@ static int emit_clear(struct i915_request *rq, u32 offset, int size, · 4 unmodified lines | ||
| 931 | 936 | if (IS_ERR(cs)) |
| 932 | 937 | return PTR_ERR(cs); |
| 933 | 938 | |
| 934 | − if (HAS_FLAT_CCS(i915) && ver >= 12) { | |
| 939 | + if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) { | |
| 935 | 940 | *cs++ = XY_FAST_COLOR_BLT_CMD | XY_FAST_COLOR_BLT_DEPTH_32 | |
| 936 | 941 | (XY_FAST_COLOR_BLT_DW - 2); |
| 937 | 942 | *cs++ = FIELD_PREP(XY_FAST_COLOR_BLT_MOCS_MASK, mocs) | |
| @@ -979,7 +984,7 @@ int · 41 unmodified lines | ||
| 979 | 984 | intel_context_migrate_clear(struct intel_context *ce, |
| 980 | 985 | const struct i915_deps *deps, |
| 981 | 986 | struct scatterlist *sg, |
| 982 | − enum i915_cache_level cache_level, | |
| 987 | + unsigned int pat_index, | |
| 983 | 988 | bool is_lmem, |
| 984 | 989 | u32 value, |
| 985 | 990 | struct i915_request **out) |
| @@ -1027,7 +1032,7 @@ intel_context_migrate_clear(struct intel_context *ce, · 41 unmodified lines | ||
| 1027 | 1032 | if (err) |
| 1028 | 1033 | goto out_rq; |
| 1029 | 1034 | |
| 1030 | − len = emit_pte(rq, &it, cache_level, is_lmem, offset, CHUNK_SZ); | |
| 1035 | + len = emit_pte(rq, &it, pat_index, is_lmem, offset, CHUNK_SZ); | |
| 1031 | 1036 | if (len <= 0) { |
| 1032 | 1037 | err = len; |
| 1033 | 1038 | goto out_rq; |
| @@ -1074,10 +1079,10 @@ int intel_migrate_copy(struct intel_migrate *m, · 40 unmodified lines | ||
| 1074 | 1079 | struct i915_gem_ww_ctx *ww, |
| 1075 | 1080 | const struct i915_deps *deps, |
| 1076 | 1081 | struct scatterlist *src, |
| 1077 | − enum i915_cache_level src_cache_level, | |
| 1082 | + unsigned int src_pat_index, | |
| 1078 | 1083 | bool src_is_lmem, |
| 1079 | 1084 | struct scatterlist *dst, |
| 1080 | − enum i915_cache_level dst_cache_level, | |
| 1085 | + unsigned int dst_pat_index, | |
| 1081 | 1086 | bool dst_is_lmem, |
| 1082 | 1087 | struct i915_request **out) |
| 1083 | 1088 | { |
| @@ -1098,8 +1103,8 @@ int intel_migrate_copy(struct intel_migrate *m, · 14 unmodified lines | ||
| 1098 | 1103 | goto out; |
| 1099 | 1104 | |
| 1100 | 1105 | err = intel_context_migrate_copy(ce, deps, |
| 1101 | − src, src_cache_level, src_is_lmem, | |
| 1102 | − dst, dst_cache_level, dst_is_lmem, | |
| 1106 | + src, src_pat_index, src_is_lmem, | |
| 1107 | + dst, dst_pat_index, dst_is_lmem, | |
| 1103 | 1108 | out); |
| 1104 | 1109 | |
| 1105 | 1110 | intel_context_unpin(ce); |
| @@ -1113,7 +1118,7 @@ intel_migrate_clear(struct intel_migrate *m, · 7 unmodified lines | ||
| 1113 | 1118 | struct i915_gem_ww_ctx *ww, |
| 1114 | 1119 | const struct i915_deps *deps, |
| 1115 | 1120 | struct scatterlist *sg, |
| 1116 | − enum i915_cache_level cache_level, | |
| 1121 | + unsigned int pat_index, | |
| 1117 | 1122 | bool is_lmem, |
| 1118 | 1123 | u32 value, |
| 1119 | 1124 | struct i915_request **out) |
| @@ -1134,7 +1139,7 @@ intel_migrate_clear(struct intel_migrate *m, · 14 unmodified lines | ||
| 1134 | 1139 | if (err) |
| 1135 | 1140 | goto out; |
| 1136 | 1141 | |
| 1137 | − err = intel_context_migrate_clear(ce, deps, sg, cache_level, | |
| 1142 | + err = intel_context_migrate_clear(ce, deps, sg, pat_index, | |
| 1138 | 1143 | is_lmem, value, out); |
| 1139 | 1144 | |
| 1140 | 1145 | intel_context_unpin(ce); |
| @@ -16,7 +16,6 @@ struct i915_request; · 15 unmodified lines | ||
| 16 | 16 | struct i915_gem_ww_ctx; |
| 17 | 17 | struct intel_gt; |
| 18 | 18 | struct scatterlist; |
| 19 | −enum i915_cache_level; | |
| 20 | 19 | |
| 21 | 20 | int intel_migrate_init(struct intel_migrate *m, struct intel_gt *gt); |
| 22 | 21 | |
| @@ -26,20 +25,20 @@ int intel_migrate_copy(struct intel_migrate *m, · 3 unmodified lines | ||
| 26 | 25 | struct i915_gem_ww_ctx *ww, |
| 27 | 26 | const struct i915_deps *deps, |
| 28 | 27 | struct scatterlist *src, |
| 29 | − enum i915_cache_level src_cache_level, | |
| 28 | + unsigned int src_pat_index, | |
| 30 | 29 | bool src_is_lmem, |
| 31 | 30 | struct scatterlist *dst, |
| 32 | − enum i915_cache_level dst_cache_level, | |
| 31 | + unsigned int dst_pat_index, | |
| 33 | 32 | bool dst_is_lmem, |
| 34 | 33 | struct i915_request **out); |
| 35 | 34 | |
| 36 | 35 | int intel_context_migrate_copy(struct intel_context *ce, |
| 37 | 36 | const struct i915_deps *deps, |
| 38 | 37 | struct scatterlist *src, |
| 39 | − enum i915_cache_level src_cache_level, | |
| 38 | + unsigned int src_pat_index, | |
| 40 | 39 | bool src_is_lmem, |
| 41 | 40 | struct scatterlist *dst, |
| 42 | − enum i915_cache_level dst_cache_level, | |
| 41 | + unsigned int dst_pat_index, | |
| 43 | 42 | bool dst_is_lmem, |
| 44 | 43 | struct i915_request **out); |
| 45 | 44 | |
| @@ -48,7 +47,7 @@ intel_migrate_clear(struct intel_migrate *m, · 2 unmodified lines | ||
| 48 | 47 | struct i915_gem_ww_ctx *ww, |
| 49 | 48 | const struct i915_deps *deps, |
| 50 | 49 | struct scatterlist *sg, |
| 51 | − enum i915_cache_level cache_level, | |
| 50 | + unsigned int pat_index, | |
| 52 | 51 | bool is_lmem, |
| 53 | 52 | u32 value, |
| 54 | 53 | struct i915_request **out); |
| @@ -56,7 +55,7 @@ int · 1 unmodified line | ||
| 56 | 55 | intel_context_migrate_clear(struct intel_context *ce, |
| 57 | 56 | const struct i915_deps *deps, |
| 58 | 57 | struct scatterlist *sg, |
| 59 | − enum i915_cache_level cache_level, | |
| 58 | + unsigned int pat_index, | |
| 60 | 59 | bool is_lmem, |
| 61 | 60 | u32 value, |
| 62 | 61 | struct i915_request **out); |
| @@ -40,6 +40,10 @@ struct drm_i915_mocs_table { · 39 unmodified lines | ||
| 40 | 40 | #define LE_COS(value) ((value) << 15) |
| 41 | 41 | #define LE_SSE(value) ((value) << 17) |
| 42 | 42 | |
| 43 | +/* Defines for the tables (GLOB_MOCS_0 - GLOB_MOCS_16) */ | |
| 44 | +#define _L4_CACHEABILITY(value) ((value) << 2) | |
| 45 | +#define IG_PAT(value) ((value) << 8) | |
| 46 | + | |
| 43 | 47 | /* Defines for the tables (LNCFMOCS0 - LNCFMOCS31) - two entries per word */ |
| 44 | 48 | #define L3_ESC(value) ((value) << 0) |
| 45 | 49 | #define L3_SCC(value) ((value) << 1) |
| @@ -50,6 +54,7 @@ struct drm_i915_mocs_table { · 4 unmodified lines | ||
| 50 | 54 | /* Helper defines */ |
| 51 | 55 | #define GEN9_NUM_MOCS_ENTRIES 64 /* 63-64 are reserved, but configured. */ |
| 52 | 56 | #define PVC_NUM_MOCS_ENTRIES 3 |
| 57 | +#define MTL_NUM_MOCS_ENTRIES 16 | |
| 53 | 58 | |
| 54 | 59 | /* (e)LLC caching options */ |
| 55 | 60 | /* |
| @@ -73,6 +78,12 @@ struct drm_i915_mocs_table { · 17 unmodified lines | ||
| 73 | 78 | #define L3_2_RESERVED _L3_CACHEABILITY(2) |
| 74 | 79 | #define L3_3_WB _L3_CACHEABILITY(3) |
| 75 | 80 | |
| 81 | +/* L4 caching options */ | |
| 82 | +#define L4_0_WB _L4_CACHEABILITY(0) | |
| 83 | +#define L4_1_WT _L4_CACHEABILITY(1) | |
| 84 | +#define L4_2_RESERVED _L4_CACHEABILITY(2) | |
| 85 | +#define L4_3_UC _L4_CACHEABILITY(3) | |
| 86 | + | |
| 76 | 87 | #define MOCS_ENTRY(__idx, __control_value, __l3cc_value) \ |
| 77 | 88 | [__idx] = { \ |
| 78 | 89 | .control_value = __control_value, \ |
| @@ -416,6 +427,57 @@ static const struct drm_i915_mocs_entry pvc_mocs_table[] = { · 337 unmodified lines | ||
| 416 | 427 | MOCS_ENTRY(2, 0, L3_3_WB), |
| 417 | 428 | }; |
| 418 | 429 | |
| 430 | +static const struct drm_i915_mocs_entry mtl_mocs_table[] = { | |
| 431 | + /* Error - Reserved for Non-Use */ | |
| 432 | + MOCS_ENTRY(0, | |
| 433 | + IG_PAT(0), | |
| 434 | + L3_LKUP(1) | L3_3_WB), | |
| 435 | + /* Cached - L3 + L4 */ | |
| 436 | + MOCS_ENTRY(1, | |
| 437 | + IG_PAT(1), | |
| 438 | + L3_LKUP(1) | L3_3_WB), | |
| 439 | + /* L4 - GO:L3 */ | |
| 440 | + MOCS_ENTRY(2, | |
| 441 | + IG_PAT(1), | |
| 442 | + L3_LKUP(1) | L3_1_UC), | |
| 443 | + /* Uncached - GO:L3 */ | |
| 444 | + MOCS_ENTRY(3, | |
| 445 | + IG_PAT(1) | L4_3_UC, | |
| 446 | + L3_LKUP(1) | L3_1_UC), | |
| 447 | + /* L4 - GO:Mem */ | |
| 448 | + MOCS_ENTRY(4, | |
| 449 | + IG_PAT(1), | |
| 450 | + L3_LKUP(1) | L3_GLBGO(1) | L3_1_UC), | |
| 451 | + /* Uncached - GO:Mem */ | |
| 452 | + MOCS_ENTRY(5, | |
| 453 | + IG_PAT(1) | L4_3_UC, | |
| 454 | + L3_LKUP(1) | L3_GLBGO(1) | L3_1_UC), | |
| 455 | + /* L4 - L3:NoLKUP; GO:L3 */ | |
| 456 | + MOCS_ENTRY(6, | |
| 457 | + IG_PAT(1), | |
| 458 | + L3_1_UC), | |
| 459 | + /* Uncached - L3:NoLKUP; GO:L3 */ | |
| 460 | + MOCS_ENTRY(7, | |
| 461 | + IG_PAT(1) | L4_3_UC, | |
| 462 | + L3_1_UC), | |
| 463 | + /* L4 - L3:NoLKUP; GO:Mem */ | |
| 464 | + MOCS_ENTRY(8, | |
| 465 | + IG_PAT(1), | |
| 466 | + L3_GLBGO(1) | L3_1_UC), | |
| 467 | + /* Uncached - L3:NoLKUP; GO:Mem */ | |
| 468 | + MOCS_ENTRY(9, | |
| 469 | + IG_PAT(1) | L4_3_UC, | |
| 470 | + L3_GLBGO(1) | L3_1_UC), | |
| 471 | + /* Display - L3; L4:WT */ | |
| 472 | + MOCS_ENTRY(14, | |
| 473 | + IG_PAT(1) | L4_1_WT, | |
| 474 | + L3_LKUP(1) | L3_3_WB), | |
| 475 | + /* CCS - Non-Displayable */ | |
| 476 | + MOCS_ENTRY(15, | |
| 477 | + IG_PAT(1), | |
| 478 | + L3_GLBGO(1) | L3_1_UC), | |
| 479 | +}; | |
| 480 | + | |
| 419 | 481 | enum { |
| 420 | 482 | HAS_GLOBAL_MOCS = BIT(0), |
| 421 | 483 | HAS_ENGINE_MOCS = BIT(1), |
| @@ -445,7 +507,13 @@ static unsigned int get_mocs_settings(const struct drm_i915_private *i915, · 23 unmodified lines | ||
| 445 | 507 | memset(table, 0, sizeof(struct drm_i915_mocs_table)); |
| 446 | 508 | |
| 447 | 509 | table->unused_entries_index = I915_MOCS_PTE; |
| 448 | − if (IS_PONTEVECCHIO(i915)) { | |
| 510 | + if (IS_METEORLAKE(i915)) { | |
| 511 | + table->size = ARRAY_SIZE(mtl_mocs_table); | |
| 512 | + table->table = mtl_mocs_table; | |
| 513 | + table->n_entries = MTL_NUM_MOCS_ENTRIES; | |
| 514 | + table->uc_index = 9; | |
| 515 | + table->unused_entries_index = 1; | |
| 516 | + } else if (IS_PONTEVECCHIO(i915)) { | |
| 449 | 517 | table->size = ARRAY_SIZE(pvc_mocs_table); |
| 450 | 518 | table->table = pvc_mocs_table; |
| 451 | 519 | table->n_entries = PVC_NUM_MOCS_ENTRIES; |
| @@ -181,7 +181,7 @@ struct i915_ppgtt *i915_ppgtt_create(struct intel_gt *gt, · 180 unmodified lines | ||
| 181 | 181 | void ppgtt_bind_vma(struct i915_address_space *vm, |
| 182 | 182 | struct i915_vm_pt_stash *stash, |
| 183 | 183 | struct i915_vma_resource *vma_res, |
| 184 | − enum i915_cache_level cache_level, | |
| 184 | + unsigned int pat_index, | |
| 185 | 185 | u32 flags) |
| 186 | 186 | { |
| 187 | 187 | u32 pte_flags; |
| @@ -199,7 +199,7 @@ void ppgtt_bind_vma(struct i915_address_space *vm, · 11 unmodified lines | ||
| 199 | 199 | if (vma_res->bi.lmem) |
| 200 | 200 | pte_flags |= PTE_LM; |
| 201 | 201 | |
| 202 | − vm->insert_entries(vm, vma_res, cache_level, pte_flags); | |
| 202 | + vm->insert_entries(vm, vma_res, pat_index, pte_flags); | |
| 203 | 203 | wmb(); |
| 204 | 204 | } |
| 205 | 205 | |
| @@ -53,11 +53,6 @@ static struct drm_i915_private *rc6_to_i915(struct intel_rc6 *rc) · 52 unmodified lines | ||
| 53 | 53 | return rc6_to_gt(rc)->i915; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | −static void set(struct intel_uncore *uncore, i915_reg_t reg, u32 val) | |
| 57 | −{ | |
| 58 | − intel_uncore_write_fw(uncore, reg, val); | |
| 59 | −} | |
| 60 | − | |
| 61 | 56 | static void gen11_rc6_enable(struct intel_rc6 *rc6) |
| 62 | 57 | { |
| 63 | 58 | struct intel_gt *gt = rc6_to_gt(rc6); |
| @@ -72,19 +67,19 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6) · 8 unmodified lines | ||
| 72 | 67 | */ |
| 73 | 68 | if (!intel_uc_uses_guc_rc(>->uc)) { |
| 74 | 69 | /* 2b: Program RC6 thresholds.*/ |
| 75 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16 | 85); | |
| 76 | − set(uncore, GEN10_MEDIA_WAKE_RATE_LIMIT, 150); | |
| 70 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16 | 85); | |
| 71 | + intel_uncore_write_fw(uncore, GEN10_MEDIA_WAKE_RATE_LIMIT, 150); | |
| 77 | 72 | |
| 78 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 79 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 73 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 74 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 80 | 75 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 81 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 76 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 82 | 77 | |
| 83 | − set(uncore, GUC_MAX_IDLE_COUNT, 0xA); | |
| 78 | + intel_uncore_write_fw(uncore, GUC_MAX_IDLE_COUNT, 0xA); | |
| 84 | 79 | |
| 85 | − set(uncore, GEN6_RC_SLEEP, 0); | |
| 80 | + intel_uncore_write_fw(uncore, GEN6_RC_SLEEP, 0); | |
| 86 | 81 | |
| 87 | − set(uncore, GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */ | |
| 82 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 50000); /* 50/125ms per EI */ | |
| 88 | 83 | } |
| 89 | 84 | |
| 90 | 85 | /* |
| @@ -105,8 +100,8 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6) · 14 unmodified lines | ||
| 105 | 100 | * Broadwell+, To be conservative, we want to factor in a context |
| 106 | 101 | * switch on top (due to ksoftirqd). |
| 107 | 102 | */ |
| 108 | − set(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS, 60); | |
| 109 | − set(uncore, GEN9_RENDER_PG_IDLE_HYSTERESIS, 60); | |
| 103 | + intel_uncore_write_fw(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS, 60); | |
| 104 | + intel_uncore_write_fw(uncore, GEN9_RENDER_PG_IDLE_HYSTERESIS, 60); | |
| 110 | 105 | |
| 111 | 106 | /* 3a: Enable RC6 |
| 112 | 107 | * |
| @@ -122,8 +117,14 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6) · 9 unmodified lines | ||
| 122 | 117 | GEN6_RC_CTL_RC6_ENABLE | |
| 123 | 118 | GEN6_RC_CTL_EI_MODE(1); |
| 124 | 119 | |
| 125 | − /* Wa_16011777198 - Render powergating must remain disabled */ | |
| 126 | − if (IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) || | |
| 120 | + /* | |
| 121 | + * Wa_16011777198 and BSpec 52698 - Render powergating must be off. | |
| 122 | + * FIXME BSpec is outdated, disabling powergating for MTL is just | |
| 123 | + * temporary wa and should be removed after fixing real cause | |
| 124 | + * of forcewake timeouts. | |
| 125 | + */ | |
| 126 | + if (IS_METEORLAKE(gt->i915) || | |
| 127 | + IS_DG2_GRAPHICS_STEP(gt->i915, G10, STEP_A0, STEP_C0) || | |
| 127 | 128 | IS_DG2_GRAPHICS_STEP(gt->i915, G11, STEP_A0, STEP_B0)) |
| 128 | 129 | pg_enable = |
| 129 | 130 | GEN9_MEDIA_PG_ENABLE | |
| @@ -141,7 +142,7 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6) · 11 unmodified lines | ||
| 141 | 142 | VDN_MFX_POWERGATE_ENABLE(i)); |
| 142 | 143 | } |
| 143 | 144 | |
| 144 | − set(uncore, GEN9_PG_ENABLE, pg_enable); | |
| 145 | + intel_uncore_write_fw(uncore, GEN9_PG_ENABLE, pg_enable); | |
| 145 | 146 | } |
| 146 | 147 | |
| 147 | 148 | static void gen9_rc6_enable(struct intel_rc6 *rc6) |
| @@ -152,26 +153,26 @@ static void gen9_rc6_enable(struct intel_rc6 *rc6) · 4 unmodified lines | ||
| 152 | 153 | |
| 153 | 154 | /* 2b: Program RC6 thresholds.*/ |
| 154 | 155 | if (GRAPHICS_VER(rc6_to_i915(rc6)) >= 11) { |
| 155 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16 | 85); | |
| 156 | − set(uncore, GEN10_MEDIA_WAKE_RATE_LIMIT, 150); | |
| 156 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16 | 85); | |
| 157 | + intel_uncore_write_fw(uncore, GEN10_MEDIA_WAKE_RATE_LIMIT, 150); | |
| 157 | 158 | } else if (IS_SKYLAKE(rc6_to_i915(rc6))) { |
| 158 | 159 | /* |
| 159 | 160 | * WaRsDoubleRc6WrlWithCoarsePowerGating:skl Doubling WRL only |
| 160 | 161 | * when CPG is enabled |
| 161 | 162 | */ |
| 162 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 108 << 16); | |
| 163 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 108 << 16); | |
| 163 | 164 | } else { |
| 164 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16); | |
| 165 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 54 << 16); | |
| 165 | 166 | } |
| 166 | 167 | |
| 167 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 168 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 168 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 169 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 169 | 170 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 170 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 171 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 171 | 172 | |
| 172 | − set(uncore, GUC_MAX_IDLE_COUNT, 0xA); | |
| 173 | + intel_uncore_write_fw(uncore, GUC_MAX_IDLE_COUNT, 0xA); | |
| 173 | 174 | |
| 174 | − set(uncore, GEN6_RC_SLEEP, 0); | |
| 175 | + intel_uncore_write_fw(uncore, GEN6_RC_SLEEP, 0); | |
| 175 | 176 | |
| 176 | 177 | /* |
| 177 | 178 | * 2c: Program Coarse Power Gating Policies. |
| @@ -194,11 +195,11 @@ static void gen9_rc6_enable(struct intel_rc6 *rc6) · 16 unmodified lines | ||
| 194 | 195 | * conservative, we have to factor in a context switch on top (due |
| 195 | 196 | * to ksoftirqd). |
| 196 | 197 | */ |
| 197 | − set(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS, 250); | |
| 198 | − set(uncore, GEN9_RENDER_PG_IDLE_HYSTERESIS, 250); | |
| 198 | + intel_uncore_write_fw(uncore, GEN9_MEDIA_PG_IDLE_HYSTERESIS, 250); | |
| 199 | + intel_uncore_write_fw(uncore, GEN9_RENDER_PG_IDLE_HYSTERESIS, 250); | |
| 199 | 200 | |
| 200 | 201 | /* 3a: Enable RC6 */ |
| 201 | − set(uncore, GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */ | |
| 202 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 37500); /* 37.5/125ms per EI */ | |
| 202 | 203 | |
| 203 | 204 | rc6->ctl_enable = |
| 204 | 205 | GEN6_RC_CTL_HW_ENABLE | |
| @@ -210,8 +211,8 @@ static void gen9_rc6_enable(struct intel_rc6 *rc6) · 5 unmodified lines | ||
| 210 | 211 | * - Render/Media PG need to be disabled with RC6. |
| 211 | 212 | */ |
| 212 | 213 | if (!NEEDS_WaRsDisableCoarsePowerGating(rc6_to_i915(rc6))) |
| 213 | − set(uncore, GEN9_PG_ENABLE, | |
| 214 | − GEN9_RENDER_PG_ENABLE | GEN9_MEDIA_PG_ENABLE); | |
| 214 | + intel_uncore_write_fw(uncore, GEN9_PG_ENABLE, | |
| 215 | + GEN9_RENDER_PG_ENABLE | GEN9_MEDIA_PG_ENABLE); | |
| 215 | 216 | } |
| 216 | 217 | |
| 217 | 218 | static void gen8_rc6_enable(struct intel_rc6 *rc6) |
| @@ -221,13 +222,13 @@ static void gen8_rc6_enable(struct intel_rc6 *rc6) · 3 unmodified lines | ||
| 221 | 222 | enum intel_engine_id id; |
| 222 | 223 | |
| 223 | 224 | /* 2b: Program RC6 thresholds.*/ |
| 224 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16); | |
| 225 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 226 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 225 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16); | |
| 226 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 227 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 227 | 228 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 228 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 229 | − set(uncore, GEN6_RC_SLEEP, 0); | |
| 230 | − set(uncore, GEN6_RC6_THRESHOLD, 625); /* 800us/1.28 for TO */ | |
| 229 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 230 | + intel_uncore_write_fw(uncore, GEN6_RC_SLEEP, 0); | |
| 231 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 625); /* 800us/1.28 for TO */ | |
| 231 | 232 | |
| 232 | 233 | /* 3: Enable RC6 */ |
| 233 | 234 | rc6->ctl_enable = |
| @@ -245,20 +246,20 @@ static void gen6_rc6_enable(struct intel_rc6 *rc6) · 11 unmodified lines | ||
| 245 | 246 | u32 rc6vids, rc6_mask; |
| 246 | 247 | int ret; |
| 247 | 248 | |
| 248 | − set(uncore, GEN6_RC1_WAKE_RATE_LIMIT, 1000 << 16); | |
| 249 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16 | 30); | |
| 250 | − set(uncore, GEN6_RC6pp_WAKE_RATE_LIMIT, 30); | |
| 251 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); | |
| 252 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); | |
| 249 | + intel_uncore_write_fw(uncore, GEN6_RC1_WAKE_RATE_LIMIT, 1000 << 16); | |
| 250 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16 | 30); | |
| 251 | + intel_uncore_write_fw(uncore, GEN6_RC6pp_WAKE_RATE_LIMIT, 30); | |
| 252 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); | |
| 253 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); | |
| 253 | 254 | |
| 254 | 255 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 255 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 256 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 256 | 257 | |
| 257 | − set(uncore, GEN6_RC_SLEEP, 0); | |
| 258 | − set(uncore, GEN6_RC1e_THRESHOLD, 1000); | |
| 259 | − set(uncore, GEN6_RC6_THRESHOLD, 50000); | |
| 260 | − set(uncore, GEN6_RC6p_THRESHOLD, 150000); | |
| 261 | − set(uncore, GEN6_RC6pp_THRESHOLD, 64000); /* unused */ | |
| 258 | + intel_uncore_write_fw(uncore, GEN6_RC_SLEEP, 0); | |
| 259 | + intel_uncore_write_fw(uncore, GEN6_RC1e_THRESHOLD, 1000); | |
| 260 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 50000); | |
| 261 | + intel_uncore_write_fw(uncore, GEN6_RC6p_THRESHOLD, 150000); | |
| 262 | + intel_uncore_write_fw(uncore, GEN6_RC6pp_THRESHOLD, 64000); /* unused */ | |
| 262 | 263 | |
| 263 | 264 | /* We don't use those on Haswell */ |
| 264 | 265 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE; |
| @@ -372,22 +373,22 @@ static void chv_rc6_enable(struct intel_rc6 *rc6) · 107 unmodified lines | ||
| 372 | 373 | enum intel_engine_id id; |
| 373 | 374 | |
| 374 | 375 | /* 2a: Program RC6 thresholds.*/ |
| 375 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16); | |
| 376 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 377 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 376 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 40 << 16); | |
| 377 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); /* 12500 * 1280ns */ | |
| 378 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); /* 25 * 1280ns */ | |
| 378 | 379 | |
| 379 | 380 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 380 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 381 | − set(uncore, GEN6_RC_SLEEP, 0); | |
| 381 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 382 | + intel_uncore_write_fw(uncore, GEN6_RC_SLEEP, 0); | |
| 382 | 383 | |
| 383 | 384 | /* TO threshold set to 500 us (0x186 * 1.28 us) */ |
| 384 | − set(uncore, GEN6_RC6_THRESHOLD, 0x186); | |
| 385 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 0x186); | |
| 385 | 386 | |
| 386 | 387 | /* Allows RC6 residency counter to work */ |
| 387 | − set(uncore, VLV_COUNTER_CONTROL, | |
| 388 | − _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH | | |
| 389 | − VLV_MEDIA_RC6_COUNT_EN | | |
| 390 | − VLV_RENDER_RC6_COUNT_EN)); | |
| 388 | + intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL, | |
| 389 | + _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH | | |
| 390 | + VLV_MEDIA_RC6_COUNT_EN | | |
| 391 | + VLV_RENDER_RC6_COUNT_EN)); | |
| 391 | 392 | |
| 392 | 393 | /* 3: Enable RC6 */ |
| 393 | 394 | rc6->ctl_enable = GEN7_RC_CTL_TO_MODE; |
| @@ -399,22 +400,22 @@ static void vlv_rc6_enable(struct intel_rc6 *rc6) · 5 unmodified lines | ||
| 399 | 400 | struct intel_engine_cs *engine; |
| 400 | 401 | enum intel_engine_id id; |
| 401 | 402 | |
| 402 | − set(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 0x00280000); | |
| 403 | − set(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); | |
| 404 | − set(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); | |
| 403 | + intel_uncore_write_fw(uncore, GEN6_RC6_WAKE_RATE_LIMIT, 0x00280000); | |
| 404 | + intel_uncore_write_fw(uncore, GEN6_RC_EVALUATION_INTERVAL, 125000); | |
| 405 | + intel_uncore_write_fw(uncore, GEN6_RC_IDLE_HYSTERSIS, 25); | |
| 405 | 406 | |
| 406 | 407 | for_each_engine(engine, rc6_to_gt(rc6), id) |
| 407 | − set(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 408 | + intel_uncore_write_fw(uncore, RING_MAX_IDLE(engine->mmio_base), 10); | |
| 408 | 409 | |
| 409 | − set(uncore, GEN6_RC6_THRESHOLD, 0x557); | |
| 410 | + intel_uncore_write_fw(uncore, GEN6_RC6_THRESHOLD, 0x557); | |
| 410 | 411 | |
| 411 | 412 | /* Allows RC6 residency counter to work */ |
| 412 | − set(uncore, VLV_COUNTER_CONTROL, | |
| 413 | − _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH | | |
| 414 | − VLV_MEDIA_RC0_COUNT_EN | | |
| 415 | − VLV_RENDER_RC0_COUNT_EN | | |
| 416 | − VLV_MEDIA_RC6_COUNT_EN | | |
| 417 | − VLV_RENDER_RC6_COUNT_EN)); | |
| 413 | + intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL, | |
| 414 | + _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH | | |
| 415 | + VLV_MEDIA_RC0_COUNT_EN | | |
| 416 | + VLV_RENDER_RC0_COUNT_EN | | |
| 417 | + VLV_MEDIA_RC6_COUNT_EN | | |
| 418 | + VLV_RENDER_RC6_COUNT_EN)); | |
| 418 | 419 | |
| 419 | 420 | rc6->ctl_enable = |
| 420 | 421 | GEN7_RC_CTL_TO_MODE | VLV_RC_CTL_CTX_RST_PARALLEL; |
| @@ -575,9 +576,9 @@ static void __intel_rc6_disable(struct intel_rc6 *rc6) · 154 unmodified lines | ||
| 575 | 576 | |
| 576 | 577 | intel_uncore_forcewake_get(uncore, FORCEWAKE_ALL); |
| 577 | 578 | if (GRAPHICS_VER(i915) >= 9) |
| 578 | − set(uncore, GEN9_PG_ENABLE, 0); | |
| 579 | − set(uncore, GEN6_RC_CONTROL, 0); | |
| 580 | − set(uncore, GEN6_RC_STATE, 0); | |
| 579 | + intel_uncore_write_fw(uncore, GEN9_PG_ENABLE, 0); | |
| 580 | + intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, 0); | |
| 581 | + intel_uncore_write_fw(uncore, GEN6_RC_STATE, 0); | |
| 581 | 582 | intel_uncore_forcewake_put(uncore, FORCEWAKE_ALL); |
| 582 | 583 | } |
| 583 | 584 | |
| @@ -684,7 +685,7 @@ void intel_rc6_unpark(struct intel_rc6 *rc6) · 100 unmodified lines | ||
| 684 | 685 | return; |
| 685 | 686 | |
| 686 | 687 | /* Restore HW timers for automatic RC6 entry while busy */ |
| 687 | − set(uncore, GEN6_RC_CONTROL, rc6->ctl_enable); | |
| 688 | + intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, rc6->ctl_enable); | |
| 688 | 689 | } |
| 689 | 690 | |
| 690 | 691 | void intel_rc6_park(struct intel_rc6 *rc6) |
| @@ -704,7 +705,7 @@ void intel_rc6_park(struct intel_rc6 *rc6) · 13 unmodified lines | ||
| 704 | 705 | return; |
| 705 | 706 | |
| 706 | 707 | /* Turn off the HW timers and go directly to rc6 */ |
| 707 | − set(uncore, GEN6_RC_CONTROL, GEN6_RC_CTL_RC6_ENABLE); | |
| 708 | + intel_uncore_write_fw(uncore, GEN6_RC_CONTROL, GEN6_RC_CTL_RC6_ENABLE); | |
| 708 | 709 | |
| 709 | 710 | if (HAS_RC6pp(rc6_to_i915(rc6))) |
| 710 | 711 | target = 0x6; /* deepest rc6 */ |
| @@ -712,7 +713,7 @@ void intel_rc6_park(struct intel_rc6 *rc6) · 1 unmodified line | ||
| 712 | 713 | target = 0x5; /* deep rc6 */ |
| 713 | 714 | else |
| 714 | 715 | target = 0x4; /* normal rc6 */ |
| 715 | − set(uncore, GEN6_RC_STATE, target << RC_SW_TARGET_STATE_SHIFT); | |
| 716 | + intel_uncore_write_fw(uncore, GEN6_RC_STATE, target << RC_SW_TARGET_STATE_SHIFT); | |
| 716 | 717 | } |
| 717 | 718 | |
| 718 | 719 | void intel_rc6_disable(struct intel_rc6 *rc6) |
| @@ -735,7 +736,7 @@ void intel_rc6_fini(struct intel_rc6 *rc6) · 16 unmodified lines | ||
| 735 | 736 | |
| 736 | 737 | /* We want the BIOS C6 state preserved across loads for MTL */ |
| 737 | 738 | if (IS_METEORLAKE(rc6_to_i915(rc6)) && rc6->bios_state_captured) |
| 738 | − set(uncore, GEN6_RC_STATE, rc6->bios_rc_state); | |
| 739 | + intel_uncore_write_fw(uncore, GEN6_RC_STATE, rc6->bios_rc_state); | |
| 739 | 740 | |
| 740 | 741 | pctx = fetch_and_zero(&rc6->pctx); |
| 741 | 742 | if (pctx) |
| @@ -766,18 +767,18 @@ static u64 vlv_residency_raw(struct intel_uncore *uncore, const i915_reg_t reg) · 24 unmodified lines | ||
| 766 | 767 | * before we have set the default VLV_COUNTER_CONTROL value. So always |
| 767 | 768 | * set the high bit to be safe. |
| 768 | 769 | */ |
| 769 | − set(uncore, VLV_COUNTER_CONTROL, | |
| 770 | − _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH)); | |
| 770 | + intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL, | |
| 771 | + _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH)); | |
| 771 | 772 | upper = intel_uncore_read_fw(uncore, reg); |
| 772 | 773 | do { |
| 773 | 774 | tmp = upper; |
| 774 | 775 | |
| 775 | − set(uncore, VLV_COUNTER_CONTROL, | |
| 776 | − _MASKED_BIT_DISABLE(VLV_COUNT_RANGE_HIGH)); | |
| 776 | + intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL, | |
| 777 | + _MASKED_BIT_DISABLE(VLV_COUNT_RANGE_HIGH)); | |
| 777 | 778 | lower = intel_uncore_read_fw(uncore, reg); |
| 778 | 779 | |
| 779 | − set(uncore, VLV_COUNTER_CONTROL, | |
| 780 | − _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH)); | |
| 780 | + intel_uncore_write_fw(uncore, VLV_COUNTER_CONTROL, | |
| 781 | + _MASKED_BIT_ENABLE(VLV_COUNT_RANGE_HIGH)); | |
| 781 | 782 | upper = intel_uncore_read_fw(uncore, reg); |
| 782 | 783 | } while (upper != tmp && --loop); |
| 783 | 784 | |
| @@ -812,11 +812,25 @@ static void dg2_ctx_workarounds_init(struct intel_engine_cs *engine, · 811 unmodified lines | ||
| 812 | 812 | wa_masked_en(wal, CACHE_MODE_1, MSAA_OPTIMIZATION_REDUC_DISABLE); |
| 813 | 813 | } |
| 814 | 814 | |
| 815 | +static void mtl_ctx_gt_tuning_init(struct intel_engine_cs *engine, | |
| 816 | + struct i915_wa_list *wal) | |
| 817 | +{ | |
| 818 | + struct drm_i915_private *i915 = engine->i915; | |
| 819 | + | |
| 820 | + dg2_ctx_gt_tuning_init(engine, wal); | |
| 821 | + | |
| 822 | + if (IS_MTL_GRAPHICS_STEP(i915, M, STEP_B0, STEP_FOREVER) || | |
| 823 | + IS_MTL_GRAPHICS_STEP(i915, P, STEP_B0, STEP_FOREVER)) | |
| 824 | + wa_add(wal, DRAW_WATERMARK, VERT_WM_VAL, 0x3FF, 0, false); | |
| 825 | +} | |
| 826 | + | |
| 815 | 827 | static void mtl_ctx_workarounds_init(struct intel_engine_cs *engine, |
| 816 | 828 | struct i915_wa_list *wal) |
| 817 | 829 | { |
| 818 | 830 | struct drm_i915_private *i915 = engine->i915; |
| 819 | 831 | |
| 832 | + mtl_ctx_gt_tuning_init(engine, wal); | |
| 833 | + | |
| 820 | 834 | if (IS_MTL_GRAPHICS_STEP(i915, M, STEP_A0, STEP_B0) || |
| 821 | 835 | IS_MTL_GRAPHICS_STEP(i915, P, STEP_A0, STEP_B0)) { |
| 822 | 836 | /* Wa_14014947963 */ |
| @@ -1695,14 +1709,20 @@ pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) · 872 unmodified lines | ||
| 1695 | 1709 | static void |
| 1696 | 1710 | xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) |
| 1697 | 1711 | { |
| 1712 | + /* Wa_14018778641 / Wa_18018781329 */ | |
| 1713 | + wa_mcr_write_or(wal, RENDER_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1714 | + wa_mcr_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1715 | + | |
| 1716 | + /* Wa_22016670082 */ | |
| 1717 | + wa_write_or(wal, GEN12_SQCNT1, GEN12_STRICT_RAR_ENABLE); | |
| 1718 | + | |
| 1698 | 1719 | if (IS_MTL_GRAPHICS_STEP(gt->i915, M, STEP_A0, STEP_B0) || |
| 1699 | 1720 | IS_MTL_GRAPHICS_STEP(gt->i915, P, STEP_A0, STEP_B0)) { |
| 1700 | 1721 | /* Wa_14014830051 */ |
| 1701 | 1722 | wa_mcr_write_clr(wal, SARB_CHICKEN1, COMP_CKN_IN); |
| 1702 | 1723 | |
| 1703 | − /* Wa_18018781329 */ | |
| 1704 | − wa_mcr_write_or(wal, RENDER_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1705 | − wa_mcr_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1724 | + /* Wa_14015795083 */ | |
| 1725 | + wa_write_clr(wal, GEN7_MISCCPCTL, GEN12_DOP_CLOCK_GATE_RENDER_ENABLE); | |
| 1706 | 1726 | } |
| 1707 | 1727 | |
| 1708 | 1728 | /* |
| @@ -1715,17 +1735,16 @@ xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) · 6 unmodified lines | ||
| 1715 | 1735 | static void |
| 1716 | 1736 | xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) |
| 1717 | 1737 | { |
| 1718 | − if (IS_MTL_MEDIA_STEP(gt->i915, STEP_A0, STEP_B0)) { | |
| 1719 | − /* | |
| 1720 | − * Wa_18018781329 | |
| 1721 | − * | |
| 1722 | − * Note that although these registers are MCR on the primary | |
| 1723 | − * GT, the media GT's versions are regular singleton registers. | |
| 1724 | − */ | |
| 1725 | − wa_write_or(wal, XELPMP_GSC_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1726 | − wa_write_or(wal, XELPMP_VDBX_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1727 | − wa_write_or(wal, XELPMP_VEBX_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1728 | − } | |
| 1738 | + /* | |
| 1739 | + * Wa_14018778641 | |
| 1740 | + * Wa_18018781329 | |
| 1741 | + * | |
| 1742 | + * Note that although these registers are MCR on the primary | |
| 1743 | + * GT, the media GT's versions are regular singleton registers. | |
| 1744 | + */ | |
| 1745 | + wa_write_or(wal, XELPMP_GSC_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1746 | + wa_write_or(wal, XELPMP_VDBX_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1747 | + wa_write_or(wal, XELPMP_VEBX_MOD_CTRL, FORCE_MISS_FTLB); | |
| 1729 | 1748 | |
| 1730 | 1749 | debug_dump_steering(gt); |
| 1731 | 1750 | } |
| @@ -1743,6 +1762,13 @@ xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal) · 11 unmodified lines | ||
| 1743 | 1762 | */ |
| 1744 | 1763 | static void gt_tuning_settings(struct intel_gt *gt, struct i915_wa_list *wal) |
| 1745 | 1764 | { |
| 1765 | + if (IS_METEORLAKE(gt->i915)) { | |
| 1766 | + if (gt->type != GT_MEDIA) | |
| 1767 | + wa_mcr_write_or(wal, XEHP_L3SCQREG7, BLEND_FILL_CACHING_OPT_DIS); | |
| 1768 | + | |
| 1769 | + wa_mcr_write_or(wal, XEHP_SQCM, EN_32B_ACCESS); | |
| 1770 | + } | |
| 1771 | + | |
| 1746 | 1772 | if (IS_PONTEVECCHIO(gt->i915)) { |
| 1747 | 1773 | wa_mcr_write(wal, XEHPC_L3SCRUB, |
| 1748 | 1774 | SCRUB_CL_DWNGRADE_SHARED | SCRUB_RATE_4B_PER_CLK); |
| @@ -2939,7 +2965,7 @@ static void · 1190 unmodified lines | ||
| 2939 | 2965 | add_render_compute_tuning_settings(struct drm_i915_private *i915, |
| 2940 | 2966 | struct i915_wa_list *wal) |
| 2941 | 2967 | { |
| 2942 | − if (IS_DG2(i915)) | |
| 2968 | + if (IS_METEORLAKE(i915) || IS_DG2(i915)) | |
| 2943 | 2969 | wa_mcr_write_clr_set(wal, RT_CTRL, STACKID_CTRL, STACKID_CTRL_512); |
| 2944 | 2970 | |
| 2945 | 2971 | /* |
| @@ -5,6 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | |
| 6 | 6 | #include <linux/sort.h> |
| 7 | 7 | |
| 8 | +#include "gt/intel_gt_print.h" | |
| 8 | 9 | #include "i915_selftest.h" |
| 9 | 10 | #include "intel_engine_regs.h" |
| 10 | 11 | #include "intel_gpu_commands.h" |
| @@ -402,7 +403,7 @@ static int live_engine_pm(void *arg) · 391 unmodified lines | ||
| 402 | 403 | |
| 403 | 404 | /* gt wakeref is async (deferred to workqueue) */ |
| 404 | 405 | if (intel_gt_pm_wait_for_idle(gt)) { |
| 405 | − pr_err("GT failed to idle\n"); | |
| 406 | + gt_err(gt, "GT failed to idle\n"); | |
| 406 | 407 | return -EINVAL; |
| 407 | 408 | } |
| 408 | 409 | } |
| @@ -137,7 +137,7 @@ err_free_src: · 136 unmodified lines | ||
| 137 | 137 | static int intel_context_copy_ccs(struct intel_context *ce, |
| 138 | 138 | const struct i915_deps *deps, |
| 139 | 139 | struct scatterlist *sg, |
| 140 | − enum i915_cache_level cache_level, | |
| 140 | + unsigned int pat_index, | |
| 141 | 141 | bool write_to_ccs, |
| 142 | 142 | struct i915_request **out) |
| 143 | 143 | { |
| @@ -185,7 +185,7 @@ static int intel_context_copy_ccs(struct intel_context *ce, · 41 unmodified lines | ||
| 185 | 185 | if (err) |
| 186 | 186 | goto out_rq; |
| 187 | 187 | |
| 188 | − len = emit_pte(rq, &it, cache_level, true, offset, CHUNK_SZ); | |
| 188 | + len = emit_pte(rq, &it, pat_index, true, offset, CHUNK_SZ); | |
| 189 | 189 | if (len <= 0) { |
| 190 | 190 | err = len; |
| 191 | 191 | goto out_rq; |
| @@ -223,7 +223,7 @@ intel_migrate_ccs_copy(struct intel_migrate *m, · 31 unmodified lines | ||
| 223 | 223 | struct i915_gem_ww_ctx *ww, |
| 224 | 224 | const struct i915_deps *deps, |
| 225 | 225 | struct scatterlist *sg, |
| 226 | − enum i915_cache_level cache_level, | |
| 226 | + unsigned int pat_index, | |
| 227 | 227 | bool write_to_ccs, |
| 228 | 228 | struct i915_request **out) |
| 229 | 229 | { |
| @@ -243,7 +243,7 @@ intel_migrate_ccs_copy(struct intel_migrate *m, · 13 unmodified lines | ||
| 243 | 243 | if (err) |
| 244 | 244 | goto out; |
| 245 | 245 | |
| 246 | − err = intel_context_copy_ccs(ce, deps, sg, cache_level, | |
| 246 | + err = intel_context_copy_ccs(ce, deps, sg, pat_index, | |
| 247 | 247 | write_to_ccs, out); |
| 248 | 248 | |
| 249 | 249 | intel_context_unpin(ce); |
| @@ -300,7 +300,7 @@ static int clear(struct intel_migrate *migrate, · 50 unmodified lines | ||
| 300 | 300 | /* Write the obj data into ccs surface */ |
| 301 | 301 | err = intel_migrate_ccs_copy(migrate, &ww, NULL, |
| 302 | 302 | obj->mm.pages->sgl, |
| 303 | − obj->cache_level, | |
| 303 | + obj->pat_index, | |
| 304 | 304 | true, &rq); |
| 305 | 305 | if (rq && !err) { |
| 306 | 306 | if (i915_request_wait(rq, 0, HZ) < 0) { |
| @@ -351,7 +351,7 @@ static int clear(struct intel_migrate *migrate, · 44 unmodified lines | ||
| 351 | 351 | |
| 352 | 352 | err = intel_migrate_ccs_copy(migrate, &ww, NULL, |
| 353 | 353 | obj->mm.pages->sgl, |
| 354 | − obj->cache_level, | |
| 354 | + obj->pat_index, | |
| 355 | 355 | false, &rq); |
| 356 | 356 | if (rq && !err) { |
| 357 | 357 | if (i915_request_wait(rq, 0, HZ) < 0) { |
| @@ -414,9 +414,9 @@ static int __migrate_copy(struct intel_migrate *migrate, · 56 unmodified lines | ||
| 414 | 414 | struct i915_request **out) |
| 415 | 415 | { |
| 416 | 416 | return intel_migrate_copy(migrate, ww, NULL, |
| 417 | − src->mm.pages->sgl, src->cache_level, | |
| 417 | + src->mm.pages->sgl, src->pat_index, | |
| 418 | 418 | i915_gem_object_is_lmem(src), |
| 419 | − dst->mm.pages->sgl, dst->cache_level, | |
| 419 | + dst->mm.pages->sgl, dst->pat_index, | |
| 420 | 420 | i915_gem_object_is_lmem(dst), |
| 421 | 421 | out); |
| 422 | 422 | } |
| @@ -428,9 +428,9 @@ static int __global_copy(struct intel_migrate *migrate, · 5 unmodified lines | ||
| 428 | 428 | struct i915_request **out) |
| 429 | 429 | { |
| 430 | 430 | return intel_context_migrate_copy(migrate->context, NULL, |
| 431 | − src->mm.pages->sgl, src->cache_level, | |
| 431 | + src->mm.pages->sgl, src->pat_index, | |
| 432 | 432 | i915_gem_object_is_lmem(src), |
| 433 | − dst->mm.pages->sgl, dst->cache_level, | |
| 433 | + dst->mm.pages->sgl, dst->pat_index, | |
| 434 | 434 | i915_gem_object_is_lmem(dst), |
| 435 | 435 | out); |
| 436 | 436 | } |
| @@ -455,7 +455,7 @@ static int __migrate_clear(struct intel_migrate *migrate, · 18 unmodified lines | ||
| 455 | 455 | { |
| 456 | 456 | return intel_migrate_clear(migrate, ww, NULL, |
| 457 | 457 | obj->mm.pages->sgl, |
| 458 | − obj->cache_level, | |
| 458 | + obj->pat_index, | |
| 459 | 459 | i915_gem_object_is_lmem(obj), |
| 460 | 460 | value, out); |
| 461 | 461 | } |
| @@ -468,7 +468,7 @@ static int __global_clear(struct intel_migrate *migrate, · 6 unmodified lines | ||
| 468 | 468 | { |
| 469 | 469 | return intel_context_migrate_clear(migrate->context, NULL, |
| 470 | 470 | obj->mm.pages->sgl, |
| 471 | − obj->cache_level, | |
| 471 | + obj->pat_index, | |
| 472 | 472 | i915_gem_object_is_lmem(obj), |
| 473 | 473 | value, out); |
| 474 | 474 | } |
| @@ -648,7 +648,7 @@ static int live_emit_pte_full_ring(void *arg) · 173 unmodified lines | ||
| 648 | 648 | */ |
| 649 | 649 | pr_info("%s emite_pte ring space=%u\n", __func__, rq->ring->space); |
| 650 | 650 | it = sg_sgt(obj->mm.pages->sgl); |
| 651 | − len = emit_pte(rq, &it, obj->cache_level, false, 0, CHUNK_SZ); | |
| 651 | + len = emit_pte(rq, &it, obj->pat_index, false, 0, CHUNK_SZ); | |
| 652 | 652 | if (!len) { |
| 653 | 653 | err = -EINVAL; |
| 654 | 654 | goto out_rq; |
| @@ -844,7 +844,7 @@ static int wrap_ktime_compare(const void *A, const void *B) · 189 unmodified lines | ||
| 844 | 844 | |
| 845 | 845 | static int __perf_clear_blt(struct intel_context *ce, |
| 846 | 846 | struct scatterlist *sg, |
| 847 | − enum i915_cache_level cache_level, | |
| 847 | + unsigned int pat_index, | |
| 848 | 848 | bool is_lmem, |
| 849 | 849 | size_t sz) |
| 850 | 850 | { |
| @@ -858,7 +858,7 @@ static int __perf_clear_blt(struct intel_context *ce, · 7 unmodified lines | ||
| 858 | 858 | |
| 859 | 859 | t0 = ktime_get(); |
| 860 | 860 | |
| 861 | − err = intel_context_migrate_clear(ce, NULL, sg, cache_level, | |
| 861 | + err = intel_context_migrate_clear(ce, NULL, sg, pat_index, | |
| 862 | 862 | is_lmem, 0, &rq); |
| 863 | 863 | if (rq) { |
| 864 | 864 | if (i915_request_wait(rq, 0, MAX_SCHEDULE_TIMEOUT) < 0) |
| @@ -904,7 +904,8 @@ static int perf_clear_blt(void *arg) · 39 unmodified lines | ||
| 904 | 904 | |
| 905 | 905 | err = __perf_clear_blt(gt->migrate.context, |
| 906 | 906 | dst->mm.pages->sgl, |
| 907 | − I915_CACHE_NONE, | |
| 907 | + i915_gem_get_pat_index(gt->i915, | |
| 908 | + I915_CACHE_NONE), | |
| 908 | 909 | i915_gem_object_is_lmem(dst), |
| 909 | 910 | sizes[i]); |
| 910 | 911 | |
| @@ -919,10 +920,10 @@ static int perf_clear_blt(void *arg) · 8 unmodified lines | ||
| 919 | 920 | |
| 920 | 921 | static int __perf_copy_blt(struct intel_context *ce, |
| 921 | 922 | struct scatterlist *src, |
| 922 | − enum i915_cache_level src_cache_level, | |
| 923 | + unsigned int src_pat_index, | |
| 923 | 924 | bool src_is_lmem, |
| 924 | 925 | struct scatterlist *dst, |
| 925 | − enum i915_cache_level dst_cache_level, | |
| 926 | + unsigned int dst_pat_index, | |
| 926 | 927 | bool dst_is_lmem, |
| 927 | 928 | size_t sz) |
| 928 | 929 | { |
| @@ -937,9 +938,9 @@ static int __perf_copy_blt(struct intel_context *ce, · 8 unmodified lines | ||
| 937 | 938 | t0 = ktime_get(); |
| 938 | 939 | |
| 939 | 940 | err = intel_context_migrate_copy(ce, NULL, |
| 940 | − src, src_cache_level, | |
| 941 | + src, src_pat_index, | |
| 941 | 942 | src_is_lmem, |
| 942 | − dst, dst_cache_level, | |
| 943 | + dst, dst_pat_index, | |
| 943 | 944 | dst_is_lmem, |
| 944 | 945 | &rq); |
| 945 | 946 | if (rq) { |
| @@ -994,10 +995,12 @@ static int perf_copy_blt(void *arg) · 48 unmodified lines | ||
| 994 | 995 | |
| 995 | 996 | err = __perf_copy_blt(gt->migrate.context, |
| 996 | 997 | src->mm.pages->sgl, |
| 997 | − I915_CACHE_NONE, | |
| 998 | + i915_gem_get_pat_index(gt->i915, | |
| 999 | + I915_CACHE_NONE), | |
| 998 | 1000 | i915_gem_object_is_lmem(src), |
| 999 | 1001 | dst->mm.pages->sgl, |
| 1000 | − I915_CACHE_NONE, | |
| 1002 | + i915_gem_get_pat_index(gt->i915, | |
| 1003 | + I915_CACHE_NONE), | |
| 1001 | 1004 | i915_gem_object_is_lmem(dst), |
| 1002 | 1005 | sz); |
| 1003 | 1006 | |
| @@ -131,13 +131,14 @@ static int read_mocs_table(struct i915_request *rq, · 130 unmodified lines | ||
| 131 | 131 | const struct drm_i915_mocs_table *table, |
| 132 | 132 | u32 *offset) |
| 133 | 133 | { |
| 134 | + struct intel_gt *gt = rq->engine->gt; | |
| 134 | 135 | u32 addr; |
| 135 | 136 | |
| 136 | 137 | if (!table) |
| 137 | 138 | return 0; |
| 138 | 139 | |
| 139 | 140 | if (HAS_GLOBAL_MOCS_REGISTERS(rq->engine->i915)) |
| 140 | − addr = global_mocs_offset(); | |
| 141 | + addr = global_mocs_offset() + gt->uncore->gsi_offset; | |
| 141 | 142 | else |
| 142 | 143 | addr = mocs_offset(rq->engine); |
| 143 | 144 | |
| @@ -86,7 +86,9 @@ __igt_reset_stolen(struct intel_gt *gt, · 85 unmodified lines | ||
| 86 | 86 | |
| 87 | 87 | ggtt->vm.insert_page(&ggtt->vm, dma, |
| 88 | 88 | ggtt->error_capture.start, |
| 89 | − I915_CACHE_NONE, 0); | |
| 89 | + i915_gem_get_pat_index(gt->i915, | |
| 90 | + I915_CACHE_NONE), | |
| 91 | + 0); | |
| 90 | 92 | mb(); |
| 91 | 93 | |
| 92 | 94 | s = io_mapping_map_wc(&ggtt->iomap, |
| @@ -127,7 +129,9 @@ __igt_reset_stolen(struct intel_gt *gt, · 34 unmodified lines | ||
| 127 | 129 | |
| 128 | 130 | ggtt->vm.insert_page(&ggtt->vm, dma, |
| 129 | 131 | ggtt->error_capture.start, |
| 130 | − I915_CACHE_NONE, 0); | |
| 132 | + i915_gem_get_pat_index(gt->i915, | |
| 133 | + I915_CACHE_NONE), | |
| 134 | + 0); | |
| 131 | 135 | mb(); |
| 132 | 136 | |
| 133 | 137 | s = io_mapping_map_wc(&ggtt->iomap, |
| @@ -70,6 +70,31 @@ static int slpc_set_freq(struct intel_gt *gt, u32 freq) · 69 unmodified lines | ||
| 70 | 70 | return err; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | +static int slpc_restore_freq(struct intel_guc_slpc *slpc, u32 min, u32 max) | |
| 74 | +{ | |
| 75 | + int err; | |
| 76 | + | |
| 77 | + err = slpc_set_max_freq(slpc, max); | |
| 78 | + if (err) { | |
| 79 | + pr_err("Unable to restore max freq"); | |
| 80 | + return err; | |
| 81 | + } | |
| 82 | + | |
| 83 | + err = slpc_set_min_freq(slpc, min); | |
| 84 | + if (err) { | |
| 85 | + pr_err("Unable to restore min freq"); | |
| 86 | + return err; | |
| 87 | + } | |
| 88 | + | |
| 89 | + err = intel_guc_slpc_set_ignore_eff_freq(slpc, false); | |
| 90 | + if (err) { | |
| 91 | + pr_err("Unable to restore efficient freq"); | |
| 92 | + return err; | |
| 93 | + } | |
| 94 | + | |
| 95 | + return 0; | |
| 96 | +} | |
| 97 | + | |
| 73 | 98 | static u64 measure_power_at_freq(struct intel_gt *gt, int *freq, u64 *power) |
| 74 | 99 | { |
| 75 | 100 | int err = 0; |
| @@ -268,8 +293,7 @@ static int run_test(struct intel_gt *gt, int test_type) · 192 unmodified lines | ||
| 268 | 293 | |
| 269 | 294 | /* |
| 270 | 295 | * Set min frequency to RPn so that we can test the whole |
| 271 | − * range of RPn-RP0. This also turns off efficient freq | |
| 272 | − * usage and makes results more predictable. | |
| 296 | + * range of RPn-RP0. | |
| 273 | 297 | */ |
| 274 | 298 | err = slpc_set_min_freq(slpc, slpc->min_freq); |
| 275 | 299 | if (err) { |
| @@ -277,6 +301,15 @@ static int run_test(struct intel_gt *gt, int test_type) · 1 unmodified line | ||
| 277 | 301 | return err; |
| 278 | 302 | } |
| 279 | 303 | |
| 304 | + /* | |
| 305 | + * Turn off efficient frequency so RPn/RP0 ranges are obeyed. | |
| 306 | + */ | |
| 307 | + err = intel_guc_slpc_set_ignore_eff_freq(slpc, true); | |
| 308 | + if (err) { | |
| 309 | + pr_err("Unable to turn off efficient freq!"); | |
| 310 | + return err; | |
| 311 | + } | |
| 312 | + | |
| 280 | 313 | intel_gt_pm_wait_for_idle(gt); |
| 281 | 314 | intel_gt_pm_get(gt); |
| 282 | 315 | for_each_engine(engine, gt, id) { |
| @@ -358,9 +391,8 @@ static int run_test(struct intel_gt *gt, int test_type) · 75 unmodified lines | ||
| 358 | 391 | break; |
| 359 | 392 | } |
| 360 | 393 | |
| 361 | − /* Restore min/max frequencies */ | |
| 362 | − slpc_set_max_freq(slpc, slpc_max_freq); | |
| 363 | − slpc_set_min_freq(slpc, slpc_min_freq); | |
| 394 | + /* Restore min/max/efficient frequencies */ | |
| 395 | + err = slpc_restore_freq(slpc, slpc_min_freq, slpc_max_freq); | |
| 364 | 396 | |
| 365 | 397 | if (igt_flush_test(gt->i915)) |
| 366 | 398 | err = -EIO; |
| @@ -836,7 +836,7 @@ static int setup_watcher(struct hwsp_watcher *w, struct intel_gt *gt, · 835 unmodified lines | ||
| 836 | 836 | return PTR_ERR(obj); |
| 837 | 837 | |
| 838 | 838 | /* keep the same cache settings as timeline */ |
| 839 | − i915_gem_object_set_cache_coherency(obj, tl->hwsp_ggtt->obj->cache_level); | |
| 839 | + i915_gem_object_set_pat_index(obj, tl->hwsp_ggtt->obj->pat_index); | |
| 840 | 840 | w->map = i915_gem_object_pin_map_unlocked(obj, |
| 841 | 841 | page_unmask_bits(tl->hwsp_ggtt->obj->mm.mapping)); |
| 842 | 842 | if (IS_ERR(w->map)) { |
| @@ -36,6 +36,8 @@ pte_tlbinv(struct intel_context *ce, · 35 unmodified lines | ||
| 36 | 36 | u64 length, |
| 37 | 37 | struct rnd_state *prng) |
| 38 | 38 | { |
| 39 | + const unsigned int pat_index = | |
| 40 | + i915_gem_get_pat_index(ce->vm->i915, I915_CACHE_NONE); | |
| 39 | 41 | struct drm_i915_gem_object *batch; |
| 40 | 42 | struct drm_mm_node vb_node; |
| 41 | 43 | struct i915_request *rq; |
| @@ -155,7 +157,7 @@ pte_tlbinv(struct intel_context *ce, · 113 unmodified lines | ||
| 155 | 157 | /* Flip the PTE between A and B */ |
| 156 | 158 | if (i915_gem_object_is_lmem(vb->obj)) |
| 157 | 159 | pte_flags |= PTE_LM; |
| 158 | − ce->vm->insert_entries(ce->vm, &vb_res, 0, pte_flags); | |
| 160 | + ce->vm->insert_entries(ce->vm, &vb_res, pat_index, pte_flags); | |
| 159 | 161 | |
| 160 | 162 | /* Flush the PTE update to concurrent HW */ |
| 161 | 163 | tlbinv(ce->vm, addr & -length, length); |
| @@ -44,6 +44,7 @@ enum intel_guc_load_status { · 43 unmodified lines | ||
| 44 | 44 | enum intel_bootrom_load_status { |
| 45 | 45 | INTEL_BOOTROM_STATUS_NO_KEY_FOUND = 0x13, |
| 46 | 46 | INTEL_BOOTROM_STATUS_AES_PROD_KEY_FOUND = 0x1A, |
| 47 | + INTEL_BOOTROM_STATUS_PROD_KEY_CHECK_FAILURE = 0x2B, | |
| 47 | 48 | INTEL_BOOTROM_STATUS_RSA_FAILED = 0x50, |
| 48 | 49 | INTEL_BOOTROM_STATUS_PAVPC_FAILED = 0x73, |
| 49 | 50 | INTEL_BOOTROM_STATUS_WOPCM_FAILED = 0x74, |
| @@ -12,7 +12,7 @@ · 11 unmodified lines | ||
| 12 | 12 | struct intel_guc; |
| 13 | 13 | struct file; |
| 14 | 14 | |
| 15 | −/** | |
| 15 | +/* | |
| 16 | 16 | * struct __guc_capture_bufstate |
| 17 | 17 | * |
| 18 | 18 | * Book-keeping structure used to track read and write pointers |
| @@ -26,7 +26,7 @@ struct __guc_capture_bufstate { · 7 unmodified lines | ||
| 26 | 26 | u32 wr; |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | −/** | |
| 29 | +/* | |
| 30 | 30 | * struct __guc_capture_parsed_output - extracted error capture node |
| 31 | 31 | * |
| 32 | 32 | * A single unit of extracted error-capture output data grouped together |
| @@ -58,7 +58,7 @@ struct __guc_capture_parsed_output { · 25 unmodified lines | ||
| 58 | 58 | #define GCAP_PARSED_REGLIST_INDEX_ENGINST BIT(GUC_CAPTURE_LIST_TYPE_ENGINE_INSTANCE) |
| 59 | 59 | }; |
| 60 | 60 | |
| 61 | −/** | |
| 61 | +/* | |
| 62 | 62 | * struct guc_debug_capture_list_header / struct guc_debug_capture_list |
| 63 | 63 | * |
| 64 | 64 | * As part of ADS registration, these header structures (followed by |
| @@ -76,7 +76,7 @@ struct guc_debug_capture_list { · 11 unmodified lines | ||
| 76 | 76 | struct guc_mmio_reg regs[]; |
| 77 | 77 | } __packed; |
| 78 | 78 | |
| 79 | −/** | |
| 79 | +/* | |
| 80 | 80 | * struct __guc_mmio_reg_descr / struct __guc_mmio_reg_descr_group |
| 81 | 81 | * |
| 82 | 82 | * intel_guc_capture module uses these structures to maintain static |
| @@ -101,7 +101,7 @@ struct __guc_mmio_reg_descr_group { · 18 unmodified lines | ||
| 101 | 101 | struct __guc_mmio_reg_descr *extlist; /* only used for steered registers */ |
| 102 | 102 | }; |
| 103 | 103 | |
| 104 | −/** | |
| 104 | +/* | |
| 105 | 105 | * struct guc_state_capture_header_t / struct guc_state_capture_t / |
| 106 | 106 | * guc_state_capture_group_header_t / guc_state_capture_group_t |
| 107 | 107 | * |
| @@ -148,7 +148,7 @@ struct guc_state_capture_group_t { · 40 unmodified lines | ||
| 148 | 148 | struct guc_state_capture_t capture_entries[]; |
| 149 | 149 | } __packed; |
| 150 | 150 | |
| 151 | −/** | |
| 151 | +/* | |
| 152 | 152 | * struct __guc_capture_ads_cache |
| 153 | 153 | * |
| 154 | 154 | * A structure to cache register lists that were populated and registered |
| @@ -187,6 +187,10 @@ struct intel_guc_state_capture { · 32 unmodified lines | ||
| 187 | 187 | struct __guc_capture_ads_cache ads_cache[GUC_CAPTURE_LIST_INDEX_MAX] |
| 188 | 188 | [GUC_CAPTURE_LIST_TYPE_MAX] |
| 189 | 189 | [GUC_MAX_ENGINE_CLASSES]; |
| 190 | + | |
| 191 | + /** | |
| 192 | + * @ads_null_cache: ADS null cache. | |
| 193 | + */ | |
| 190 | 194 | void *ads_null_cache; |
| 191 | 195 | |
| 192 | 196 | /** |
| @@ -202,6 +206,10 @@ struct intel_guc_state_capture { · 9 unmodified lines | ||
| 202 | 206 | struct list_head cachelist; |
| 203 | 207 | #define PREALLOC_NODES_MAX_COUNT (3 * GUC_MAX_ENGINE_CLASSES * GUC_MAX_INSTANCES_PER_CLASS) |
| 204 | 208 | #define PREALLOC_NODES_DEFAULT_NUMREGS 64 |
| 209 | + | |
| 210 | + /** | |
| 211 | + * @max_mmio_per_node: Max MMIO per node. | |
| 212 | + */ | |
| 205 | 213 | int max_mmio_per_node; |
| 206 | 214 | |
| 207 | 215 | /** |
| @@ -13,6 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | #define GSC_FW_STATUS_REG _MMIO(0x116C40) |
| 14 | 14 | #define GSC_FW_CURRENT_STATE REG_GENMASK(3, 0) |
| 15 | 15 | #define GSC_FW_CURRENT_STATE_RESET 0 |
| 16 | +#define GSC_FW_PROXY_STATE_NORMAL 5 | |
| 16 | 17 | #define GSC_FW_INIT_COMPLETE_BIT REG_BIT(9) |
| 17 | 18 | |
| 18 | 19 | static bool gsc_is_in_reset(struct intel_uncore *uncore) |
| @@ -23,6 +24,15 @@ static bool gsc_is_in_reset(struct intel_uncore *uncore) · 4 unmodified lines | ||
| 23 | 24 | GSC_FW_CURRENT_STATE_RESET; |
| 24 | 25 | } |
| 25 | 26 | |
| 27 | +bool intel_gsc_uc_fw_proxy_init_done(struct intel_gsc_uc *gsc) | |
| 28 | +{ | |
| 29 | + struct intel_uncore *uncore = gsc_uc_to_gt(gsc)->uncore; | |
| 30 | + u32 fw_status = intel_uncore_read(uncore, GSC_FW_STATUS_REG); | |
| 31 | + | |
| 32 | + return REG_FIELD_GET(GSC_FW_CURRENT_STATE, fw_status) == | |
| 33 | + GSC_FW_PROXY_STATE_NORMAL; | |
| 34 | +} | |
| 35 | + | |
| 26 | 36 | bool intel_gsc_uc_fw_init_done(struct intel_gsc_uc *gsc) |
| 27 | 37 | { |
| 28 | 38 | struct intel_uncore *uncore = gsc_uc_to_gt(gsc)->uncore; |
| @@ -110,6 +120,13 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc) · 81 unmodified lines | ||
| 110 | 120 | if (obj->base.size < gsc->fw.size) |
| 111 | 121 | return -ENOSPC; |
| 112 | 122 | |
| 123 | + /* | |
| 124 | + * Wa_22016122933: For MTL the shared memory needs to be mapped | |
| 125 | + * as WC on CPU side and UC (PAT index 2) on GPU side | |
| 126 | + */ | |
| 127 | + if (IS_METEORLAKE(i915)) | |
| 128 | + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE); | |
| 129 | + | |
| 113 | 130 | dst = i915_gem_object_pin_map_unlocked(obj, |
| 114 | 131 | i915_coherent_map_type(i915, obj, true)); |
| 115 | 132 | if (IS_ERR(dst)) |
| @@ -125,6 +142,12 @@ static int gsc_fw_load_prepare(struct intel_gsc_uc *gsc) · 9 unmodified lines | ||
| 125 | 142 | memset(dst, 0, obj->base.size); |
| 126 | 143 | memcpy(dst, src, gsc->fw.size); |
| 127 | 144 | |
| 145 | + /* | |
| 146 | + * Wa_22016122933: Making sure the data in dst is | |
| 147 | + * visible to GSC right away | |
| 148 | + */ | |
| 149 | + intel_guc_write_barrier(>->uc.guc); | |
| 150 | + | |
| 128 | 151 | i915_gem_object_unpin_map(gsc->fw.obj); |
| 129 | 152 | i915_gem_object_unpin_map(obj); |
| 130 | 153 | |
| @@ -13,5 +13,6 @@ struct intel_uncore; · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | int intel_gsc_uc_fw_upload(struct intel_gsc_uc *gsc); |
| 15 | 15 | bool intel_gsc_uc_fw_init_done(struct intel_gsc_uc *gsc); |
| 16 | +bool intel_gsc_uc_fw_proxy_init_done(struct intel_gsc_uc *gsc); | |
| 16 | 17 | |
| 17 | 18 | #endif |
| @@ -0,0 +1,424 @@ | ||
| 1 | +// SPDX-License-Identifier: MIT | |
| 2 | +/* | |
| 3 | + * Copyright © 2023 Intel Corporation | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#include <linux/component.h> | |
| 7 | + | |
| 8 | +#include "drm/i915_component.h" | |
| 9 | +#include "drm/i915_gsc_proxy_mei_interface.h" | |
| 10 | + | |
| 11 | +#include "gt/intel_gt.h" | |
| 12 | +#include "gt/intel_gt_print.h" | |
| 13 | +#include "intel_gsc_proxy.h" | |
| 14 | +#include "intel_gsc_uc.h" | |
| 15 | +#include "intel_gsc_uc_heci_cmd_submit.h" | |
| 16 | +#include "i915_drv.h" | |
| 17 | +#include "i915_reg.h" | |
| 18 | + | |
| 19 | +/* | |
| 20 | + * GSC proxy: | |
| 21 | + * The GSC uC needs to communicate with the CSME to perform certain operations. | |
| 22 | + * Since the GSC can't perform this communication directly on platforms where it | |
| 23 | + * is integrated in GT, i915 needs to transfer the messages from GSC to CSME | |
| 24 | + * and back. i915 must manually start the proxy flow after the GSC is loaded to | |
| 25 | + * signal to GSC that we're ready to handle its messages and allow it to query | |
| 26 | + * its init data from CSME; GSC will then trigger an HECI2 interrupt if it needs | |
| 27 | + * to send messages to CSME again. | |
| 28 | + * The proxy flow is as follow: | |
| 29 | + * 1 - i915 submits a request to GSC asking for the message to CSME | |
| 30 | + * 2 - GSC replies with the proxy header + payload for CSME | |
| 31 | + * 3 - i915 sends the reply from GSC as-is to CSME via the mei proxy component | |
| 32 | + * 4 - CSME replies with the proxy header + payload for GSC | |
| 33 | + * 5 - i915 submits a request to GSC with the reply from CSME | |
| 34 | + * 6 - GSC replies either with a new header + payload (same as step 2, so we | |
| 35 | + * restart from there) or with an end message. | |
| 36 | + */ | |
| 37 | + | |
| 38 | +/* | |
| 39 | + * The component should load quite quickly in most cases, but it could take | |
| 40 | + * a bit. Using a very big timeout just to cover the worst case scenario | |
| 41 | + */ | |
| 42 | +#define GSC_PROXY_INIT_TIMEOUT_MS 20000 | |
| 43 | + | |
| 44 | +/* the protocol supports up to 32K in each direction */ | |
| 45 | +#define GSC_PROXY_BUFFER_SIZE SZ_32K | |
| 46 | +#define GSC_PROXY_CHANNEL_SIZE (GSC_PROXY_BUFFER_SIZE * 2) | |
| 47 | +#define GSC_PROXY_MAX_MSG_SIZE (GSC_PROXY_BUFFER_SIZE - sizeof(struct intel_gsc_mtl_header)) | |
| 48 | + | |
| 49 | +/* FW-defined proxy header */ | |
| 50 | +struct intel_gsc_proxy_header { | |
| 51 | + /* | |
| 52 | + * hdr: | |
| 53 | + * Bits 0-7: type of the proxy message (see enum intel_gsc_proxy_type) | |
| 54 | + * Bits 8-15: rsvd | |
| 55 | + * Bits 16-31: length in bytes of the payload following the proxy header | |
| 56 | + */ | |
| 57 | + u32 hdr; | |
| 58 | +#define GSC_PROXY_TYPE GENMASK(7, 0) | |
| 59 | +#define GSC_PROXY_PAYLOAD_LENGTH GENMASK(31, 16) | |
| 60 | + | |
| 61 | + u32 source; /* Source of the Proxy message */ | |
| 62 | + u32 destination; /* Destination of the Proxy message */ | |
| 63 | +#define GSC_PROXY_ADDRESSING_KMD 0x10000 | |
| 64 | +#define GSC_PROXY_ADDRESSING_GSC 0x20000 | |
| 65 | +#define GSC_PROXY_ADDRESSING_CSME 0x30000 | |
| 66 | + | |
| 67 | + u32 status; /* Command status */ | |
| 68 | +} __packed; | |
| 69 | + | |
| 70 | +/* FW-defined proxy types */ | |
| 71 | +enum intel_gsc_proxy_type { | |
| 72 | + GSC_PROXY_MSG_TYPE_PROXY_INVALID = 0, | |
| 73 | + GSC_PROXY_MSG_TYPE_PROXY_QUERY = 1, | |
| 74 | + GSC_PROXY_MSG_TYPE_PROXY_PAYLOAD = 2, | |
| 75 | + GSC_PROXY_MSG_TYPE_PROXY_END = 3, | |
| 76 | + GSC_PROXY_MSG_TYPE_PROXY_NOTIFICATION = 4, | |
| 77 | +}; | |
| 78 | + | |
| 79 | +struct gsc_proxy_msg { | |
| 80 | + struct intel_gsc_mtl_header header; | |
| 81 | + struct intel_gsc_proxy_header proxy_header; | |
| 82 | +} __packed; | |
| 83 | + | |
| 84 | +static int proxy_send_to_csme(struct intel_gsc_uc *gsc) | |
| 85 | +{ | |
| 86 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 87 | + struct i915_gsc_proxy_component *comp = gsc->proxy.component; | |
| 88 | + struct intel_gsc_mtl_header *hdr; | |
| 89 | + void *in = gsc->proxy.to_csme; | |
| 90 | + void *out = gsc->proxy.to_gsc; | |
| 91 | + u32 in_size; | |
| 92 | + int ret; | |
| 93 | + | |
| 94 | + /* CSME msg only includes the proxy */ | |
| 95 | + hdr = in; | |
| 96 | + in += sizeof(struct intel_gsc_mtl_header); | |
| 97 | + out += sizeof(struct intel_gsc_mtl_header); | |
| 98 | + | |
| 99 | + in_size = hdr->message_size - sizeof(struct intel_gsc_mtl_header); | |
| 100 | + | |
| 101 | + /* the message must contain at least the proxy header */ | |
| 102 | + if (in_size < sizeof(struct intel_gsc_proxy_header) || | |
| 103 | + in_size > GSC_PROXY_MAX_MSG_SIZE) { | |
| 104 | + gt_err(gt, "Invalid CSME message size: %u\n", in_size); | |
| 105 | + return -EINVAL; | |
| 106 | + } | |
| 107 | + | |
| 108 | + ret = comp->ops->send(comp->mei_dev, in, in_size); | |
| 109 | + if (ret < 0) { | |
| 110 | + gt_err(gt, "Failed to send CSME message\n"); | |
| 111 | + return ret; | |
| 112 | + } | |
| 113 | + | |
| 114 | + ret = comp->ops->recv(comp->mei_dev, out, GSC_PROXY_MAX_MSG_SIZE); | |
| 115 | + if (ret < 0) { | |
| 116 | + gt_err(gt, "Failed to receive CSME message\n"); | |
| 117 | + return ret; | |
| 118 | + } | |
| 119 | + | |
| 120 | + return ret; | |
| 121 | +} | |
| 122 | + | |
| 123 | +static int proxy_send_to_gsc(struct intel_gsc_uc *gsc) | |
| 124 | +{ | |
| 125 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 126 | + u32 *marker = gsc->proxy.to_csme; /* first dw of the reply header */ | |
| 127 | + u64 addr_in = i915_ggtt_offset(gsc->proxy.vma); | |
| 128 | + u64 addr_out = addr_in + GSC_PROXY_BUFFER_SIZE; | |
| 129 | + u32 size = ((struct gsc_proxy_msg *)gsc->proxy.to_gsc)->header.message_size; | |
| 130 | + int err; | |
| 131 | + | |
| 132 | + /* the message must contain at least the gsc and proxy headers */ | |
| 133 | + if (size < sizeof(struct gsc_proxy_msg) || size > GSC_PROXY_BUFFER_SIZE) { | |
| 134 | + gt_err(gt, "Invalid GSC proxy message size: %u\n", size); | |
| 135 | + return -EINVAL; | |
| 136 | + } | |
| 137 | + | |
| 138 | + /* clear the message marker */ | |
| 139 | + *marker = 0; | |
| 140 | + | |
| 141 | + /* make sure the marker write is flushed */ | |
| 142 | + wmb(); | |
| 143 | + | |
| 144 | + /* send the request */ | |
| 145 | + err = intel_gsc_uc_heci_cmd_submit_packet(gsc, addr_in, size, | |
| 146 | + addr_out, GSC_PROXY_BUFFER_SIZE); | |
| 147 | + | |
| 148 | + if (!err) { | |
| 149 | + /* wait for the reply to show up */ | |
| 150 | + err = wait_for(*marker != 0, 300); | |
| 151 | + if (err) | |
| 152 | + gt_err(gt, "Failed to get a proxy reply from gsc\n"); | |
| 153 | + } | |
| 154 | + | |
| 155 | + return err; | |
| 156 | +} | |
| 157 | + | |
| 158 | +static int validate_proxy_header(struct intel_gsc_proxy_header *header, | |
| 159 | + u32 source, u32 dest) | |
| 160 | +{ | |
| 161 | + u32 type = FIELD_GET(GSC_PROXY_TYPE, header->hdr); | |
| 162 | + u32 length = FIELD_GET(GSC_PROXY_PAYLOAD_LENGTH, header->hdr); | |
| 163 | + int ret = 0; | |
| 164 | + | |
| 165 | + if (header->destination != dest || header->source != source) { | |
| 166 | + ret = -ENOEXEC; | |
| 167 | + goto fail; | |
| 168 | + } | |
| 169 | + | |
| 170 | + switch (type) { | |
| 171 | + case GSC_PROXY_MSG_TYPE_PROXY_PAYLOAD: | |
| 172 | + if (length > 0) | |
| 173 | + break; | |
| 174 | + fallthrough; | |
| 175 | + case GSC_PROXY_MSG_TYPE_PROXY_INVALID: | |
| 176 | + ret = -EIO; | |
| 177 | + goto fail; | |
| 178 | + default: | |
| 179 | + break; | |
| 180 | + } | |
| 181 | + | |
| 182 | +fail: | |
| 183 | + return ret; | |
| 184 | +} | |
| 185 | + | |
| 186 | +static int proxy_query(struct intel_gsc_uc *gsc) | |
| 187 | +{ | |
| 188 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 189 | + struct gsc_proxy_msg *to_gsc = gsc->proxy.to_gsc; | |
| 190 | + struct gsc_proxy_msg *to_csme = gsc->proxy.to_csme; | |
| 191 | + int ret; | |
| 192 | + | |
| 193 | + intel_gsc_uc_heci_cmd_emit_mtl_header(&to_gsc->header, | |
| 194 | + HECI_MEADDRESS_PROXY, | |
| 195 | + sizeof(struct gsc_proxy_msg), | |
| 196 | + 0); | |
| 197 | + | |
| 198 | + to_gsc->proxy_header.hdr = | |
| 199 | + FIELD_PREP(GSC_PROXY_TYPE, GSC_PROXY_MSG_TYPE_PROXY_QUERY) | | |
| 200 | + FIELD_PREP(GSC_PROXY_PAYLOAD_LENGTH, 0); | |
| 201 | + | |
| 202 | + to_gsc->proxy_header.source = GSC_PROXY_ADDRESSING_KMD; | |
| 203 | + to_gsc->proxy_header.destination = GSC_PROXY_ADDRESSING_GSC; | |
| 204 | + to_gsc->proxy_header.status = 0; | |
| 205 | + | |
| 206 | + while (1) { | |
| 207 | + /* clear the GSC response header space */ | |
| 208 | + memset(gsc->proxy.to_csme, 0, sizeof(struct gsc_proxy_msg)); | |
| 209 | + | |
| 210 | + /* send proxy message to GSC */ | |
| 211 | + ret = proxy_send_to_gsc(gsc); | |
| 212 | + if (ret) { | |
| 213 | + gt_err(gt, "failed to send proxy message to GSC! %d\n", ret); | |
| 214 | + goto proxy_error; | |
| 215 | + } | |
| 216 | + | |
| 217 | + /* stop if this was the last message */ | |
| 218 | + if (FIELD_GET(GSC_PROXY_TYPE, to_csme->proxy_header.hdr) == | |
| 219 | + GSC_PROXY_MSG_TYPE_PROXY_END) | |
| 220 | + break; | |
| 221 | + | |
| 222 | + /* make sure the GSC-to-CSME proxy header is sane */ | |
| 223 | + ret = validate_proxy_header(&to_csme->proxy_header, | |
| 224 | + GSC_PROXY_ADDRESSING_GSC, | |
| 225 | + GSC_PROXY_ADDRESSING_CSME); | |
| 226 | + if (ret) { | |
| 227 | + gt_err(gt, "invalid GSC to CSME proxy header! %d\n", ret); | |
| 228 | + goto proxy_error; | |
| 229 | + } | |
| 230 | + | |
| 231 | + /* send the GSC message to the CSME */ | |
| 232 | + ret = proxy_send_to_csme(gsc); | |
| 233 | + if (ret < 0) { | |
| 234 | + gt_err(gt, "failed to send proxy message to CSME! %d\n", ret); | |
| 235 | + goto proxy_error; | |
| 236 | + } | |
| 237 | + | |
| 238 | + /* update the GSC message size with the returned value from CSME */ | |
| 239 | + to_gsc->header.message_size = ret + sizeof(struct intel_gsc_mtl_header); | |
| 240 | + | |
| 241 | + /* make sure the CSME-to-GSC proxy header is sane */ | |
| 242 | + ret = validate_proxy_header(&to_gsc->proxy_header, | |
| 243 | + GSC_PROXY_ADDRESSING_CSME, | |
| 244 | + GSC_PROXY_ADDRESSING_GSC); | |
| 245 | + if (ret) { | |
| 246 | + gt_err(gt, "invalid CSME to GSC proxy header! %d\n", ret); | |
| 247 | + goto proxy_error; | |
| 248 | + } | |
| 249 | + } | |
| 250 | + | |
| 251 | +proxy_error: | |
| 252 | + return ret < 0 ? ret : 0; | |
| 253 | +} | |
| 254 | + | |
| 255 | +int intel_gsc_proxy_request_handler(struct intel_gsc_uc *gsc) | |
| 256 | +{ | |
| 257 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 258 | + int err; | |
| 259 | + | |
| 260 | + if (!gsc->proxy.component_added) | |
| 261 | + return -ENODEV; | |
| 262 | + | |
| 263 | + assert_rpm_wakelock_held(gt->uncore->rpm); | |
| 264 | + | |
| 265 | + /* when GSC is loaded, we can queue this before the component is bound */ | |
| 266 | + err = wait_for(gsc->proxy.component, GSC_PROXY_INIT_TIMEOUT_MS); | |
| 267 | + if (err) { | |
| 268 | + gt_err(gt, "GSC proxy component didn't bind within the expected timeout\n"); | |
| 269 | + return -EIO; | |
| 270 | + } | |
| 271 | + | |
| 272 | + mutex_lock(&gsc->proxy.mutex); | |
| 273 | + if (!gsc->proxy.component) { | |
| 274 | + gt_err(gt, "GSC proxy worker called without the component being bound!\n"); | |
| 275 | + err = -EIO; | |
| 276 | + } else { | |
| 277 | + /* | |
| 278 | + * write the status bit to clear it and allow new proxy | |
| 279 | + * interrupts to be generated while we handle the current | |
| 280 | + * request, but be sure not to write the reset bit | |
| 281 | + */ | |
| 282 | + intel_uncore_rmw(gt->uncore, HECI_H_CSR(MTL_GSC_HECI2_BASE), | |
| 283 | + HECI_H_CSR_RST, HECI_H_CSR_IS); | |
| 284 | + err = proxy_query(gsc); | |
| 285 | + } | |
| 286 | + mutex_unlock(&gsc->proxy.mutex); | |
| 287 | + return err; | |
| 288 | +} | |
| 289 | + | |
| 290 | +void intel_gsc_proxy_irq_handler(struct intel_gsc_uc *gsc, u32 iir) | |
| 291 | +{ | |
| 292 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 293 | + | |
| 294 | + if (unlikely(!iir)) | |
| 295 | + return; | |
| 296 | + | |
| 297 | + lockdep_assert_held(gt->irq_lock); | |
| 298 | + | |
| 299 | + if (!gsc->proxy.component) { | |
| 300 | + gt_err(gt, "GSC proxy irq received without the component being bound!\n"); | |
| 301 | + return; | |
| 302 | + } | |
| 303 | + | |
| 304 | + gsc->gsc_work_actions |= GSC_ACTION_SW_PROXY; | |
| 305 | + queue_work(gsc->wq, &gsc->work); | |
| 306 | +} | |
| 307 | + | |
| 308 | +static int i915_gsc_proxy_component_bind(struct device *i915_kdev, | |
| 309 | + struct device *mei_kdev, void *data) | |
| 310 | +{ | |
| 311 | + struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); | |
| 312 | + struct intel_gt *gt = i915->media_gt; | |
| 313 | + struct intel_gsc_uc *gsc = >->uc.gsc; | |
| 314 | + intel_wakeref_t wakeref; | |
| 315 | + | |
| 316 | + /* enable HECI2 IRQs */ | |
| 317 | + with_intel_runtime_pm(&i915->runtime_pm, wakeref) | |
| 318 | + intel_uncore_rmw(gt->uncore, HECI_H_CSR(MTL_GSC_HECI2_BASE), | |
| 319 | + HECI_H_CSR_RST, HECI_H_CSR_IE); | |
| 320 | + | |
| 321 | + mutex_lock(&gsc->proxy.mutex); | |
| 322 | + gsc->proxy.component = data; | |
| 323 | + gsc->proxy.component->mei_dev = mei_kdev; | |
| 324 | + mutex_unlock(&gsc->proxy.mutex); | |
| 325 | + | |
| 326 | + return 0; | |
| 327 | +} | |
| 328 | + | |
| 329 | +static void i915_gsc_proxy_component_unbind(struct device *i915_kdev, | |
| 330 | + struct device *mei_kdev, void *data) | |
| 331 | +{ | |
| 332 | + struct drm_i915_private *i915 = kdev_to_i915(i915_kdev); | |
| 333 | + struct intel_gt *gt = i915->media_gt; | |
| 334 | + struct intel_gsc_uc *gsc = >->uc.gsc; | |
| 335 | + intel_wakeref_t wakeref; | |
| 336 | + | |
| 337 | + mutex_lock(&gsc->proxy.mutex); | |
| 338 | + gsc->proxy.component = NULL; | |
| 339 | + mutex_unlock(&gsc->proxy.mutex); | |
| 340 | + | |
| 341 | + /* disable HECI2 IRQs */ | |
| 342 | + with_intel_runtime_pm(&i915->runtime_pm, wakeref) | |
| 343 | + intel_uncore_rmw(gt->uncore, HECI_H_CSR(MTL_GSC_HECI2_BASE), | |
| 344 | + HECI_H_CSR_IE | HECI_H_CSR_RST, 0); | |
| 345 | +} | |
| 346 | + | |
| 347 | +static const struct component_ops i915_gsc_proxy_component_ops = { | |
| 348 | + .bind = i915_gsc_proxy_component_bind, | |
| 349 | + .unbind = i915_gsc_proxy_component_unbind, | |
| 350 | +}; | |
| 351 | + | |
| 352 | +static int proxy_channel_alloc(struct intel_gsc_uc *gsc) | |
| 353 | +{ | |
| 354 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 355 | + struct i915_vma *vma; | |
| 356 | + void *vaddr; | |
| 357 | + int err; | |
| 358 | + | |
| 359 | + err = intel_guc_allocate_and_map_vma(>->uc.guc, GSC_PROXY_CHANNEL_SIZE, | |
| 360 | + &vma, &vaddr); | |
| 361 | + if (err) | |
| 362 | + return err; | |
| 363 | + | |
| 364 | + gsc->proxy.vma = vma; | |
| 365 | + gsc->proxy.to_gsc = vaddr; | |
| 366 | + gsc->proxy.to_csme = vaddr + GSC_PROXY_BUFFER_SIZE; | |
| 367 | + | |
| 368 | + return 0; | |
| 369 | +} | |
| 370 | + | |
| 371 | +static void proxy_channel_free(struct intel_gsc_uc *gsc) | |
| 372 | +{ | |
| 373 | + if (!gsc->proxy.vma) | |
| 374 | + return; | |
| 375 | + | |
| 376 | + gsc->proxy.to_gsc = NULL; | |
| 377 | + gsc->proxy.to_csme = NULL; | |
| 378 | + i915_vma_unpin_and_release(&gsc->proxy.vma, I915_VMA_RELEASE_MAP); | |
| 379 | +} | |
| 380 | + | |
| 381 | +void intel_gsc_proxy_fini(struct intel_gsc_uc *gsc) | |
| 382 | +{ | |
| 383 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 384 | + struct drm_i915_private *i915 = gt->i915; | |
| 385 | + | |
| 386 | + if (fetch_and_zero(&gsc->proxy.component_added)) | |
| 387 | + component_del(i915->drm.dev, &i915_gsc_proxy_component_ops); | |
| 388 | + | |
| 389 | + proxy_channel_free(gsc); | |
| 390 | +} | |
| 391 | + | |
| 392 | +int intel_gsc_proxy_init(struct intel_gsc_uc *gsc) | |
| 393 | +{ | |
| 394 | + int err; | |
| 395 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 396 | + struct drm_i915_private *i915 = gt->i915; | |
| 397 | + | |
| 398 | + mutex_init(&gsc->proxy.mutex); | |
| 399 | + | |
| 400 | + if (!IS_ENABLED(CONFIG_INTEL_MEI_GSC_PROXY)) { | |
| 401 | + gt_info(gt, "can't init GSC proxy due to missing mei component\n"); | |
| 402 | + return -ENODEV; | |
| 403 | + } | |
| 404 | + | |
| 405 | + err = proxy_channel_alloc(gsc); | |
| 406 | + if (err) | |
| 407 | + return err; | |
| 408 | + | |
| 409 | + err = component_add_typed(i915->drm.dev, &i915_gsc_proxy_component_ops, | |
| 410 | + I915_COMPONENT_GSC_PROXY); | |
| 411 | + if (err < 0) { | |
| 412 | + gt_err(gt, "Failed to add GSC_PROXY component (%d)\n", err); | |
| 413 | + goto out_free; | |
| 414 | + } | |
| 415 | + | |
| 416 | + gsc->proxy.component_added = true; | |
| 417 | + | |
| 418 | + return 0; | |
| 419 | + | |
| 420 | +out_free: | |
| 421 | + proxy_channel_free(gsc); | |
| 422 | + return err; | |
| 423 | +} | |
| 424 | + | |
| @@ -0,0 +1,18 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | +/* | |
| 3 | + * Copyright © 2023 Intel Corporation | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#ifndef _INTEL_GSC_PROXY_H_ | |
| 7 | +#define _INTEL_GSC_PROXY_H_ | |
| 8 | + | |
| 9 | +#include <linux/types.h> | |
| 10 | + | |
| 11 | +struct intel_gsc_uc; | |
| 12 | + | |
| 13 | +int intel_gsc_proxy_init(struct intel_gsc_uc *gsc); | |
| 14 | +void intel_gsc_proxy_fini(struct intel_gsc_uc *gsc); | |
| 15 | +int intel_gsc_proxy_request_handler(struct intel_gsc_uc *gsc); | |
| 16 | +void intel_gsc_proxy_irq_handler(struct intel_gsc_uc *gsc, u32 iir); | |
| 17 | + | |
| 18 | +#endif | |
| @@ -10,15 +10,60 @@ · 9 unmodified lines | ||
| 10 | 10 | #include "intel_gsc_uc.h" |
| 11 | 11 | #include "intel_gsc_fw.h" |
| 12 | 12 | #include "i915_drv.h" |
| 13 | +#include "intel_gsc_proxy.h" | |
| 13 | 14 | |
| 14 | 15 | static void gsc_work(struct work_struct *work) |
| 15 | 16 | { |
| 16 | 17 | struct intel_gsc_uc *gsc = container_of(work, typeof(*gsc), work); |
| 17 | 18 | struct intel_gt *gt = gsc_uc_to_gt(gsc); |
| 18 | 19 | intel_wakeref_t wakeref; |
| 20 | + u32 actions; | |
| 21 | + int ret; | |
| 22 | + | |
| 23 | + wakeref = intel_runtime_pm_get(gt->uncore->rpm); | |
| 24 | + | |
| 25 | + spin_lock_irq(gt->irq_lock); | |
| 26 | + actions = gsc->gsc_work_actions; | |
| 27 | + gsc->gsc_work_actions = 0; | |
| 28 | + spin_unlock_irq(gt->irq_lock); | |
| 29 | + | |
| 30 | + if (actions & GSC_ACTION_FW_LOAD) { | |
| 31 | + ret = intel_gsc_uc_fw_upload(gsc); | |
| 32 | + if (ret == -EEXIST) /* skip proxy if not a new load */ | |
| 33 | + actions &= ~GSC_ACTION_FW_LOAD; | |
| 34 | + else if (ret) | |
| 35 | + goto out_put; | |
| 36 | + } | |
| 37 | + | |
| 38 | + if (actions & (GSC_ACTION_FW_LOAD | GSC_ACTION_SW_PROXY)) { | |
| 39 | + if (!intel_gsc_uc_fw_init_done(gsc)) { | |
| 40 | + gt_err(gt, "Proxy request received with GSC not loaded!\n"); | |
| 41 | + goto out_put; | |
| 42 | + } | |
| 43 | + | |
| 44 | + ret = intel_gsc_proxy_request_handler(gsc); | |
| 45 | + if (ret) | |
| 46 | + goto out_put; | |
| 47 | + | |
| 48 | + /* mark the GSC FW init as done the first time we run this */ | |
| 49 | + if (actions & GSC_ACTION_FW_LOAD) { | |
| 50 | + /* | |
| 51 | + * If there is a proxy establishment error, the GSC might still | |
| 52 | + * complete the request handling cleanly, so we need to check the | |
| 53 | + * status register to check if the proxy init was actually successful | |
| 54 | + */ | |
| 55 | + if (intel_gsc_uc_fw_proxy_init_done(gsc)) { | |
| 56 | + drm_dbg(>->i915->drm, "GSC Proxy initialized\n"); | |
| 57 | + intel_uc_fw_change_status(&gsc->fw, INTEL_UC_FIRMWARE_RUNNING); | |
| 58 | + } else { | |
| 59 | + drm_err(>->i915->drm, | |
| 60 | + "GSC status reports proxy init not complete\n"); | |
| 61 | + } | |
| 62 | + } | |
| 63 | + } | |
| 19 | 64 | |
| 20 | − with_intel_runtime_pm(gt->uncore->rpm, wakeref) | |
| 21 | − intel_gsc_uc_fw_upload(gsc); | |
| 65 | +out_put: | |
| 66 | + intel_runtime_pm_put(gt->uncore->rpm, wakeref); | |
| 22 | 67 | } |
| 23 | 68 | |
| 24 | 69 | static bool gsc_engine_supported(struct intel_gt *gt) |
| @@ -43,6 +88,8 @@ static bool gsc_engine_supported(struct intel_gt *gt) · 18 unmodified lines | ||
| 43 | 88 | |
| 44 | 89 | void intel_gsc_uc_init_early(struct intel_gsc_uc *gsc) |
| 45 | 90 | { |
| 91 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 92 | + | |
| 46 | 93 | intel_uc_fw_init_early(&gsc->fw, INTEL_UC_FW_TYPE_GSC); |
| 47 | 94 | INIT_WORK(&gsc->work, gsc_work); |
| 48 | 95 | |
| @@ -50,10 +97,16 @@ void intel_gsc_uc_init_early(struct intel_gsc_uc *gsc) · 1 unmodified line | ||
| 50 | 97 | * GT with it being not fully setup hence check device info's |
| 51 | 98 | * engine mask |
| 52 | 99 | */ |
| 53 | − if (!gsc_engine_supported(gsc_uc_to_gt(gsc))) { | |
| 100 | + if (!gsc_engine_supported(gt)) { | |
| 54 | 101 | intel_uc_fw_change_status(&gsc->fw, INTEL_UC_FIRMWARE_NOT_SUPPORTED); |
| 55 | 102 | return; |
| 56 | 103 | } |
| 104 | + | |
| 105 | + gsc->wq = alloc_ordered_workqueue("i915_gsc", 0); | |
| 106 | + if (!gsc->wq) { | |
| 107 | + gt_err(gt, "failed to allocate WQ for GSC, disabling FW\n"); | |
| 108 | + intel_uc_fw_change_status(&gsc->fw, INTEL_UC_FIRMWARE_NOT_SUPPORTED); | |
| 109 | + } | |
| 57 | 110 | } |
| 58 | 111 | |
| 59 | 112 | int intel_gsc_uc_init(struct intel_gsc_uc *gsc) |
| @@ -88,6 +141,9 @@ int intel_gsc_uc_init(struct intel_gsc_uc *gsc) · 28 unmodified lines | ||
| 88 | 141 | |
| 89 | 142 | gsc->ce = ce; |
| 90 | 143 | |
| 144 | + /* if we fail to init proxy we still want to load GSC for PM */ | |
| 145 | + intel_gsc_proxy_init(gsc); | |
| 146 | + | |
| 91 | 147 | intel_uc_fw_change_status(&gsc->fw, INTEL_UC_FIRMWARE_LOADABLE); |
| 92 | 148 | |
| 93 | 149 | return 0; |
| @@ -107,6 +163,12 @@ void intel_gsc_uc_fini(struct intel_gsc_uc *gsc) · 13 unmodified lines | ||
| 107 | 163 | return; |
| 108 | 164 | |
| 109 | 165 | flush_work(&gsc->work); |
| 166 | + if (gsc->wq) { | |
| 167 | + destroy_workqueue(gsc->wq); | |
| 168 | + gsc->wq = NULL; | |
| 169 | + } | |
| 170 | + | |
| 171 | + intel_gsc_proxy_fini(gsc); | |
| 110 | 172 | |
| 111 | 173 | if (gsc->ce) |
| 112 | 174 | intel_engine_destroy_pinned_context(fetch_and_zero(&gsc->ce)); |
| @@ -145,11 +207,17 @@ void intel_gsc_uc_resume(struct intel_gsc_uc *gsc) · 32 unmodified lines | ||
| 145 | 207 | |
| 146 | 208 | void intel_gsc_uc_load_start(struct intel_gsc_uc *gsc) |
| 147 | 209 | { |
| 210 | + struct intel_gt *gt = gsc_uc_to_gt(gsc); | |
| 211 | + | |
| 148 | 212 | if (!intel_uc_fw_is_loadable(&gsc->fw)) |
| 149 | 213 | return; |
| 150 | 214 | |
| 151 | 215 | if (intel_gsc_uc_fw_init_done(gsc)) |
| 152 | 216 | return; |
| 153 | 217 | |
| 154 | − queue_work(system_unbound_wq, &gsc->work); | |
| 218 | + spin_lock_irq(gt->irq_lock); | |
| 219 | + gsc->gsc_work_actions |= GSC_ACTION_FW_LOAD; | |
| 220 | + spin_unlock_irq(gt->irq_lock); | |
| 221 | + | |
| 222 | + queue_work(gsc->wq, &gsc->work); | |
| 155 | 223 | } |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | struct i915_vma; |
| 12 | 12 | struct intel_context; |
| 13 | +struct i915_gsc_proxy_component; | |
| 13 | 14 | |
| 14 | 15 | struct intel_gsc_uc { |
| 15 | 16 | /* Generic uC firmware management */ |
| @@ -19,7 +20,21 @@ struct intel_gsc_uc { · 3 unmodified lines | ||
| 19 | 20 | struct i915_vma *local; /* private memory for GSC usage */ |
| 20 | 21 | struct intel_context *ce; /* for submission to GSC FW via GSC engine */ |
| 21 | 22 | |
| 22 | − struct work_struct work; /* for delayed load */ | |
| 23 | + /* for delayed load and proxy handling */ | |
| 24 | + struct workqueue_struct *wq; | |
| 25 | + struct work_struct work; | |
| 26 | + u32 gsc_work_actions; /* protected by gt->irq_lock */ | |
| 27 | +#define GSC_ACTION_FW_LOAD BIT(0) | |
| 28 | +#define GSC_ACTION_SW_PROXY BIT(1) | |
| 29 | + | |
| 30 | + struct { | |
| 31 | + struct i915_gsc_proxy_component *component; | |
| 32 | + bool component_added; | |
| 33 | + struct i915_vma *vma; | |
| 34 | + void *to_gsc; | |
| 35 | + void *to_csme; | |
| 36 | + struct mutex mutex; /* protects the tee channel binding */ | |
| 37 | + } proxy; | |
| 23 | 38 | }; |
| 24 | 39 | |
| 25 | 40 | void intel_gsc_uc_init_early(struct intel_gsc_uc *gsc); |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | * Copyright © 2023 Intel Corporation |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | +#include "gt/intel_context.h" | |
| 6 | 7 | #include "gt/intel_engine_pm.h" |
| 7 | 8 | #include "gt/intel_gpu_commands.h" |
| 8 | 9 | #include "gt/intel_gt.h" |
| @@ -107,3 +108,104 @@ void intel_gsc_uc_heci_cmd_emit_mtl_header(struct intel_gsc_mtl_header *header, · 98 unmodified lines | ||
| 107 | 108 | header->header_version = MTL_GSC_HEADER_VERSION; |
| 108 | 109 | header->message_size = message_size; |
| 109 | 110 | } |
| 111 | + | |
| 112 | +static void | |
| 113 | +emit_gsc_heci_pkt_nonpriv(u32 *cmd, struct intel_gsc_heci_non_priv_pkt *pkt) | |
| 114 | +{ | |
| 115 | + *cmd++ = GSC_HECI_CMD_PKT; | |
| 116 | + *cmd++ = lower_32_bits(pkt->addr_in); | |
| 117 | + *cmd++ = upper_32_bits(pkt->addr_in); | |
| 118 | + *cmd++ = pkt->size_in; | |
| 119 | + *cmd++ = lower_32_bits(pkt->addr_out); | |
| 120 | + *cmd++ = upper_32_bits(pkt->addr_out); | |
| 121 | + *cmd++ = pkt->size_out; | |
| 122 | + *cmd++ = 0; | |
| 123 | + *cmd++ = MI_BATCH_BUFFER_END; | |
| 124 | +} | |
| 125 | + | |
| 126 | +int | |
| 127 | +intel_gsc_uc_heci_cmd_submit_nonpriv(struct intel_gsc_uc *gsc, | |
| 128 | + struct intel_context *ce, | |
| 129 | + struct intel_gsc_heci_non_priv_pkt *pkt, | |
| 130 | + u32 *cmd, int timeout_ms) | |
| 131 | +{ | |
| 132 | + struct intel_engine_cs *engine; | |
| 133 | + struct i915_gem_ww_ctx ww; | |
| 134 | + struct i915_request *rq; | |
| 135 | + int err, trials = 0; | |
| 136 | + | |
| 137 | + i915_gem_ww_ctx_init(&ww, false); | |
| 138 | +retry: | |
| 139 | + err = i915_gem_object_lock(pkt->bb_vma->obj, &ww); | |
| 140 | + if (err) | |
| 141 | + goto out_ww; | |
| 142 | + err = i915_gem_object_lock(pkt->heci_pkt_vma->obj, &ww); | |
| 143 | + if (err) | |
| 144 | + goto out_ww; | |
| 145 | + err = intel_context_pin_ww(ce, &ww); | |
| 146 | + if (err) | |
| 147 | + goto out_ww; | |
| 148 | + | |
| 149 | + rq = i915_request_create(ce); | |
| 150 | + if (IS_ERR(rq)) { | |
| 151 | + err = PTR_ERR(rq); | |
| 152 | + goto out_unpin_ce; | |
| 153 | + } | |
| 154 | + | |
| 155 | + emit_gsc_heci_pkt_nonpriv(cmd, pkt); | |
| 156 | + | |
| 157 | + err = i915_vma_move_to_active(pkt->bb_vma, rq, 0); | |
| 158 | + if (err) | |
| 159 | + goto out_rq; | |
| 160 | + err = i915_vma_move_to_active(pkt->heci_pkt_vma, rq, EXEC_OBJECT_WRITE); | |
| 161 | + if (err) | |
| 162 | + goto out_rq; | |
| 163 | + | |
| 164 | + engine = rq->context->engine; | |
| 165 | + if (engine->emit_init_breadcrumb) { | |
| 166 | + err = engine->emit_init_breadcrumb(rq); | |
| 167 | + if (err) | |
| 168 | + goto out_rq; | |
| 169 | + } | |
| 170 | + | |
| 171 | + err = engine->emit_bb_start(rq, i915_vma_offset(pkt->bb_vma), PAGE_SIZE, 0); | |
| 172 | + if (err) | |
| 173 | + goto out_rq; | |
| 174 | + | |
| 175 | + err = ce->engine->emit_flush(rq, 0); | |
| 176 | + if (err) | |
| 177 | + drm_err(&gsc_uc_to_gt(gsc)->i915->drm, | |
| 178 | + "Failed emit-flush for gsc-heci-non-priv-pkterr=%d\n", err); | |
| 179 | + | |
| 180 | +out_rq: | |
| 181 | + i915_request_get(rq); | |
| 182 | + | |
| 183 | + if (unlikely(err)) | |
| 184 | + i915_request_set_error_once(rq, err); | |
| 185 | + | |
| 186 | + i915_request_add(rq); | |
| 187 | + | |
| 188 | + if (!err) { | |
| 189 | + if (i915_request_wait(rq, I915_WAIT_INTERRUPTIBLE, | |
| 190 | + msecs_to_jiffies(timeout_ms)) < 0) | |
| 191 | + err = -ETIME; | |
| 192 | + } | |
| 193 | + | |
| 194 | + i915_request_put(rq); | |
| 195 | + | |
| 196 | +out_unpin_ce: | |
| 197 | + intel_context_unpin(ce); | |
| 198 | +out_ww: | |
| 199 | + if (err == -EDEADLK) { | |
| 200 | + err = i915_gem_ww_ctx_backoff(&ww); | |
| 201 | + if (!err) { | |
| 202 | + if (++trials < 10) | |
| 203 | + goto retry; | |
| 204 | + else | |
| 205 | + err = EAGAIN; | |
| 206 | + } | |
| 207 | + } | |
| 208 | + i915_gem_ww_ctx_fini(&ww); | |
| 209 | + | |
| 210 | + return err; | |
| 211 | +} | |
| @@ -8,12 +8,16 @@ · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | #include <linux/types.h> |
| 10 | 10 | |
| 11 | +struct i915_vma; | |
| 12 | +struct intel_context; | |
| 11 | 13 | struct intel_gsc_uc; |
| 14 | + | |
| 12 | 15 | struct intel_gsc_mtl_header { |
| 13 | 16 | u32 validity_marker; |
| 14 | 17 | #define GSC_HECI_VALIDITY_MARKER 0xA578875A |
| 15 | 18 | |
| 16 | 19 | u8 heci_client_id; |
| 20 | +#define HECI_MEADDRESS_PROXY 10 | |
| 17 | 21 | #define HECI_MEADDRESS_PXP 17 |
| 18 | 22 | #define HECI_MEADDRESS_HDCP 18 |
| 19 | 23 | |
| @@ -47,7 +51,8 @@ struct intel_gsc_mtl_header { · 27 unmodified lines | ||
| 47 | 51 | * we distinguish the flags using OUTFLAG or INFLAG |
| 48 | 52 | */ |
| 49 | 53 | u32 flags; |
| 50 | −#define GSC_OUTFLAG_MSG_PENDING 1 | |
| 54 | +#define GSC_OUTFLAG_MSG_PENDING BIT(0) | |
| 55 | +#define GSC_INFLAG_MSG_CLEANUP BIT(1) | |
| 51 | 56 | |
| 52 | 57 | u32 status; |
| 53 | 58 | } __packed; |
| @@ -58,4 +63,24 @@ int intel_gsc_uc_heci_cmd_submit_packet(struct intel_gsc_uc *gsc, · 4 unmodified lines | ||
| 58 | 63 | void intel_gsc_uc_heci_cmd_emit_mtl_header(struct intel_gsc_mtl_header *header, |
| 59 | 64 | u8 heci_client_id, u32 message_size, |
| 60 | 65 | u64 host_session_id); |
| 66 | + | |
| 67 | +struct intel_gsc_heci_non_priv_pkt { | |
| 68 | + u64 addr_in; | |
| 69 | + u32 size_in; | |
| 70 | + u64 addr_out; | |
| 71 | + u32 size_out; | |
| 72 | + struct i915_vma *heci_pkt_vma; | |
| 73 | + struct i915_vma *bb_vma; | |
| 74 | +}; | |
| 75 | + | |
| 76 | +void | |
| 77 | +intel_gsc_uc_heci_cmd_emit_mtl_header(struct intel_gsc_mtl_header *header, | |
| 78 | + u8 heci_client_id, u32 msg_size, | |
| 79 | + u64 host_session_id); | |
| 80 | + | |
| 81 | +int | |
| 82 | +intel_gsc_uc_heci_cmd_submit_nonpriv(struct intel_gsc_uc *gsc, | |
| 83 | + struct intel_context *ce, | |
| 84 | + struct intel_gsc_heci_non_priv_pkt *pkt, | |
| 85 | + u32 *cs, int timeout_ms); | |
| 61 | 86 | #endif |
| @@ -744,6 +744,13 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size) · 743 unmodified lines | ||
| 744 | 744 | if (IS_ERR(obj)) |
| 745 | 745 | return ERR_CAST(obj); |
| 746 | 746 | |
| 747 | + /* | |
| 748 | + * Wa_22016122933: For MTL the shared memory needs to be mapped | |
| 749 | + * as WC on CPU side and UC (PAT index 2) on GPU side | |
| 750 | + */ | |
| 751 | + if (IS_METEORLAKE(gt->i915)) | |
| 752 | + i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE); | |
| 753 | + | |
| 747 | 754 | vma = i915_vma_instance(obj, >->ggtt->vm, NULL); |
| 748 | 755 | if (IS_ERR(vma)) |
| 749 | 756 | goto err; |
| @@ -42,6 +42,7 @@ struct intel_guc { · 41 unmodified lines | ||
| 42 | 42 | /** @capture: the error-state-capture module's data and objects */ |
| 43 | 43 | struct intel_guc_state_capture *capture; |
| 44 | 44 | |
| 45 | + /** @dbgfs_node: debugfs node */ | |
| 45 | 46 | struct dentry *dbgfs_node; |
| 46 | 47 | |
| 47 | 48 | /** @sched_engine: Global engine used to submit requests to GuC */ |
| @@ -643,6 +643,39 @@ static void guc_init_golden_context(struct intel_guc *guc) · 642 unmodified lines | ||
| 643 | 643 | GEM_BUG_ON(guc->ads_golden_ctxt_size != total_size); |
| 644 | 644 | } |
| 645 | 645 | |
| 646 | +static u32 guc_get_capture_engine_mask(struct iosys_map *info_map, u32 capture_class) | |
| 647 | +{ | |
| 648 | + u32 mask; | |
| 649 | + | |
| 650 | + switch (capture_class) { | |
| 651 | + case GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE: | |
| 652 | + mask = info_map_read(info_map, engine_enabled_masks[GUC_RENDER_CLASS]); | |
| 653 | + mask |= info_map_read(info_map, engine_enabled_masks[GUC_COMPUTE_CLASS]); | |
| 654 | + break; | |
| 655 | + | |
| 656 | + case GUC_CAPTURE_LIST_CLASS_VIDEO: | |
| 657 | + mask = info_map_read(info_map, engine_enabled_masks[GUC_VIDEO_CLASS]); | |
| 658 | + break; | |
| 659 | + | |
| 660 | + case GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE: | |
| 661 | + mask = info_map_read(info_map, engine_enabled_masks[GUC_VIDEOENHANCE_CLASS]); | |
| 662 | + break; | |
| 663 | + | |
| 664 | + case GUC_CAPTURE_LIST_CLASS_BLITTER: | |
| 665 | + mask = info_map_read(info_map, engine_enabled_masks[GUC_BLITTER_CLASS]); | |
| 666 | + break; | |
| 667 | + | |
| 668 | + case GUC_CAPTURE_LIST_CLASS_GSC_OTHER: | |
| 669 | + mask = info_map_read(info_map, engine_enabled_masks[GUC_GSC_OTHER_CLASS]); | |
| 670 | + break; | |
| 671 | + | |
| 672 | + default: | |
| 673 | + mask = 0; | |
| 674 | + } | |
| 675 | + | |
| 676 | + return mask; | |
| 677 | +} | |
| 678 | + | |
| 646 | 679 | static int |
| 647 | 680 | guc_capture_prep_lists(struct intel_guc *guc) |
| 648 | 681 | { |
| @@ -678,9 +711,10 @@ guc_capture_prep_lists(struct intel_guc *guc) · 29 unmodified lines | ||
| 678 | 711 | |
| 679 | 712 | for (i = 0; i < GUC_CAPTURE_LIST_INDEX_MAX; i++) { |
| 680 | 713 | for (j = 0; j < GUC_MAX_ENGINE_CLASSES; j++) { |
| 714 | + u32 engine_mask = guc_get_capture_engine_mask(&info_map, j); | |
| 681 | 715 | |
| 682 | 716 | /* null list if we dont have said engine or list */ |
| 683 | − if (!info_map_read(&info_map, engine_enabled_masks[j])) { | |
| 717 | + if (!engine_mask) { | |
| 684 | 718 | if (ads_is_mapped) { |
| 685 | 719 | ads_blob_write(guc, ads.capture_class[i][j], null_ggtt); |
| 686 | 720 | ads_blob_write(guc, ads.capture_instance[i][j], null_ggtt); |
| @@ -30,13 +30,15 @@ · 29 unmodified lines | ||
| 30 | 30 | #define COMMON_BASE_GLOBAL \ |
| 31 | 31 | { FORCEWAKE_MT, 0, 0, "FORCEWAKE" } |
| 32 | 32 | |
| 33 | −#define COMMON_GEN9BASE_GLOBAL \ | |
| 34 | − { GEN8_FAULT_TLB_DATA0, 0, 0, "GEN8_FAULT_TLB_DATA0" }, \ | |
| 35 | − { GEN8_FAULT_TLB_DATA1, 0, 0, "GEN8_FAULT_TLB_DATA1" }, \ | |
| 33 | +#define COMMON_GEN8BASE_GLOBAL \ | |
| 36 | 34 | { ERROR_GEN6, 0, 0, "ERROR_GEN6" }, \ |
| 37 | 35 | { DONE_REG, 0, 0, "DONE_REG" }, \ |
| 38 | 36 | { HSW_GTT_CACHE_EN, 0, 0, "HSW_GTT_CACHE_EN" } |
| 39 | 37 | |
| 38 | +#define GEN8_GLOBAL \ | |
| 39 | + { GEN8_FAULT_TLB_DATA0, 0, 0, "GEN8_FAULT_TLB_DATA0" }, \ | |
| 40 | + { GEN8_FAULT_TLB_DATA1, 0, 0, "GEN8_FAULT_TLB_DATA1" } | |
| 41 | + | |
| 40 | 42 | #define COMMON_GEN12BASE_GLOBAL \ |
| 41 | 43 | { GEN12_FAULT_TLB_DATA0, 0, 0, "GEN12_FAULT_TLB_DATA0" }, \ |
| 42 | 44 | { GEN12_FAULT_TLB_DATA1, 0, 0, "GEN12_FAULT_TLB_DATA1" }, \ |
| @@ -94,66 +96,65 @@ · 51 unmodified lines | ||
| 94 | 96 | { GEN12_SFC_DONE(2), 0, 0, "SFC_DONE[2]" }, \ |
| 95 | 97 | { GEN12_SFC_DONE(3), 0, 0, "SFC_DONE[3]" } |
| 96 | 98 | |
| 97 | −/* XE_LPD - Global */ | |
| 98 | −static const struct __guc_mmio_reg_descr xe_lpd_global_regs[] = { | |
| 99 | +/* XE_LP Global */ | |
| 100 | +static const struct __guc_mmio_reg_descr xe_lp_global_regs[] = { | |
| 99 | 101 | COMMON_BASE_GLOBAL, |
| 100 | − COMMON_GEN9BASE_GLOBAL, | |
| 102 | + COMMON_GEN8BASE_GLOBAL, | |
| 101 | 103 | COMMON_GEN12BASE_GLOBAL, |
| 102 | 104 | }; |
| 103 | 105 | |
| 104 | −/* XE_LPD - Render / Compute Per-Class */ | |
| 105 | −static const struct __guc_mmio_reg_descr xe_lpd_rc_class_regs[] = { | |
| 106 | +/* XE_LP Render / Compute Per-Class */ | |
| 107 | +static const struct __guc_mmio_reg_descr xe_lp_rc_class_regs[] = { | |
| 106 | 108 | COMMON_BASE_HAS_EU, |
| 107 | 109 | COMMON_BASE_RENDER, |
| 108 | 110 | COMMON_GEN12BASE_RENDER, |
| 109 | 111 | }; |
| 110 | 112 | |
| 111 | −/* GEN9/XE_LPD - Render / Compute Per-Engine-Instance */ | |
| 112 | −static const struct __guc_mmio_reg_descr xe_lpd_rc_inst_regs[] = { | |
| 113 | +/* GEN8+ Render / Compute Per-Engine-Instance */ | |
| 114 | +static const struct __guc_mmio_reg_descr gen8_rc_inst_regs[] = { | |
| 113 | 115 | COMMON_BASE_ENGINE_INSTANCE, |
| 114 | 116 | }; |
| 115 | 117 | |
| 116 | −/* GEN9/XE_LPD - Media Decode/Encode Per-Engine-Instance */ | |
| 117 | −static const struct __guc_mmio_reg_descr xe_lpd_vd_inst_regs[] = { | |
| 118 | +/* GEN8+ Media Decode/Encode Per-Engine-Instance */ | |
| 119 | +static const struct __guc_mmio_reg_descr gen8_vd_inst_regs[] = { | |
| 118 | 120 | COMMON_BASE_ENGINE_INSTANCE, |
| 119 | 121 | }; |
| 120 | 122 | |
| 121 | −/* XE_LPD - Video Enhancement Per-Class */ | |
| 122 | −static const struct __guc_mmio_reg_descr xe_lpd_vec_class_regs[] = { | |
| 123 | +/* XE_LP Video Enhancement Per-Class */ | |
| 124 | +static const struct __guc_mmio_reg_descr xe_lp_vec_class_regs[] = { | |
| 123 | 125 | COMMON_GEN12BASE_VEC, |
| 124 | 126 | }; |
| 125 | 127 | |
| 126 | −/* GEN9/XE_LPD - Video Enhancement Per-Engine-Instance */ | |
| 127 | −static const struct __guc_mmio_reg_descr xe_lpd_vec_inst_regs[] = { | |
| 128 | +/* GEN8+ Video Enhancement Per-Engine-Instance */ | |
| 129 | +static const struct __guc_mmio_reg_descr gen8_vec_inst_regs[] = { | |
| 128 | 130 | COMMON_BASE_ENGINE_INSTANCE, |
| 129 | 131 | }; |
| 130 | 132 | |
| 131 | −/* GEN9/XE_LPD - Blitter Per-Engine-Instance */ | |
| 132 | −static const struct __guc_mmio_reg_descr xe_lpd_blt_inst_regs[] = { | |
| 133 | +/* GEN8+ Blitter Per-Engine-Instance */ | |
| 134 | +static const struct __guc_mmio_reg_descr gen8_blt_inst_regs[] = { | |
| 133 | 135 | COMMON_BASE_ENGINE_INSTANCE, |
| 134 | 136 | }; |
| 135 | 137 | |
| 136 | −/* XE_LPD - GSC Per-Engine-Instance */ | |
| 137 | −static const struct __guc_mmio_reg_descr xe_lpd_gsc_inst_regs[] = { | |
| 138 | +/* XE_LP - GSC Per-Engine-Instance */ | |
| 139 | +static const struct __guc_mmio_reg_descr xe_lp_gsc_inst_regs[] = { | |
| 138 | 140 | COMMON_BASE_ENGINE_INSTANCE, |
| 139 | 141 | }; |
| 140 | 142 | |
| 141 | −/* GEN9 - Global */ | |
| 142 | −static const struct __guc_mmio_reg_descr default_global_regs[] = { | |
| 143 | +/* GEN8 - Global */ | |
| 144 | +static const struct __guc_mmio_reg_descr gen8_global_regs[] = { | |
| 143 | 145 | COMMON_BASE_GLOBAL, |
| 144 | − COMMON_GEN9BASE_GLOBAL, | |
| 146 | + COMMON_GEN8BASE_GLOBAL, | |
| 147 | + GEN8_GLOBAL, | |
| 145 | 148 | }; |
| 146 | 149 | |
| 147 | −static const struct __guc_mmio_reg_descr default_rc_class_regs[] = { | |
| 150 | +static const struct __guc_mmio_reg_descr gen8_rc_class_regs[] = { | |
| 148 | 151 | COMMON_BASE_HAS_EU, |
| 149 | 152 | COMMON_BASE_RENDER, |
| 150 | 153 | }; |
| 151 | 154 | |
| 152 | 155 | /* |
| 153 | − * Empty lists: | |
| 154 | − * GEN9/XE_LPD - Blitter Per-Class | |
| 155 | − * GEN9/XE_LPD - Media Decode/Encode Per-Class | |
| 156 | − * GEN9 - VEC Class | |
| 156 | + * Empty list to prevent warnings about unknown class/instance types | |
| 157 | + * as not all class/instanace types have entries on all platforms. | |
| 157 | 158 | */ |
| 158 | 159 | static const struct __guc_mmio_reg_descr empty_regs_list[] = { |
| 159 | 160 | }; |
| @@ -171,37 +172,33 @@ static const struct __guc_mmio_reg_descr empty_regs_list[] = { · 11 unmodified lines | ||
| 171 | 172 | } |
| 172 | 173 | |
| 173 | 174 | /* List of lists */ |
| 174 | −static const struct __guc_mmio_reg_descr_group default_lists[] = { | |
| 175 | − MAKE_REGLIST(default_global_regs, PF, GLOBAL, 0), | |
| 176 | − MAKE_REGLIST(default_rc_class_regs, PF, ENGINE_CLASS, GUC_RENDER_CLASS), | |
| 177 | − MAKE_REGLIST(xe_lpd_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_RENDER_CLASS), | |
| 178 | − MAKE_REGLIST(default_rc_class_regs, PF, ENGINE_CLASS, GUC_COMPUTE_CLASS), | |
| 179 | − MAKE_REGLIST(xe_lpd_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_COMPUTE_CLASS), | |
| 180 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_VIDEO_CLASS), | |
| 181 | − MAKE_REGLIST(xe_lpd_vd_inst_regs, PF, ENGINE_INSTANCE, GUC_VIDEO_CLASS), | |
| 182 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_VIDEOENHANCE_CLASS), | |
| 183 | − MAKE_REGLIST(xe_lpd_vec_inst_regs, PF, ENGINE_INSTANCE, GUC_VIDEOENHANCE_CLASS), | |
| 184 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_BLITTER_CLASS), | |
| 185 | − MAKE_REGLIST(xe_lpd_blt_inst_regs, PF, ENGINE_INSTANCE, GUC_BLITTER_CLASS), | |
| 186 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_GSC_OTHER_CLASS), | |
| 187 | − MAKE_REGLIST(xe_lpd_gsc_inst_regs, PF, ENGINE_INSTANCE, GUC_GSC_OTHER_CLASS), | |
| 175 | +static const struct __guc_mmio_reg_descr_group gen8_lists[] = { | |
| 176 | + MAKE_REGLIST(gen8_global_regs, PF, GLOBAL, 0), | |
| 177 | + MAKE_REGLIST(gen8_rc_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE), | |
| 178 | + MAKE_REGLIST(gen8_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE), | |
| 179 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEO), | |
| 180 | + MAKE_REGLIST(gen8_vd_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEO), | |
| 181 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE), | |
| 182 | + MAKE_REGLIST(gen8_vec_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE), | |
| 183 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_BLITTER), | |
| 184 | + MAKE_REGLIST(gen8_blt_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_BLITTER), | |
| 185 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_GSC_OTHER), | |
| 186 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_GSC_OTHER), | |
| 188 | 187 | {} |
| 189 | 188 | }; |
| 190 | 189 | |
| 191 | −static const struct __guc_mmio_reg_descr_group xe_lpd_lists[] = { | |
| 192 | − MAKE_REGLIST(xe_lpd_global_regs, PF, GLOBAL, 0), | |
| 193 | − MAKE_REGLIST(xe_lpd_rc_class_regs, PF, ENGINE_CLASS, GUC_RENDER_CLASS), | |
| 194 | − MAKE_REGLIST(xe_lpd_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_RENDER_CLASS), | |
| 195 | − MAKE_REGLIST(xe_lpd_rc_class_regs, PF, ENGINE_CLASS, GUC_COMPUTE_CLASS), | |
| 196 | − MAKE_REGLIST(xe_lpd_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_COMPUTE_CLASS), | |
| 197 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_VIDEO_CLASS), | |
| 198 | − MAKE_REGLIST(xe_lpd_vd_inst_regs, PF, ENGINE_INSTANCE, GUC_VIDEO_CLASS), | |
| 199 | − MAKE_REGLIST(xe_lpd_vec_class_regs, PF, ENGINE_CLASS, GUC_VIDEOENHANCE_CLASS), | |
| 200 | − MAKE_REGLIST(xe_lpd_vec_inst_regs, PF, ENGINE_INSTANCE, GUC_VIDEOENHANCE_CLASS), | |
| 201 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_BLITTER_CLASS), | |
| 202 | − MAKE_REGLIST(xe_lpd_blt_inst_regs, PF, ENGINE_INSTANCE, GUC_BLITTER_CLASS), | |
| 203 | − MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_GSC_OTHER_CLASS), | |
| 204 | − MAKE_REGLIST(xe_lpd_gsc_inst_regs, PF, ENGINE_INSTANCE, GUC_GSC_OTHER_CLASS), | |
| 190 | +static const struct __guc_mmio_reg_descr_group xe_lp_lists[] = { | |
| 191 | + MAKE_REGLIST(xe_lp_global_regs, PF, GLOBAL, 0), | |
| 192 | + MAKE_REGLIST(xe_lp_rc_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE), | |
| 193 | + MAKE_REGLIST(gen8_rc_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE), | |
| 194 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEO), | |
| 195 | + MAKE_REGLIST(gen8_vd_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEO), | |
| 196 | + MAKE_REGLIST(xe_lp_vec_class_regs, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE), | |
| 197 | + MAKE_REGLIST(gen8_vec_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE), | |
| 198 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_BLITTER), | |
| 199 | + MAKE_REGLIST(gen8_blt_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_BLITTER), | |
| 200 | + MAKE_REGLIST(empty_regs_list, PF, ENGINE_CLASS, GUC_CAPTURE_LIST_CLASS_GSC_OTHER), | |
| 201 | + MAKE_REGLIST(xe_lp_gsc_inst_regs, PF, ENGINE_INSTANCE, GUC_CAPTURE_LIST_CLASS_GSC_OTHER), | |
| 205 | 202 | {} |
| 206 | 203 | }; |
| 207 | 204 | |
| @@ -257,11 +254,15 @@ struct __ext_steer_reg { · 49 unmodified lines | ||
| 257 | 254 | i915_mcr_reg_t reg; |
| 258 | 255 | }; |
| 259 | 256 | |
| 260 | −static const struct __ext_steer_reg xe_extregs[] = { | |
| 257 | +static const struct __ext_steer_reg gen8_extregs[] = { | |
| 261 | 258 | {"GEN8_SAMPLER_INSTDONE", GEN8_SAMPLER_INSTDONE}, |
| 262 | 259 | {"GEN8_ROW_INSTDONE", GEN8_ROW_INSTDONE} |
| 263 | 260 | }; |
| 264 | 261 | |
| 262 | +static const struct __ext_steer_reg xehpg_extregs[] = { | |
| 263 | + {"XEHPG_INSTDONE_GEOM_SVG", XEHPG_INSTDONE_GEOM_SVG} | |
| 264 | +}; | |
| 265 | + | |
| 265 | 266 | static void __fill_ext_reg(struct __guc_mmio_reg_descr *ext, |
| 266 | 267 | const struct __ext_steer_reg *extlist, |
| 267 | 268 | int slice_id, int subslice_id) |
| @@ -292,8 +293,8 @@ __alloc_ext_regs(struct __guc_mmio_reg_descr_group *newlist, · 24 unmodified lines | ||
| 292 | 293 | } |
| 293 | 294 | |
| 294 | 295 | static void |
| 295 | −guc_capture_alloc_steered_lists_xe_lpd(struct intel_guc *guc, | |
| 296 | − const struct __guc_mmio_reg_descr_group *lists) | |
| 296 | +guc_capture_alloc_steered_lists(struct intel_guc *guc, | |
| 297 | + const struct __guc_mmio_reg_descr_group *lists) | |
| 297 | 298 | { |
| 298 | 299 | struct intel_gt *gt = guc_to_gt(guc); |
| 299 | 300 | int slice, subslice, iter, i, num_steer_regs, num_tot_regs = 0; |
| @@ -301,74 +302,20 @@ guc_capture_alloc_steered_lists_xe_lpd(struct intel_guc *guc, · 1 unmodified line | ||
| 301 | 302 | struct __guc_mmio_reg_descr_group *extlists; |
| 302 | 303 | struct __guc_mmio_reg_descr *extarray; |
| 303 | 304 | struct sseu_dev_info *sseu; |
| 305 | + bool has_xehpg_extregs; | |
| 304 | 306 | |
| 305 | − /* In XE_LPD we only have steered registers for the render-class */ | |
| 307 | + /* steered registers currently only exist for the render-class */ | |
| 306 | 308 | list = guc_capture_get_one_list(lists, GUC_CAPTURE_LIST_INDEX_PF, |
| 307 | − GUC_CAPTURE_LIST_TYPE_ENGINE_CLASS, GUC_RENDER_CLASS); | |
| 309 | + GUC_CAPTURE_LIST_TYPE_ENGINE_CLASS, | |
| 310 | + GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE); | |
| 308 | 311 | /* skip if extlists was previously allocated */ |
| 309 | 312 | if (!list || guc->capture->extlists) |
| 310 | 313 | return; |
| 311 | 314 | |
| 312 | − num_steer_regs = ARRAY_SIZE(xe_extregs); | |
| 313 | − | |
| 314 | − sseu = >->info.sseu; | |
| 315 | − for_each_ss_steering(iter, gt, slice, subslice) | |
| 316 | − num_tot_regs += num_steer_regs; | |
| 317 | − | |
| 318 | − if (!num_tot_regs) | |
| 319 | − return; | |
| 320 | − | |
| 321 | − /* allocate an extra for an end marker */ | |
| 322 | − extlists = kcalloc(2, sizeof(struct __guc_mmio_reg_descr_group), GFP_KERNEL); | |
| 323 | − if (!extlists) | |
| 324 | − return; | |
| 315 | + has_xehpg_extregs = GRAPHICS_VER_FULL(gt->i915) >= IP_VER(12, 55); | |
| 325 | 316 | |
| 326 | − if (__alloc_ext_regs(&extlists[0], list, num_tot_regs)) { | |
| 327 | − kfree(extlists); | |
| 328 | − return; | |
| 329 | − } | |
| 330 | − | |
| 331 | − extarray = extlists[0].extlist; | |
| 332 | − for_each_ss_steering(iter, gt, slice, subslice) { | |
| 333 | − for (i = 0; i < num_steer_regs; ++i) { | |
| 334 | − __fill_ext_reg(extarray, &xe_extregs[i], slice, subslice); | |
| 335 | − ++extarray; | |
| 336 | − } | |
| 337 | − } | |
| 338 | − | |
| 339 | − guc->capture->extlists = extlists; | |
| 340 | −} | |
| 341 | − | |
| 342 | −static const struct __ext_steer_reg xehpg_extregs[] = { | |
| 343 | − {"XEHPG_INSTDONE_GEOM_SVG", XEHPG_INSTDONE_GEOM_SVG} | |
| 344 | −}; | |
| 345 | − | |
| 346 | −static bool __has_xehpg_extregs(u32 ipver) | |
| 347 | −{ | |
| 348 | − return (ipver >= IP_VER(12, 55)); | |
| 349 | −} | |
| 350 | − | |
| 351 | −static void | |
| 352 | −guc_capture_alloc_steered_lists_xe_hpg(struct intel_guc *guc, | |
| 353 | − const struct __guc_mmio_reg_descr_group *lists, | |
| 354 | − u32 ipver) | |
| 355 | −{ | |
| 356 | − struct intel_gt *gt = guc_to_gt(guc); | |
| 357 | − struct sseu_dev_info *sseu; | |
| 358 | − int slice, subslice, i, iter, num_steer_regs, num_tot_regs = 0; | |
| 359 | − const struct __guc_mmio_reg_descr_group *list; | |
| 360 | − struct __guc_mmio_reg_descr_group *extlists; | |
| 361 | − struct __guc_mmio_reg_descr *extarray; | |
| 362 | − | |
| 363 | − /* In XE_LP / HPG we only have render-class steering registers during error-capture */ | |
| 364 | − list = guc_capture_get_one_list(lists, GUC_CAPTURE_LIST_INDEX_PF, | |
| 365 | − GUC_CAPTURE_LIST_TYPE_ENGINE_CLASS, GUC_RENDER_CLASS); | |
| 366 | − /* skip if extlists was previously allocated */ | |
| 367 | − if (!list || guc->capture->extlists) | |
| 368 | − return; | |
| 369 | − | |
| 370 | − num_steer_regs = ARRAY_SIZE(xe_extregs); | |
| 371 | − if (__has_xehpg_extregs(ipver)) | |
| 317 | + num_steer_regs = ARRAY_SIZE(gen8_extregs); | |
| 318 | + if (has_xehpg_extregs) | |
| 372 | 319 | num_steer_regs += ARRAY_SIZE(xehpg_extregs); |
| 373 | 320 | |
| 374 | 321 | sseu = >->info.sseu; |
| @@ -390,11 +337,12 @@ guc_capture_alloc_steered_lists_xe_hpg(struct intel_guc *guc, · 15 unmodified lines | ||
| 390 | 337 | |
| 391 | 338 | extarray = extlists[0].extlist; |
| 392 | 339 | for_each_ss_steering(iter, gt, slice, subslice) { |
| 393 | − for (i = 0; i < ARRAY_SIZE(xe_extregs); ++i) { | |
| 394 | − __fill_ext_reg(extarray, &xe_extregs[i], slice, subslice); | |
| 340 | + for (i = 0; i < ARRAY_SIZE(gen8_extregs); ++i) { | |
| 341 | + __fill_ext_reg(extarray, &gen8_extregs[i], slice, subslice); | |
| 395 | 342 | ++extarray; |
| 396 | 343 | } |
| 397 | − if (__has_xehpg_extregs(ipver)) { | |
| 344 | + | |
| 345 | + if (has_xehpg_extregs) { | |
| 398 | 346 | for (i = 0; i < ARRAY_SIZE(xehpg_extregs); ++i) { |
| 399 | 347 | __fill_ext_reg(extarray, &xehpg_extregs[i], slice, subslice); |
| 400 | 348 | ++extarray; |
| @@ -410,26 +358,22 @@ static const struct __guc_mmio_reg_descr_group * · 9 unmodified lines | ||
| 410 | 358 | guc_capture_get_device_reglist(struct intel_guc *guc) |
| 411 | 359 | { |
| 412 | 360 | struct drm_i915_private *i915 = guc_to_gt(guc)->i915; |
| 361 | + const struct __guc_mmio_reg_descr_group *lists; | |
| 413 | 362 | |
| 414 | − if (GRAPHICS_VER(i915) > 11) { | |
| 415 | − /* | |
| 416 | − * For certain engine classes, there are slice and subslice | |
| 417 | − * level registers requiring steering. We allocate and populate | |
| 418 | − * these at init time based on hw config add it as an extension | |
| 419 | − * list at the end of the pre-populated render list. | |
| 420 | − */ | |
| 421 | − if (IS_DG2(i915)) | |
| 422 | − guc_capture_alloc_steered_lists_xe_hpg(guc, xe_lpd_lists, IP_VER(12, 55)); | |
| 423 | − else if (IS_XEHPSDV(i915)) | |
| 424 | − guc_capture_alloc_steered_lists_xe_hpg(guc, xe_lpd_lists, IP_VER(12, 50)); | |
| 425 | − else | |
| 426 | − guc_capture_alloc_steered_lists_xe_lpd(guc, xe_lpd_lists); | |
| 363 | + if (GRAPHICS_VER(i915) >= 12) | |
| 364 | + lists = xe_lp_lists; | |
| 365 | + else | |
| 366 | + lists = gen8_lists; | |
| 427 | 367 | |
| 428 | − return xe_lpd_lists; | |
| 429 | − } | |
| 368 | + /* | |
| 369 | + * For certain engine classes, there are slice and subslice | |
| 370 | + * level registers requiring steering. We allocate and populate | |
| 371 | + * these at init time based on hw config add it as an extension | |
| 372 | + * list at the end of the pre-populated render list. | |
| 373 | + */ | |
| 374 | + guc_capture_alloc_steered_lists(guc, lists); | |
| 430 | 375 | |
| 431 | − /* if GuC submission is enabled on a non-POR platform, just use a common baseline */ | |
| 432 | − return default_lists; | |
| 376 | + return lists; | |
| 433 | 377 | } |
| 434 | 378 | |
| 435 | 379 | static const char * |
| @@ -453,17 +397,15 @@ static const char * · 17 unmodified lines | ||
| 453 | 397 | __stringify_engclass(u32 class) |
| 454 | 398 | { |
| 455 | 399 | switch (class) { |
| 456 | − case GUC_RENDER_CLASS: | |
| 457 | − return "Render"; | |
| 458 | − case GUC_VIDEO_CLASS: | |
| 400 | + case GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE: | |
| 401 | + return "Render/Compute"; | |
| 402 | + case GUC_CAPTURE_LIST_CLASS_VIDEO: | |
| 459 | 403 | return "Video"; |
| 460 | − case GUC_VIDEOENHANCE_CLASS: | |
| 404 | + case GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE: | |
| 461 | 405 | return "VideoEnhance"; |
| 462 | − case GUC_BLITTER_CLASS: | |
| 406 | + case GUC_CAPTURE_LIST_CLASS_BLITTER: | |
| 463 | 407 | return "Blitter"; |
| 464 | − case GUC_COMPUTE_CLASS: | |
| 465 | − return "Compute"; | |
| 466 | − case GUC_GSC_OTHER_CLASS: | |
| 408 | + case GUC_CAPTURE_LIST_CLASS_GSC_OTHER: | |
| 467 | 409 | return "GSC-Other"; |
| 468 | 410 | default: |
| 469 | 411 | break; |
| @@ -1593,6 +1535,36 @@ void intel_guc_capture_free_node(struct intel_engine_coredump *ee) · 1123 unmodified lines | ||
| 1593 | 1535 | ee->guc_capture_node = NULL; |
| 1594 | 1536 | } |
| 1595 | 1537 | |
| 1538 | +bool intel_guc_capture_is_matching_engine(struct intel_gt *gt, | |
| 1539 | + struct intel_context *ce, | |
| 1540 | + struct intel_engine_cs *engine) | |
| 1541 | +{ | |
| 1542 | + struct __guc_capture_parsed_output *n; | |
| 1543 | + struct intel_guc *guc; | |
| 1544 | + | |
| 1545 | + if (!gt || !ce || !engine) | |
| 1546 | + return false; | |
| 1547 | + | |
| 1548 | + guc = >->uc.guc; | |
| 1549 | + if (!guc->capture) | |
| 1550 | + return false; | |
| 1551 | + | |
| 1552 | + /* | |
| 1553 | + * Look for a matching GuC reported error capture node from | |
| 1554 | + * the internal output link-list based on lrca, guc-id and engine | |
| 1555 | + * identification. | |
| 1556 | + */ | |
| 1557 | + list_for_each_entry(n, &guc->capture->outlist, link) { | |
| 1558 | + if (n->eng_inst == GUC_ID_TO_ENGINE_INSTANCE(engine->guc_id) && | |
| 1559 | + n->eng_class == GUC_ID_TO_ENGINE_CLASS(engine->guc_id) && | |
| 1560 | + n->guc_id == ce->guc_id.id && | |
| 1561 | + (n->lrca & CTX_GTT_ADDRESS_MASK) == (ce->lrc.lrca & CTX_GTT_ADDRESS_MASK)) | |
| 1562 | + return true; | |
| 1563 | + } | |
| 1564 | + | |
| 1565 | + return false; | |
| 1566 | +} | |
| 1567 | + | |
| 1596 | 1568 | void intel_guc_capture_get_matching_node(struct intel_gt *gt, |
| 1597 | 1569 | struct intel_engine_coredump *ee, |
| 1598 | 1570 | struct intel_context *ce) |
| @@ -1608,6 +1580,7 @@ void intel_guc_capture_get_matching_node(struct intel_gt *gt, · 9 unmodified lines | ||
| 1608 | 1580 | return; |
| 1609 | 1581 | |
| 1610 | 1582 | GEM_BUG_ON(ee->guc_capture_node); |
| 1583 | + | |
| 1611 | 1584 | /* |
| 1612 | 1585 | * Look for a matching GuC reported error capture node from |
| 1613 | 1586 | * the internal output link-list based on lrca, guc-id and engine |
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | struct drm_i915_error_state_buf; |
| 12 | 12 | struct guc_gt_system_info; |
| 13 | 13 | struct intel_engine_coredump; |
| 14 | +struct intel_engine_cs; | |
| 14 | 15 | struct intel_context; |
| 15 | 16 | struct intel_gt; |
| 16 | 17 | struct intel_guc; |
| @@ -20,6 +21,8 @@ int intel_guc_capture_print_engine_node(struct drm_i915_error_state_buf *m, · 3 unmodified lines | ||
| 20 | 21 | const struct intel_engine_coredump *ee); |
| 21 | 22 | void intel_guc_capture_get_matching_node(struct intel_gt *gt, struct intel_engine_coredump *ee, |
| 22 | 23 | struct intel_context *ce); |
| 24 | +bool intel_guc_capture_is_matching_engine(struct intel_gt *gt, struct intel_context *ce, | |
| 25 | + struct intel_engine_cs *engine); | |
| 23 | 26 | void intel_guc_capture_process(struct intel_guc *guc); |
| 24 | 27 | int intel_guc_capture_getlist(struct intel_guc *guc, u32 owner, u32 type, u32 classid, |
| 25 | 28 | void **outptr); |
| @@ -13,6 +13,30 @@ · 12 unmodified lines | ||
| 13 | 13 | #include "intel_guc_ct.h" |
| 14 | 14 | #include "intel_guc_print.h" |
| 15 | 15 | |
| 16 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) | |
| 17 | +enum { | |
| 18 | + CT_DEAD_ALIVE = 0, | |
| 19 | + CT_DEAD_SETUP, | |
| 20 | + CT_DEAD_WRITE, | |
| 21 | + CT_DEAD_DEADLOCK, | |
| 22 | + CT_DEAD_H2G_HAS_ROOM, | |
| 23 | + CT_DEAD_READ, | |
| 24 | + CT_DEAD_PROCESS_FAILED, | |
| 25 | +}; | |
| 26 | + | |
| 27 | +static void ct_dead_ct_worker_func(struct work_struct *w); | |
| 28 | + | |
| 29 | +#define CT_DEAD(ct, reason) \ | |
| 30 | + do { \ | |
| 31 | + if (!(ct)->dead_ct_reported) { \ | |
| 32 | + (ct)->dead_ct_reason |= 1 << CT_DEAD_##reason; \ | |
| 33 | + queue_work(system_unbound_wq, &(ct)->dead_ct_worker); \ | |
| 34 | + } \ | |
| 35 | + } while (0) | |
| 36 | +#else | |
| 37 | +#define CT_DEAD(ct, reason) do { } while (0) | |
| 38 | +#endif | |
| 39 | + | |
| 16 | 40 | static inline struct intel_guc *ct_to_guc(struct intel_guc_ct *ct) |
| 17 | 41 | { |
| 18 | 42 | return container_of(ct, struct intel_guc, ct); |
| @@ -93,6 +117,9 @@ void intel_guc_ct_init_early(struct intel_guc_ct *ct) · 74 unmodified lines | ||
| 93 | 117 | spin_lock_init(&ct->requests.lock); |
| 94 | 118 | INIT_LIST_HEAD(&ct->requests.pending); |
| 95 | 119 | INIT_LIST_HEAD(&ct->requests.incoming); |
| 120 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) | |
| 121 | + INIT_WORK(&ct->dead_ct_worker, ct_dead_ct_worker_func); | |
| 122 | +#endif | |
| 96 | 123 | INIT_WORK(&ct->requests.worker, ct_incoming_request_worker_func); |
| 97 | 124 | tasklet_setup(&ct->receive_tasklet, ct_receive_tasklet_func); |
| 98 | 125 | init_waitqueue_head(&ct->wq); |
| @@ -319,11 +346,16 @@ int intel_guc_ct_enable(struct intel_guc_ct *ct) · 220 unmodified lines | ||
| 319 | 346 | |
| 320 | 347 | ct->enabled = true; |
| 321 | 348 | ct->stall_time = KTIME_MAX; |
| 349 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) | |
| 350 | + ct->dead_ct_reported = false; | |
| 351 | + ct->dead_ct_reason = CT_DEAD_ALIVE; | |
| 352 | +#endif | |
| 322 | 353 | |
| 323 | 354 | return 0; |
| 324 | 355 | |
| 325 | 356 | err_out: |
| 326 | 357 | CT_PROBE_ERROR(ct, "Failed to enable CTB (%pe)\n", ERR_PTR(err)); |
| 358 | + CT_DEAD(ct, SETUP); | |
| 327 | 359 | return err; |
| 328 | 360 | } |
| 329 | 361 | |
| @@ -434,6 +466,7 @@ static int ct_write(struct intel_guc_ct *ct, · 104 unmodified lines | ||
| 434 | 466 | corrupted: |
| 435 | 467 | CT_ERROR(ct, "Corrupted descriptor head=%u tail=%u status=%#x\n", |
| 436 | 468 | desc->head, desc->tail, desc->status); |
| 469 | + CT_DEAD(ct, WRITE); | |
| 437 | 470 | ctb->broken = true; |
| 438 | 471 | return -EPIPE; |
| 439 | 472 | } |
| @@ -504,6 +537,7 @@ static inline bool ct_deadlocked(struct intel_guc_ct *ct) · 64 unmodified lines | ||
| 504 | 537 | CT_ERROR(ct, "Head: %u\n (Dwords)", ct->ctbs.recv.desc->head); |
| 505 | 538 | CT_ERROR(ct, "Tail: %u\n (Dwords)", ct->ctbs.recv.desc->tail); |
| 506 | 539 | |
| 540 | + CT_DEAD(ct, DEADLOCK); | |
| 507 | 541 | ct->ctbs.send.broken = true; |
| 508 | 542 | } |
| 509 | 543 | |
| @@ -552,6 +586,7 @@ static inline bool h2g_has_room(struct intel_guc_ct *ct, u32 len_dw) · 42 unmodified lines | ||
| 552 | 586 | head, ctb->size); |
| 553 | 587 | desc->status |= GUC_CTB_STATUS_OVERFLOW; |
| 554 | 588 | ctb->broken = true; |
| 589 | + CT_DEAD(ct, H2G_HAS_ROOM); | |
| 555 | 590 | return false; |
| 556 | 591 | } |
| 557 | 592 | |
| @@ -902,12 +937,19 @@ static int ct_read(struct intel_guc_ct *ct, struct ct_incoming_msg **msg) · 344 unmodified lines | ||
| 902 | 937 | /* now update descriptor */ |
| 903 | 938 | WRITE_ONCE(desc->head, head); |
| 904 | 939 | |
| 940 | + /* | |
| 941 | + * Wa_22016122933: Making sure the head update is | |
| 942 | + * visible to GuC right away | |
| 943 | + */ | |
| 944 | + intel_guc_write_barrier(ct_to_guc(ct)); | |
| 945 | + | |
| 905 | 946 | return available - len; |
| 906 | 947 | |
| 907 | 948 | corrupted: |
| 908 | 949 | CT_ERROR(ct, "Corrupted descriptor head=%u tail=%u status=%#x\n", |
| 909 | 950 | desc->head, desc->tail, desc->status); |
| 910 | 951 | ctb->broken = true; |
| 952 | + CT_DEAD(ct, READ); | |
| 911 | 953 | return -EPIPE; |
| 912 | 954 | } |
| 913 | 955 | |
| @@ -1057,6 +1099,7 @@ static bool ct_process_incoming_requests(struct intel_guc_ct *ct) · 143 unmodified lines | ||
| 1057 | 1099 | if (unlikely(err)) { |
| 1058 | 1100 | CT_ERROR(ct, "Failed to process CT message (%pe) %*ph\n", |
| 1059 | 1101 | ERR_PTR(err), 4 * request->size, request->msg); |
| 1102 | + CT_DEAD(ct, PROCESS_FAILED); | |
| 1060 | 1103 | ct_free_msg(request); |
| 1061 | 1104 | } |
| 1062 | 1105 | |
| @@ -1233,3 +1276,19 @@ void intel_guc_ct_print_info(struct intel_guc_ct *ct, · 170 unmodified lines | ||
| 1233 | 1276 | drm_printf(p, "Tail: %u\n", |
| 1234 | 1277 | ct->ctbs.recv.desc->tail); |
| 1235 | 1278 | } |
| 1279 | + | |
| 1280 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) | |
| 1281 | +static void ct_dead_ct_worker_func(struct work_struct *w) | |
| 1282 | +{ | |
| 1283 | + struct intel_guc_ct *ct = container_of(w, struct intel_guc_ct, dead_ct_worker); | |
| 1284 | + struct intel_guc *guc = ct_to_guc(ct); | |
| 1285 | + | |
| 1286 | + if (ct->dead_ct_reported) | |
| 1287 | + return; | |
| 1288 | + | |
| 1289 | + ct->dead_ct_reported = true; | |
| 1290 | + | |
| 1291 | + guc_info(guc, "CTB is dead - reason=0x%X\n", ct->dead_ct_reason); | |
| 1292 | + intel_klog_error_capture(guc_to_gt(guc), (intel_engine_mask_t)~0U); | |
| 1293 | +} | |
| 1294 | +#endif | |
| @@ -85,6 +85,12 @@ struct intel_guc_ct { · 84 unmodified lines | ||
| 85 | 85 | |
| 86 | 86 | /** @stall_time: time of first time a CTB submission is stalled */ |
| 87 | 87 | ktime_t stall_time; |
| 88 | + | |
| 89 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GUC) | |
| 90 | + int dead_ct_reason; | |
| 91 | + bool dead_ct_reported; | |
| 92 | + struct work_struct dead_ct_worker; | |
| 93 | +#endif | |
| 88 | 94 | }; |
| 89 | 95 | |
| 90 | 96 | void intel_guc_ct_init_early(struct intel_guc_ct *ct); |
| @@ -129,6 +129,7 @@ static inline bool guc_load_done(struct intel_uncore *uncore, u32 *status, bool · 128 unmodified lines | ||
| 129 | 129 | case INTEL_BOOTROM_STATUS_RC6CTXCONFIG_FAILED: |
| 130 | 130 | case INTEL_BOOTROM_STATUS_MPUMAP_INCORRECT: |
| 131 | 131 | case INTEL_BOOTROM_STATUS_EXCEPTION: |
| 132 | + case INTEL_BOOTROM_STATUS_PROD_KEY_CHECK_FAILURE: | |
| 132 | 133 | *success = false; |
| 133 | 134 | return true; |
| 134 | 135 | } |
| @@ -190,8 +191,10 @@ static int guc_wait_ucode(struct intel_guc *guc) · 55 unmodified lines | ||
| 190 | 191 | if (!ret || !success) |
| 191 | 192 | break; |
| 192 | 193 | |
| 193 | − guc_dbg(guc, "load still in progress, count = %d, freq = %dMHz\n", | |
| 194 | − count, intel_rps_read_actual_frequency(&uncore->gt->rps)); | |
| 194 | + guc_dbg(guc, "load still in progress, count = %d, freq = %dMHz, status = 0x%08X [0x%02X/%02X]\n", | |
| 195 | + count, intel_rps_read_actual_frequency(&uncore->gt->rps), status, | |
| 196 | + REG_FIELD_GET(GS_BOOTROM_MASK, status), | |
| 197 | + REG_FIELD_GET(GS_UKERNEL_MASK, status)); | |
| 195 | 198 | } |
| 196 | 199 | after = ktime_get(); |
| 197 | 200 | delta = ktime_sub(after, before); |
| @@ -219,6 +222,11 @@ static int guc_wait_ucode(struct intel_guc *guc) · 21 unmodified lines | ||
| 219 | 222 | guc_info(guc, "firmware signature verification failed\n"); |
| 220 | 223 | ret = -ENOEXEC; |
| 221 | 224 | break; |
| 225 | + | |
| 226 | + case INTEL_BOOTROM_STATUS_PROD_KEY_CHECK_FAILURE: | |
| 227 | + guc_info(guc, "firmware production part check failure\n"); | |
| 228 | + ret = -ENOEXEC; | |
| 229 | + break; | |
| 222 | 230 | } |
| 223 | 231 | |
| 224 | 232 | switch (ukernel) { |
| @@ -411,6 +411,15 @@ enum guc_capture_type { · 410 unmodified lines | ||
| 411 | 411 | GUC_CAPTURE_LIST_TYPE_MAX, |
| 412 | 412 | }; |
| 413 | 413 | |
| 414 | +/* Class indecies for capture_class and capture_instance arrays */ | |
| 415 | +enum { | |
| 416 | + GUC_CAPTURE_LIST_CLASS_RENDER_COMPUTE = 0, | |
| 417 | + GUC_CAPTURE_LIST_CLASS_VIDEO = 1, | |
| 418 | + GUC_CAPTURE_LIST_CLASS_VIDEOENHANCE = 2, | |
| 419 | + GUC_CAPTURE_LIST_CLASS_BLITTER = 3, | |
| 420 | + GUC_CAPTURE_LIST_CLASS_GSC_OTHER = 4, | |
| 421 | +}; | |
| 422 | + | |
| 414 | 423 | /* GuC Additional Data Struct */ |
| 415 | 424 | struct guc_ads { |
| 416 | 425 | struct guc_mmio_reg_set reg_state_list[GUC_MAX_ENGINE_CLASSES][GUC_MAX_INSTANCES_PER_CLASS]; |
| @@ -451,7 +460,7 @@ enum guc_log_buffer_type { · 34 unmodified lines | ||
| 451 | 460 | GUC_MAX_LOG_BUFFER |
| 452 | 461 | }; |
| 453 | 462 | |
| 454 | −/** | |
| 463 | +/* | |
| 455 | 464 | * struct guc_log_buffer_state - GuC log buffer state |
| 456 | 465 | * |
| 457 | 466 | * Below state structure is used for coordination of retrieval of GuC firmware |
| @@ -277,6 +277,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc) · 276 unmodified lines | ||
| 277 | 277 | |
| 278 | 278 | slpc->max_freq_softlimit = 0; |
| 279 | 279 | slpc->min_freq_softlimit = 0; |
| 280 | + slpc->ignore_eff_freq = false; | |
| 280 | 281 | slpc->min_is_rpmax = false; |
| 281 | 282 | |
| 282 | 283 | slpc->boost_freq = 0; |
| @@ -457,6 +458,29 @@ int intel_guc_slpc_get_max_freq(struct intel_guc_slpc *slpc, u32 *val) · 174 unmodified lines | ||
| 457 | 458 | return ret; |
| 458 | 459 | } |
| 459 | 460 | |
| 461 | +int intel_guc_slpc_set_ignore_eff_freq(struct intel_guc_slpc *slpc, bool val) | |
| 462 | +{ | |
| 463 | + struct drm_i915_private *i915 = slpc_to_i915(slpc); | |
| 464 | + intel_wakeref_t wakeref; | |
| 465 | + int ret; | |
| 466 | + | |
| 467 | + mutex_lock(&slpc->lock); | |
| 468 | + wakeref = intel_runtime_pm_get(&i915->runtime_pm); | |
| 469 | + | |
| 470 | + ret = slpc_set_param(slpc, | |
| 471 | + SLPC_PARAM_IGNORE_EFFICIENT_FREQUENCY, | |
| 472 | + val); | |
| 473 | + if (ret) | |
| 474 | + guc_probe_error(slpc_to_guc(slpc), "Failed to set efficient freq(%d): %pe\n", | |
| 475 | + val, ERR_PTR(ret)); | |
| 476 | + else | |
| 477 | + slpc->ignore_eff_freq = val; | |
| 478 | + | |
| 479 | + intel_runtime_pm_put(&i915->runtime_pm, wakeref); | |
| 480 | + mutex_unlock(&slpc->lock); | |
| 481 | + return ret; | |
| 482 | +} | |
| 483 | + | |
| 460 | 484 | /** |
| 461 | 485 | * intel_guc_slpc_set_min_freq() - Set min frequency limit for SLPC. |
| 462 | 486 | * @slpc: pointer to intel_guc_slpc. |
| @@ -482,16 +506,6 @@ int intel_guc_slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 val) · 19 unmodified lines | ||
| 482 | 506 | mutex_lock(&slpc->lock); |
| 483 | 507 | wakeref = intel_runtime_pm_get(&i915->runtime_pm); |
| 484 | 508 | |
| 485 | − /* Ignore efficient freq if lower min freq is requested */ | |
| 486 | − ret = slpc_set_param(slpc, | |
| 487 | − SLPC_PARAM_IGNORE_EFFICIENT_FREQUENCY, | |
| 488 | − val < slpc->rp1_freq); | |
| 489 | − if (ret) { | |
| 490 | − guc_probe_error(slpc_to_guc(slpc), "Failed to toggle efficient freq: %pe\n", | |
| 491 | − ERR_PTR(ret)); | |
| 492 | − goto out; | |
| 493 | − } | |
| 494 | − | |
| 495 | 509 | ret = slpc_set_param(slpc, |
| 496 | 510 | SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ, |
| 497 | 511 | val); |
| @@ -499,7 +513,6 @@ int intel_guc_slpc_set_min_freq(struct intel_guc_slpc *slpc, u32 val) · 1 unmodified line | ||
| 499 | 513 | if (!ret) |
| 500 | 514 | slpc->min_freq_softlimit = val; |
| 501 | 515 | |
| 502 | −out: | |
| 503 | 516 | intel_runtime_pm_put(&i915->runtime_pm, wakeref); |
| 504 | 517 | mutex_unlock(&slpc->lock); |
| 505 | 518 | |
| @@ -752,6 +765,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc) · 246 unmodified lines | ||
| 752 | 765 | /* Set cached media freq ratio mode */ |
| 753 | 766 | intel_guc_slpc_set_media_ratio_mode(slpc, slpc->media_ratio_mode); |
| 754 | 767 | |
| 768 | + /* Set cached value of ignore efficient freq */ | |
| 769 | + intel_guc_slpc_set_ignore_eff_freq(slpc, slpc->ignore_eff_freq); | |
| 770 | + | |
| 755 | 771 | return 0; |
| 756 | 772 | } |
| 757 | 773 | |
| @@ -821,6 +837,8 @@ int intel_guc_slpc_print_info(struct intel_guc_slpc *slpc, struct drm_printer *p · 63 unmodified lines | ||
| 821 | 837 | slpc_decode_min_freq(slpc)); |
| 822 | 838 | drm_printf(p, "\twaitboosts: %u\n", |
| 823 | 839 | slpc->num_boosts); |
| 840 | + drm_printf(p, "\tBoosts outstanding: %u\n", | |
| 841 | + atomic_read(&slpc->num_waiters)); | |
| 824 | 842 | } |
| 825 | 843 | } |
| 826 | 844 | |
| @@ -46,5 +46,6 @@ void intel_guc_slpc_boost(struct intel_guc_slpc *slpc); · 45 unmodified lines | ||
| 46 | 46 | void intel_guc_slpc_dec_waiters(struct intel_guc_slpc *slpc); |
| 47 | 47 | int intel_guc_slpc_unset_gucrc_mode(struct intel_guc_slpc *slpc); |
| 48 | 48 | int intel_guc_slpc_override_gucrc_mode(struct intel_guc_slpc *slpc, u32 mode); |
| 49 | +int intel_guc_slpc_set_ignore_eff_freq(struct intel_guc_slpc *slpc, bool val); | |
| 49 | 50 | |
| 50 | 51 | #endif |
| @@ -31,6 +31,7 @@ struct intel_guc_slpc { · 30 unmodified lines | ||
| 31 | 31 | /* frequency softlimits */ |
| 32 | 32 | u32 min_freq_softlimit; |
| 33 | 33 | u32 max_freq_softlimit; |
| 34 | + bool ignore_eff_freq; | |
| 34 | 35 | |
| 35 | 36 | /* cached media ratio mode */ |
| 36 | 37 | u32 media_ratio_mode; |
| @@ -1402,13 +1402,34 @@ static void __update_guc_busyness_stats(struct intel_guc *guc) · 1401 unmodified lines | ||
| 1402 | 1402 | spin_unlock_irqrestore(&guc->timestamp.lock, flags); |
| 1403 | 1403 | } |
| 1404 | 1404 | |
| 1405 | +static void __guc_context_update_stats(struct intel_context *ce) | |
| 1406 | +{ | |
| 1407 | + struct intel_guc *guc = ce_to_guc(ce); | |
| 1408 | + unsigned long flags; | |
| 1409 | + | |
| 1410 | + spin_lock_irqsave(&guc->timestamp.lock, flags); | |
| 1411 | + lrc_update_runtime(ce); | |
| 1412 | + spin_unlock_irqrestore(&guc->timestamp.lock, flags); | |
| 1413 | +} | |
| 1414 | + | |
| 1415 | +static void guc_context_update_stats(struct intel_context *ce) | |
| 1416 | +{ | |
| 1417 | + if (!intel_context_pin_if_active(ce)) | |
| 1418 | + return; | |
| 1419 | + | |
| 1420 | + __guc_context_update_stats(ce); | |
| 1421 | + intel_context_unpin(ce); | |
| 1422 | +} | |
| 1423 | + | |
| 1405 | 1424 | static void guc_timestamp_ping(struct work_struct *wrk) |
| 1406 | 1425 | { |
| 1407 | 1426 | struct intel_guc *guc = container_of(wrk, typeof(*guc), |
| 1408 | 1427 | timestamp.work.work); |
| 1409 | 1428 | struct intel_uc *uc = container_of(guc, typeof(*uc), guc); |
| 1410 | 1429 | struct intel_gt *gt = guc_to_gt(guc); |
| 1430 | + struct intel_context *ce; | |
| 1411 | 1431 | intel_wakeref_t wakeref; |
| 1432 | + unsigned long index; | |
| 1412 | 1433 | int srcu, ret; |
| 1413 | 1434 | |
| 1414 | 1435 | /* |
| @@ -1424,6 +1445,10 @@ static void guc_timestamp_ping(struct work_struct *wrk) · 9 unmodified lines | ||
| 1424 | 1445 | with_intel_runtime_pm(>->i915->runtime_pm, wakeref) |
| 1425 | 1446 | __update_guc_busyness_stats(guc); |
| 1426 | 1447 | |
| 1448 | + /* adjust context stats for overflow */ | |
| 1449 | + xa_for_each(&guc->context_lookup, index, ce) | |
| 1450 | + guc_context_update_stats(ce); | |
| 1451 | + | |
| 1427 | 1452 | intel_gt_reset_unlock(gt, srcu); |
| 1428 | 1453 | |
| 1429 | 1454 | guc_enable_busyness_worker(guc); |
| @@ -1629,16 +1654,16 @@ static void guc_reset_state(struct intel_context *ce, u32 head, bool scrub) · 199 unmodified lines | ||
| 1629 | 1654 | |
| 1630 | 1655 | static void guc_engine_reset_prepare(struct intel_engine_cs *engine) |
| 1631 | 1656 | { |
| 1632 | − if (!IS_GRAPHICS_VER(engine->i915, 11, 12)) | |
| 1633 | − return; | |
| 1634 | − | |
| 1635 | − intel_engine_stop_cs(engine); | |
| 1636 | − | |
| 1637 | 1657 | /* |
| 1638 | 1658 | * Wa_22011802037: In addition to stopping the cs, we need |
| 1639 | 1659 | * to wait for any pending mi force wakeups |
| 1640 | 1660 | */ |
| 1641 | − intel_engine_wait_for_pending_mi_fw(engine); | |
| 1661 | + if (IS_MTL_GRAPHICS_STEP(engine->i915, M, STEP_A0, STEP_B0) || | |
| 1662 | + (GRAPHICS_VER(engine->i915) >= 11 && | |
| 1663 | + GRAPHICS_VER_FULL(engine->i915) < IP_VER(12, 70))) { | |
| 1664 | + intel_engine_stop_cs(engine); | |
| 1665 | + intel_engine_wait_for_pending_mi_fw(engine); | |
| 1666 | + } | |
| 1642 | 1667 | } |
| 1643 | 1668 | |
| 1644 | 1669 | static void guc_reset_nop(struct intel_engine_cs *engine) |
| @@ -2774,6 +2799,7 @@ static void guc_context_unpin(struct intel_context *ce) · 1129 unmodified lines | ||
| 2774 | 2799 | { |
| 2775 | 2800 | struct intel_guc *guc = ce_to_guc(ce); |
| 2776 | 2801 | |
| 2802 | + __guc_context_update_stats(ce); | |
| 2777 | 2803 | unpin_guc_id(guc, ce); |
| 2778 | 2804 | lrc_unpin(ce); |
| 2779 | 2805 | |
| @@ -3455,6 +3481,7 @@ static void remove_from_context(struct i915_request *rq) · 675 unmodified lines | ||
| 3455 | 3481 | } |
| 3456 | 3482 | |
| 3457 | 3483 | static const struct intel_context_ops guc_context_ops = { |
| 3484 | + .flags = COPS_RUNTIME_CYCLES, | |
| 3458 | 3485 | .alloc = guc_context_alloc, |
| 3459 | 3486 | |
| 3460 | 3487 | .close = guc_context_close, |
| @@ -3473,6 +3500,8 @@ static const struct intel_context_ops guc_context_ops = { · 12 unmodified lines | ||
| 3473 | 3500 | |
| 3474 | 3501 | .sched_disable = guc_context_sched_disable, |
| 3475 | 3502 | |
| 3503 | + .update_stats = guc_context_update_stats, | |
| 3504 | + | |
| 3476 | 3505 | .reset = lrc_reset, |
| 3477 | 3506 | .destroy = guc_context_destroy, |
| 3478 | 3507 | |
| @@ -3728,6 +3757,7 @@ static int guc_virtual_context_alloc(struct intel_context *ce) · 249 unmodified lines | ||
| 3728 | 3757 | } |
| 3729 | 3758 | |
| 3730 | 3759 | static const struct intel_context_ops virtual_guc_context_ops = { |
| 3760 | + .flags = COPS_RUNTIME_CYCLES, | |
| 3731 | 3761 | .alloc = guc_virtual_context_alloc, |
| 3732 | 3762 | |
| 3733 | 3763 | .close = guc_context_close, |
| @@ -3745,6 +3775,7 @@ static const struct intel_context_ops virtual_guc_context_ops = { · 11 unmodified lines | ||
| 3745 | 3775 | .exit = guc_virtual_context_exit, |
| 3746 | 3776 | |
| 3747 | 3777 | .sched_disable = guc_context_sched_disable, |
| 3778 | + .update_stats = guc_context_update_stats, | |
| 3748 | 3779 | |
| 3749 | 3780 | .destroy = guc_context_destroy, |
| 3750 | 3781 | |
| @@ -4697,13 +4728,37 @@ static void capture_error_state(struct intel_guc *guc, · 946 unmodified lines | ||
| 4697 | 4728 | { |
| 4698 | 4729 | struct intel_gt *gt = guc_to_gt(guc); |
| 4699 | 4730 | struct drm_i915_private *i915 = gt->i915; |
| 4700 | − struct intel_engine_cs *engine = __context_to_physical_engine(ce); | |
| 4701 | 4731 | intel_wakeref_t wakeref; |
| 4732 | + intel_engine_mask_t engine_mask; | |
| 4733 | + | |
| 4734 | + if (intel_engine_is_virtual(ce->engine)) { | |
| 4735 | + struct intel_engine_cs *e; | |
| 4736 | + intel_engine_mask_t tmp, virtual_mask = ce->engine->mask; | |
| 4737 | + | |
| 4738 | + engine_mask = 0; | |
| 4739 | + for_each_engine_masked(e, ce->engine->gt, virtual_mask, tmp) { | |
| 4740 | + bool match = intel_guc_capture_is_matching_engine(gt, ce, e); | |
| 4741 | + | |
| 4742 | + if (match) { | |
| 4743 | + intel_engine_set_hung_context(e, ce); | |
| 4744 | + engine_mask |= e->mask; | |
| 4745 | + atomic_inc(&i915->gpu_error.reset_engine_count[e->uabi_class]); | |
| 4746 | + } | |
| 4747 | + } | |
| 4748 | + | |
| 4749 | + if (!engine_mask) { | |
| 4750 | + guc_warn(guc, "No matching physical engine capture for virtual engine context 0x%04X / %s", | |
| 4751 | + ce->guc_id.id, ce->engine->name); | |
| 4752 | + engine_mask = ~0U; | |
| 4753 | + } | |
| 4754 | + } else { | |
| 4755 | + intel_engine_set_hung_context(ce->engine, ce); | |
| 4756 | + engine_mask = ce->engine->mask; | |
| 4757 | + atomic_inc(&i915->gpu_error.reset_engine_count[ce->engine->uabi_class]); | |
| 4758 | + } | |
| 4702 | 4759 | |
| 4703 | − intel_engine_set_hung_context(engine, ce); | |
| 4704 | 4760 | with_intel_runtime_pm(&i915->runtime_pm, wakeref) |
| 4705 | − i915_capture_error_state(gt, engine->mask, CORE_DUMP_FLAG_IS_GUC_CAPTURE); | |
| 4706 | − atomic_inc(&i915->gpu_error.reset_engine_count[engine->uabi_class]); | |
| 4761 | + i915_capture_error_state(gt, engine_mask, CORE_DUMP_FLAG_IS_GUC_CAPTURE); | |
| 4707 | 4762 | } |
| 4708 | 4763 | |
| 4709 | 4764 | static void guc_context_replay(struct intel_context *ce) |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #include "intel_uc.h" |
| 19 | 19 | |
| 20 | 20 | #include "i915_drv.h" |
| 21 | +#include "i915_hwmon.h" | |
| 21 | 22 | |
| 22 | 23 | static const struct intel_uc_ops uc_ops_off; |
| 23 | 24 | static const struct intel_uc_ops uc_ops_on; |
| @@ -431,6 +432,9 @@ static bool uc_is_wopcm_locked(struct intel_uc *uc) · 407 unmodified lines | ||
| 431 | 432 | |
| 432 | 433 | static int __uc_check_hw(struct intel_uc *uc) |
| 433 | 434 | { |
| 435 | + if (uc->fw_table_invalid) | |
| 436 | + return -EIO; | |
| 437 | + | |
| 434 | 438 | if (!intel_uc_supports_guc(uc)) |
| 435 | 439 | return 0; |
| 436 | 440 | |
| @@ -461,6 +465,7 @@ static int __uc_init_hw(struct intel_uc *uc) · 24 unmodified lines | ||
| 461 | 465 | struct intel_guc *guc = &uc->guc; |
| 462 | 466 | struct intel_huc *huc = &uc->huc; |
| 463 | 467 | int ret, attempts; |
| 468 | + bool pl1en = false; | |
| 464 | 469 | |
| 465 | 470 | GEM_BUG_ON(!intel_uc_supports_guc(uc)); |
| 466 | 471 | GEM_BUG_ON(!intel_uc_wants_guc(uc)); |
| @@ -491,6 +496,9 @@ static int __uc_init_hw(struct intel_uc *uc) · 24 unmodified lines | ||
| 491 | 496 | else |
| 492 | 497 | attempts = 1; |
| 493 | 498 | |
| 499 | + /* Disable a potentially low PL1 power limit to allow freq to be raised */ | |
| 500 | + i915_hwmon_power_max_disable(gt->i915, &pl1en); | |
| 501 | + | |
| 494 | 502 | intel_rps_raise_unslice(&uc_to_gt(uc)->rps); |
| 495 | 503 | |
| 496 | 504 | while (attempts--) { |
| @@ -500,7 +508,7 @@ static int __uc_init_hw(struct intel_uc *uc) · 3 unmodified lines | ||
| 500 | 508 | */ |
| 501 | 509 | ret = __uc_sanitize(uc); |
| 502 | 510 | if (ret) |
| 503 | − goto err_out; | |
| 511 | + goto err_rps; | |
| 504 | 512 | |
| 505 | 513 | intel_huc_fw_upload(huc); |
| 506 | 514 | intel_guc_ads_reset(guc); |
| @@ -547,6 +555,8 @@ static int __uc_init_hw(struct intel_uc *uc) · 40 unmodified lines | ||
| 547 | 555 | intel_rps_lower_unslice(&uc_to_gt(uc)->rps); |
| 548 | 556 | } |
| 549 | 557 | |
| 558 | + i915_hwmon_power_max_restore(gt->i915, pl1en); | |
| 559 | + | |
| 550 | 560 | guc_info(guc, "submission %s\n", str_enabled_disabled(intel_uc_uses_guc_submission(uc))); |
| 551 | 561 | guc_info(guc, "SLPC %s\n", str_enabled_disabled(intel_uc_uses_guc_slpc(uc))); |
| 552 | 562 | |
| @@ -559,10 +569,12 @@ err_submission: · 6 unmodified lines | ||
| 559 | 569 | intel_guc_submission_disable(guc); |
| 560 | 570 | err_log_capture: |
| 561 | 571 | __uc_capture_load_err_log(uc); |
| 562 | −err_out: | |
| 572 | +err_rps: | |
| 563 | 573 | /* Return GT back to RPn */ |
| 564 | 574 | intel_rps_lower_unslice(&uc_to_gt(uc)->rps); |
| 565 | 575 | |
| 576 | + i915_hwmon_power_max_restore(gt->i915, pl1en); | |
| 577 | +err_out: | |
| 566 | 578 | __uc_sanitize(uc); |
| 567 | 579 | |
| 568 | 580 | if (!ret) { |
| @@ -36,6 +36,7 @@ struct intel_uc { · 35 unmodified lines | ||
| 36 | 36 | struct drm_i915_gem_object *load_err_log; |
| 37 | 37 | |
| 38 | 38 | bool reset_in_progress; |
| 39 | + bool fw_table_invalid; | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | void intel_uc_init_early(struct intel_uc *uc); |
| @@ -17,6 +17,12 @@ · 16 unmodified lines | ||
| 17 | 17 | #include "i915_drv.h" |
| 18 | 18 | #include "i915_reg.h" |
| 19 | 19 | |
| 20 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) | |
| 21 | +#define UNEXPECTED gt_probe_error | |
| 22 | +#else | |
| 23 | +#define UNEXPECTED gt_notice | |
| 24 | +#endif | |
| 25 | + | |
| 20 | 26 | static inline struct intel_gt * |
| 21 | 27 | ____uc_fw_to_gt(struct intel_uc_fw *uc_fw, enum intel_uc_fw_type type) |
| 22 | 28 | { |
| @@ -79,14 +85,15 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, · 56 unmodified lines | ||
| 79 | 85 | * security fixes, etc. to be enabled. |
| 80 | 86 | */ |
| 81 | 87 | #define INTEL_GUC_FIRMWARE_DEFS(fw_def, guc_maj, guc_mmp) \ |
| 82 | − fw_def(DG2, 0, guc_maj(dg2, 70, 5)) \ | |
| 83 | − fw_def(ALDERLAKE_P, 0, guc_maj(adlp, 70, 5)) \ | |
| 88 | + fw_def(METEORLAKE, 0, guc_maj(mtl, 70, 6, 6)) \ | |
| 89 | + fw_def(DG2, 0, guc_maj(dg2, 70, 5, 1)) \ | |
| 90 | + fw_def(ALDERLAKE_P, 0, guc_maj(adlp, 70, 5, 1)) \ | |
| 84 | 91 | fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 70, 1, 1)) \ |
| 85 | 92 | fw_def(ALDERLAKE_P, 0, guc_mmp(adlp, 69, 0, 3)) \ |
| 86 | − fw_def(ALDERLAKE_S, 0, guc_maj(tgl, 70, 5)) \ | |
| 93 | + fw_def(ALDERLAKE_S, 0, guc_maj(tgl, 70, 5, 1)) \ | |
| 87 | 94 | fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 70, 1, 1)) \ |
| 88 | 95 | fw_def(ALDERLAKE_S, 0, guc_mmp(tgl, 69, 0, 3)) \ |
| 89 | − fw_def(DG1, 0, guc_maj(dg1, 70, 5)) \ | |
| 96 | + fw_def(DG1, 0, guc_maj(dg1, 70, 5, 1)) \ | |
| 90 | 97 | fw_def(ROCKETLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ |
| 91 | 98 | fw_def(TIGERLAKE, 0, guc_mmp(tgl, 70, 1, 1)) \ |
| 92 | 99 | fw_def(JASPERLAKE, 0, guc_mmp(ehl, 70, 1, 1)) \ |
| @@ -140,7 +147,7 @@ void intel_uc_fw_change_status(struct intel_uc_fw *uc_fw, · 47 unmodified lines | ||
| 140 | 147 | __stringify(patch_) ".bin" |
| 141 | 148 | |
| 142 | 149 | /* Minor for internal driver use, not part of file name */ |
| 143 | −#define MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_) \ | |
| 150 | +#define MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_, patch_) \ | |
| 144 | 151 | __MAKE_UC_FW_PATH_MAJOR(prefix_, "guc", major_) |
| 145 | 152 | |
| 146 | 153 | #define MAKE_GUC_FW_PATH_MMP(prefix_, major_, minor_, patch_) \ |
| @@ -196,9 +203,9 @@ struct __packed uc_fw_blob { · 49 unmodified lines | ||
| 196 | 203 | { UC_FW_BLOB_BASE(major_, minor_, patch_, path_) \ |
| 197 | 204 | .legacy = true } |
| 198 | 205 | |
| 199 | −#define GUC_FW_BLOB(prefix_, major_, minor_) \ | |
| 200 | − UC_FW_BLOB_NEW(major_, minor_, 0, false, \ | |
| 201 | − MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_)) | |
| 206 | +#define GUC_FW_BLOB(prefix_, major_, minor_, patch_) \ | |
| 207 | + UC_FW_BLOB_NEW(major_, minor_, patch_, false, \ | |
| 208 | + MAKE_GUC_FW_PATH_MAJOR(prefix_, major_, minor_, patch_)) | |
| 202 | 209 | |
| 203 | 210 | #define GUC_FW_BLOB_MMP(prefix_, major_, minor_, patch_) \ |
| 204 | 211 | UC_FW_BLOB_OLD(major_, minor_, patch_, \ |
| @@ -232,20 +239,22 @@ struct fw_blobs_by_type { · 27 unmodified lines | ||
| 232 | 239 | u32 count; |
| 233 | 240 | }; |
| 234 | 241 | |
| 242 | +static const struct uc_fw_platform_requirement blobs_guc[] = { | |
| 243 | + INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB, GUC_FW_BLOB_MMP) | |
| 244 | +}; | |
| 245 | + | |
| 246 | +static const struct uc_fw_platform_requirement blobs_huc[] = { | |
| 247 | + INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB, HUC_FW_BLOB_MMP, HUC_FW_BLOB_GSC) | |
| 248 | +}; | |
| 249 | + | |
| 250 | +static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES] = { | |
| 251 | + [INTEL_UC_FW_TYPE_GUC] = { blobs_guc, ARRAY_SIZE(blobs_guc) }, | |
| 252 | + [INTEL_UC_FW_TYPE_HUC] = { blobs_huc, ARRAY_SIZE(blobs_huc) }, | |
| 253 | +}; | |
| 254 | + | |
| 235 | 255 | static void |
| 236 | 256 | __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) |
| 237 | 257 | { |
| 238 | − static const struct uc_fw_platform_requirement blobs_guc[] = { | |
| 239 | − INTEL_GUC_FIRMWARE_DEFS(MAKE_FW_LIST, GUC_FW_BLOB, GUC_FW_BLOB_MMP) | |
| 240 | − }; | |
| 241 | − static const struct uc_fw_platform_requirement blobs_huc[] = { | |
| 242 | − INTEL_HUC_FIRMWARE_DEFS(MAKE_FW_LIST, HUC_FW_BLOB, HUC_FW_BLOB_MMP, HUC_FW_BLOB_GSC) | |
| 243 | − }; | |
| 244 | − static const struct fw_blobs_by_type blobs_all[INTEL_UC_FW_NUM_TYPES] = { | |
| 245 | − [INTEL_UC_FW_TYPE_GUC] = { blobs_guc, ARRAY_SIZE(blobs_guc) }, | |
| 246 | − [INTEL_UC_FW_TYPE_HUC] = { blobs_huc, ARRAY_SIZE(blobs_huc) }, | |
| 247 | − }; | |
| 248 | − static bool verified[INTEL_UC_FW_NUM_TYPES]; | |
| 249 | 258 | const struct uc_fw_platform_requirement *fw_blobs; |
| 250 | 259 | enum intel_platform p = INTEL_INFO(i915)->platform; |
| 251 | 260 | u32 fw_count; |
| @@ -285,6 +294,11 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · 33 unmodified lines | ||
| 285 | 294 | continue; |
| 286 | 295 | |
| 287 | 296 | if (uc_fw->file_selected.path) { |
| 297 | + /* | |
| 298 | + * Continuing an earlier search after a found blob failed to load. | |
| 299 | + * Once the previously chosen path has been found, clear it out | |
| 300 | + * and let the search continue from there. | |
| 301 | + */ | |
| 288 | 302 | if (uc_fw->file_selected.path == blob->path) |
| 289 | 303 | uc_fw->file_selected.path = NULL; |
| 290 | 304 | |
| @@ -295,6 +309,7 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · 4 unmodified lines | ||
| 295 | 309 | uc_fw->file_wanted.path = blob->path; |
| 296 | 310 | uc_fw->file_wanted.ver.major = blob->major; |
| 297 | 311 | uc_fw->file_wanted.ver.minor = blob->minor; |
| 312 | + uc_fw->file_wanted.ver.patch = blob->patch; | |
| 298 | 313 | uc_fw->loaded_via_gsc = blob->loaded_via_gsc; |
| 299 | 314 | found = true; |
| 300 | 315 | break; |
| @@ -304,76 +319,111 @@ __uc_fw_auto_select(struct drm_i915_private *i915, struct intel_uc_fw *uc_fw) · 3 unmodified lines | ||
| 304 | 319 | /* Failed to find a match for the last attempt?! */ |
| 305 | 320 | uc_fw->file_selected.path = NULL; |
| 306 | 321 | } |
| 322 | +} | |
| 307 | 323 | |
| 308 | − /* make sure the list is ordered as expected */ | |
| 309 | − if (IS_ENABLED(CONFIG_DRM_I915_SELFTEST) && !verified[uc_fw->type]) { | |
| 310 | − verified[uc_fw->type] = true; | |
| 324 | +static bool validate_fw_table_type(struct drm_i915_private *i915, enum intel_uc_fw_type type) | |
| 325 | +{ | |
| 326 | + const struct uc_fw_platform_requirement *fw_blobs; | |
| 327 | + u32 fw_count; | |
| 328 | + int i, j; | |
| 329 | + | |
| 330 | + if (type >= ARRAY_SIZE(blobs_all)) { | |
| 331 | + drm_err(&i915->drm, "No blob array for %s\n", intel_uc_fw_type_repr(type)); | |
| 332 | + return false; | |
| 333 | + } | |
| 334 | + | |
| 335 | + fw_blobs = blobs_all[type].blobs; | |
| 336 | + fw_count = blobs_all[type].count; | |
| 337 | + | |
| 338 | + if (!fw_count) | |
| 339 | + return true; | |
| 311 | 340 | |
| 312 | − for (i = 1; i < fw_count; i++) { | |
| 313 | − /* Next platform is good: */ | |
| 314 | − if (fw_blobs[i].p < fw_blobs[i - 1].p) | |
| 341 | + /* make sure the list is ordered as expected */ | |
| 342 | + for (i = 1; i < fw_count; i++) { | |
| 343 | + /* Versionless file names must be unique per platform: */ | |
| 344 | + for (j = i + 1; j < fw_count; j++) { | |
| 345 | + /* Same platform? */ | |
| 346 | + if (fw_blobs[i].p != fw_blobs[j].p) | |
| 315 | 347 | continue; |
| 316 | 348 | |
| 317 | − /* Next platform revision is good: */ | |
| 318 | − if (fw_blobs[i].p == fw_blobs[i - 1].p && | |
| 319 | − fw_blobs[i].rev < fw_blobs[i - 1].rev) | |
| 349 | + if (fw_blobs[i].blob.path != fw_blobs[j].blob.path) | |
| 320 | 350 | continue; |
| 321 | 351 | |
| 322 | − /* Platform/revision must be in order: */ | |
| 323 | − if (fw_blobs[i].p != fw_blobs[i - 1].p || | |
| 324 | − fw_blobs[i].rev != fw_blobs[i - 1].rev) | |
| 325 | − goto bad; | |
| 352 | + drm_err(&i915->drm, "Duplicate %s blobs: %s r%u %s%d.%d.%d [%s] matches %s%d.%d.%d [%s]\n", | |
| 353 | + intel_uc_fw_type_repr(type), | |
| 354 | + intel_platform_name(fw_blobs[j].p), fw_blobs[j].rev, | |
| 355 | + fw_blobs[j].blob.legacy ? "L" : "v", | |
| 356 | + fw_blobs[j].blob.major, fw_blobs[j].blob.minor, | |
| 357 | + fw_blobs[j].blob.patch, fw_blobs[j].blob.path, | |
| 358 | + fw_blobs[i].blob.legacy ? "L" : "v", | |
| 359 | + fw_blobs[i].blob.major, fw_blobs[i].blob.minor, | |
| 360 | + fw_blobs[i].blob.patch, fw_blobs[i].blob.path); | |
| 361 | + } | |
| 326 | 362 | |
| 327 | − /* Next major version is good: */ | |
| 328 | − if (fw_blobs[i].blob.major < fw_blobs[i - 1].blob.major) | |
| 329 | − continue; | |
| 363 | + /* Next platform is good: */ | |
| 364 | + if (fw_blobs[i].p < fw_blobs[i - 1].p) | |
| 365 | + continue; | |
| 330 | 366 | |
| 331 | − /* New must be before legacy: */ | |
| 332 | − if (!fw_blobs[i].blob.legacy && fw_blobs[i - 1].blob.legacy) | |
| 333 | − goto bad; | |
| 367 | + /* Next platform revision is good: */ | |
| 368 | + if (fw_blobs[i].p == fw_blobs[i - 1].p && | |
| 369 | + fw_blobs[i].rev < fw_blobs[i - 1].rev) | |
| 370 | + continue; | |
| 334 | 371 | |
| 335 | − /* New to legacy also means 0.0 to X.Y (HuC), or X.0 to X.Y (GuC) */ | |
| 336 | − if (fw_blobs[i].blob.legacy && !fw_blobs[i - 1].blob.legacy) { | |
| 337 | − if (!fw_blobs[i - 1].blob.major) | |
| 338 | − continue; | |
| 372 | + /* Platform/revision must be in order: */ | |
| 373 | + if (fw_blobs[i].p != fw_blobs[i - 1].p || | |
| 374 | + fw_blobs[i].rev != fw_blobs[i - 1].rev) | |
| 375 | + goto bad; | |
| 339 | 376 | |
| 340 | − if (fw_blobs[i].blob.major == fw_blobs[i - 1].blob.major) | |
| 341 | − continue; | |
| 342 | − } | |
| 377 | + /* Next major version is good: */ | |
| 378 | + if (fw_blobs[i].blob.major < fw_blobs[i - 1].blob.major) | |
| 379 | + continue; | |
| 343 | 380 | |
| 344 | − /* Major versions must be in order: */ | |
| 345 | − if (fw_blobs[i].blob.major != fw_blobs[i - 1].blob.major) | |
| 346 | − goto bad; | |
| 381 | + /* New must be before legacy: */ | |
| 382 | + if (!fw_blobs[i].blob.legacy && fw_blobs[i - 1].blob.legacy) | |
| 383 | + goto bad; | |
| 347 | 384 | |
| 348 | − /* Next minor version is good: */ | |
| 349 | − if (fw_blobs[i].blob.minor < fw_blobs[i - 1].blob.minor) | |
| 385 | + /* New to legacy also means 0.0 to X.Y (HuC), or X.0 to X.Y (GuC) */ | |
| 386 | + if (fw_blobs[i].blob.legacy && !fw_blobs[i - 1].blob.legacy) { | |
| 387 | + if (!fw_blobs[i - 1].blob.major) | |
| 350 | 388 | continue; |
| 351 | 389 | |
| 352 | − /* Minor versions must be in order: */ | |
| 353 | − if (fw_blobs[i].blob.minor != fw_blobs[i - 1].blob.minor) | |
| 354 | − goto bad; | |
| 355 | − | |
| 356 | − /* Patch versions must be in order: */ | |
| 357 | − if (fw_blobs[i].blob.patch <= fw_blobs[i - 1].blob.patch) | |
| 390 | + if (fw_blobs[i].blob.major == fw_blobs[i - 1].blob.major) | |
| 358 | 391 | continue; |
| 392 | + } | |
| 359 | 393 | |
| 360 | −bad: | |
| 361 | − drm_err(&i915->drm, "Invalid %s blob order: %s r%u %s%d.%d.%d comes before %s r%u %s%d.%d.%d\n", | |
| 362 | − intel_uc_fw_type_repr(uc_fw->type), | |
| 363 | − intel_platform_name(fw_blobs[i - 1].p), fw_blobs[i - 1].rev, | |
| 364 | − fw_blobs[i - 1].blob.legacy ? "L" : "v", | |
| 365 | − fw_blobs[i - 1].blob.major, | |
| 366 | − fw_blobs[i - 1].blob.minor, | |
| 367 | − fw_blobs[i - 1].blob.patch, | |
| 368 | − intel_platform_name(fw_blobs[i].p), fw_blobs[i].rev, | |
| 369 | − fw_blobs[i].blob.legacy ? "L" : "v", | |
| 370 | − fw_blobs[i].blob.major, | |
| 371 | − fw_blobs[i].blob.minor, | |
| 372 | − fw_blobs[i].blob.patch); | |
| 394 | + /* Major versions must be in order: */ | |
| 395 | + if (fw_blobs[i].blob.major != fw_blobs[i - 1].blob.major) | |
| 396 | + goto bad; | |
| 373 | 397 | |
| 374 | − uc_fw->file_selected.path = NULL; | |
| 375 | − } | |
| 398 | + /* Next minor version is good: */ | |
| 399 | + if (fw_blobs[i].blob.minor < fw_blobs[i - 1].blob.minor) | |
| 400 | + continue; | |
| 401 | + | |
| 402 | + /* Minor versions must be in order: */ | |
| 403 | + if (fw_blobs[i].blob.minor != fw_blobs[i - 1].blob.minor) | |
| 404 | + goto bad; | |
| 405 | + | |
| 406 | + /* Patch versions must be in order and unique: */ | |
| 407 | + if (fw_blobs[i].blob.patch < fw_blobs[i - 1].blob.patch) | |
| 408 | + continue; | |
| 409 | + | |
| 410 | +bad: | |
| 411 | + drm_err(&i915->drm, "Invalid %s blob order: %s r%u %s%d.%d.%d comes before %s r%u %s%d.%d.%d\n", | |
| 412 | + intel_uc_fw_type_repr(type), | |
| 413 | + intel_platform_name(fw_blobs[i - 1].p), fw_blobs[i - 1].rev, | |
| 414 | + fw_blobs[i - 1].blob.legacy ? "L" : "v", | |
| 415 | + fw_blobs[i - 1].blob.major, | |
| 416 | + fw_blobs[i - 1].blob.minor, | |
| 417 | + fw_blobs[i - 1].blob.patch, | |
| 418 | + intel_platform_name(fw_blobs[i].p), fw_blobs[i].rev, | |
| 419 | + fw_blobs[i].blob.legacy ? "L" : "v", | |
| 420 | + fw_blobs[i].blob.major, | |
| 421 | + fw_blobs[i].blob.minor, | |
| 422 | + fw_blobs[i].blob.patch); | |
| 423 | + return false; | |
| 376 | 424 | } |
| 425 | + | |
| 426 | + return true; | |
| 377 | 427 | } |
| 378 | 428 | |
| 379 | 429 | static const char *__override_guc_firmware_path(struct drm_i915_private *i915) |
| @@ -428,7 +478,8 @@ static void __uc_fw_user_override(struct drm_i915_private *i915, struct intel_uc · 48 unmodified lines | ||
| 428 | 478 | void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw, |
| 429 | 479 | enum intel_uc_fw_type type) |
| 430 | 480 | { |
| 431 | − struct drm_i915_private *i915 = ____uc_fw_to_gt(uc_fw, type)->i915; | |
| 481 | + struct intel_gt *gt = ____uc_fw_to_gt(uc_fw, type); | |
| 482 | + struct drm_i915_private *i915 = gt->i915; | |
| 432 | 483 | |
| 433 | 484 | /* |
| 434 | 485 | * we use FIRMWARE_UNINITIALIZED to detect checks against uc_fw->status |
| @@ -441,6 +492,12 @@ void intel_uc_fw_init_early(struct intel_uc_fw *uc_fw, · 6 unmodified lines | ||
| 441 | 492 | uc_fw->type = type; |
| 442 | 493 | |
| 443 | 494 | if (HAS_GT_UC(i915)) { |
| 495 | + if (!validate_fw_table_type(i915, type)) { | |
| 496 | + gt->uc.fw_table_invalid = true; | |
| 497 | + intel_uc_fw_change_status(uc_fw, INTEL_UC_FIRMWARE_NOT_SUPPORTED); | |
| 498 | + return; | |
| 499 | + } | |
| 500 | + | |
| 444 | 501 | __uc_fw_auto_select(i915, uc_fw); |
| 445 | 502 | __uc_fw_user_override(i915, uc_fw); |
| 446 | 503 | } |
| @@ -782,10 +839,10 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) · 335 unmodified lines | ||
| 782 | 839 | if (uc_fw->file_wanted.ver.major && uc_fw->file_selected.ver.major) { |
| 783 | 840 | /* Check the file's major version was as it claimed */ |
| 784 | 841 | if (uc_fw->file_selected.ver.major != uc_fw->file_wanted.ver.major) { |
| 785 | − gt_notice(gt, "%s firmware %s: unexpected version: %u.%u != %u.%u\n", | |
| 786 | − intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, | |
| 787 | − uc_fw->file_selected.ver.major, uc_fw->file_selected.ver.minor, | |
| 788 | − uc_fw->file_wanted.ver.major, uc_fw->file_wanted.ver.minor); | |
| 842 | + UNEXPECTED(gt, "%s firmware %s: unexpected version: %u.%u != %u.%u\n", | |
| 843 | + intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, | |
| 844 | + uc_fw->file_selected.ver.major, uc_fw->file_selected.ver.minor, | |
| 845 | + uc_fw->file_wanted.ver.major, uc_fw->file_wanted.ver.minor); | |
| 789 | 846 | if (!intel_uc_fw_is_overridden(uc_fw)) { |
| 790 | 847 | err = -ENOEXEC; |
| 791 | 848 | goto fail; |
| @@ -793,6 +850,9 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) · 1 unmodified line | ||
| 793 | 850 | } else { |
| 794 | 851 | if (uc_fw->file_selected.ver.minor < uc_fw->file_wanted.ver.minor) |
| 795 | 852 | old_ver = true; |
| 853 | + else if ((uc_fw->file_selected.ver.minor == uc_fw->file_wanted.ver.minor) && | |
| 854 | + (uc_fw->file_selected.ver.patch < uc_fw->file_wanted.ver.patch)) | |
| 855 | + old_ver = true; | |
| 796 | 856 | } |
| 797 | 857 | } |
| 798 | 858 | |
| @@ -800,12 +860,16 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) · 1 unmodified line | ||
| 800 | 860 | /* Preserve the version that was really wanted */ |
| 801 | 861 | memcpy(&uc_fw->file_wanted, &file_ideal, sizeof(uc_fw->file_wanted)); |
| 802 | 862 | |
| 803 | − gt_notice(gt, "%s firmware %s (%d.%d) is recommended, but only %s (%d.%d) was found\n", | |
| 804 | − intel_uc_fw_type_repr(uc_fw->type), | |
| 805 | − uc_fw->file_wanted.path, | |
| 806 | − uc_fw->file_wanted.ver.major, uc_fw->file_wanted.ver.minor, | |
| 807 | − uc_fw->file_selected.path, | |
| 808 | − uc_fw->file_selected.ver.major, uc_fw->file_selected.ver.minor); | |
| 863 | + UNEXPECTED(gt, "%s firmware %s (%d.%d.%d) is recommended, but only %s (%d.%d.%d) was found\n", | |
| 864 | + intel_uc_fw_type_repr(uc_fw->type), | |
| 865 | + uc_fw->file_wanted.path, | |
| 866 | + uc_fw->file_wanted.ver.major, | |
| 867 | + uc_fw->file_wanted.ver.minor, | |
| 868 | + uc_fw->file_wanted.ver.patch, | |
| 869 | + uc_fw->file_selected.path, | |
| 870 | + uc_fw->file_selected.ver.major, | |
| 871 | + uc_fw->file_selected.ver.minor, | |
| 872 | + uc_fw->file_selected.ver.patch); | |
| 809 | 873 | gt_info(gt, "Consider updating your linux-firmware pkg or downloading from %s\n", |
| 810 | 874 | INTEL_UC_FIRMWARE_URL); |
| 811 | 875 | } |
| @@ -893,9 +957,15 @@ static void uc_fw_bind_ggtt(struct intel_uc_fw *uc_fw) · 81 unmodified lines | ||
| 893 | 957 | pte_flags |= PTE_LM; |
| 894 | 958 | |
| 895 | 959 | if (ggtt->vm.raw_insert_entries) |
| 896 | − ggtt->vm.raw_insert_entries(&ggtt->vm, dummy, I915_CACHE_NONE, pte_flags); | |
| 960 | + ggtt->vm.raw_insert_entries(&ggtt->vm, dummy, | |
| 961 | + i915_gem_get_pat_index(ggtt->vm.i915, | |
| 962 | + I915_CACHE_NONE), | |
| 963 | + pte_flags); | |
| 897 | 964 | else |
| 898 | − ggtt->vm.insert_entries(&ggtt->vm, dummy, I915_CACHE_NONE, pte_flags); | |
| 965 | + ggtt->vm.insert_entries(&ggtt->vm, dummy, | |
| 966 | + i915_gem_get_pat_index(ggtt->vm.i915, | |
| 967 | + I915_CACHE_NONE), | |
| 968 | + pte_flags); | |
| 899 | 969 | } |
| 900 | 970 | |
| 901 | 971 | static void uc_fw_unbind_ggtt(struct intel_uc_fw *uc_fw) |
| @@ -330,7 +330,7 @@ void intel_vgpu_reset_resource(struct intel_vgpu *vgpu) · 329 unmodified lines | ||
| 330 | 330 | /** |
| 331 | 331 | * intel_vgpu_alloc_resource() - allocate HW resource for a vGPU |
| 332 | 332 | * @vgpu: vGPU |
| 333 | − * @param: vGPU creation params | |
| 333 | + * @conf: vGPU creation params | |
| 334 | 334 | * |
| 335 | 335 | * This function is used to allocate HW resource for a vGPU. User specifies |
| 336 | 336 | * the resource configuration through the creation params. |
| @@ -49,9 +49,9 @@ void i915_active_noop(struct dma_fence *fence, struct dma_fence_cb *cb); · 48 unmodified lines | ||
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | 51 | * __i915_active_fence_init - prepares the activity tracker for use |
| 52 | − * @active - the active tracker | |
| 53 | − * @fence - initial fence to track, can be NULL | |
| 54 | − * @func - a callback when then the tracker is retired (becomes idle), | |
| 52 | + * @active: the active tracker | |
| 53 | + * @fence: initial fence to track, can be NULL | |
| 54 | + * @fn: a callback when then the tracker is retired (becomes idle), | |
| 55 | 55 | * can be NULL |
| 56 | 56 | * |
| 57 | 57 | * i915_active_fence_init() prepares the embedded @active struct for use as |
| @@ -77,8 +77,8 @@ __i915_active_fence_set(struct i915_active_fence *active, · 19 unmodified lines | ||
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * i915_active_fence_set - updates the tracker to watch the current fence |
| 80 | − * @active - the active tracker | |
| 81 | − * @rq - the request to watch | |
| 80 | + * @active: the active tracker | |
| 81 | + * @rq: the request to watch | |
| 82 | 82 | * |
| 83 | 83 | * i915_active_fence_set() watches the given @rq for completion. While |
| 84 | 84 | * that @rq is busy, the @active reports busy. When that @rq is signaled |
| @@ -89,7 +89,7 @@ i915_active_fence_set(struct i915_active_fence *active, · 4 unmodified lines | ||
| 89 | 89 | struct i915_request *rq); |
| 90 | 90 | /** |
| 91 | 91 | * i915_active_fence_get - return a reference to the active fence |
| 92 | − * @active - the active tracker | |
| 92 | + * @active: the active tracker | |
| 93 | 93 | * |
| 94 | 94 | * i915_active_fence_get() returns a reference to the active fence, |
| 95 | 95 | * or NULL if the active tracker is idle. The reference is obtained under RCU, |
| @@ -111,7 +111,7 @@ i915_active_fence_get(struct i915_active_fence *active) · 15 unmodified lines | ||
| 111 | 111 | |
| 112 | 112 | /** |
| 113 | 113 | * i915_active_fence_isset - report whether the active tracker is assigned |
| 114 | − * @active - the active tracker | |
| 114 | + * @active: the active tracker | |
| 115 | 115 | * |
| 116 | 116 | * i915_active_fence_isset() returns true if the active tracker is currently |
| 117 | 117 | * assigned to a fence. Due to the lazy retiring, that fence may be idle |
| @@ -139,21 +139,54 @@ static const char *stringify_vma_type(const struct i915_vma *vma) · 138 unmodified lines | ||
| 139 | 139 | return "ppgtt"; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | −static const char *i915_cache_level_str(struct drm_i915_private *i915, int type) | |
| 143 | −{ | |
| 144 | − switch (type) { | |
| 145 | − case I915_CACHE_NONE: return " uncached"; | |
| 146 | − case I915_CACHE_LLC: return HAS_LLC(i915) ? " LLC" : " snooped"; | |
| 147 | − case I915_CACHE_L3_LLC: return " L3+LLC"; | |
| 148 | − case I915_CACHE_WT: return " WT"; | |
| 149 | − default: return ""; | |
| 142 | +static const char *i915_cache_level_str(struct drm_i915_gem_object *obj) | |
| 143 | +{ | |
| 144 | + struct drm_i915_private *i915 = obj_to_i915(obj); | |
| 145 | + | |
| 146 | + if (IS_METEORLAKE(i915)) { | |
| 147 | + switch (obj->pat_index) { | |
| 148 | + case 0: return " WB"; | |
| 149 | + case 1: return " WT"; | |
| 150 | + case 2: return " UC"; | |
| 151 | + case 3: return " WB (1-Way Coh)"; | |
| 152 | + case 4: return " WB (2-Way Coh)"; | |
| 153 | + default: return " not defined"; | |
| 154 | + } | |
| 155 | + } else if (IS_PONTEVECCHIO(i915)) { | |
| 156 | + switch (obj->pat_index) { | |
| 157 | + case 0: return " UC"; | |
| 158 | + case 1: return " WC"; | |
| 159 | + case 2: return " WT"; | |
| 160 | + case 3: return " WB"; | |
| 161 | + case 4: return " WT (CLOS1)"; | |
| 162 | + case 5: return " WB (CLOS1)"; | |
| 163 | + case 6: return " WT (CLOS2)"; | |
| 164 | + case 7: return " WT (CLOS2)"; | |
| 165 | + default: return " not defined"; | |
| 166 | + } | |
| 167 | + } else if (GRAPHICS_VER(i915) >= 12) { | |
| 168 | + switch (obj->pat_index) { | |
| 169 | + case 0: return " WB"; | |
| 170 | + case 1: return " WC"; | |
| 171 | + case 2: return " WT"; | |
| 172 | + case 3: return " UC"; | |
| 173 | + default: return " not defined"; | |
| 174 | + } | |
| 175 | + } else { | |
| 176 | + switch (obj->pat_index) { | |
| 177 | + case 0: return " UC"; | |
| 178 | + case 1: return HAS_LLC(i915) ? | |
| 179 | + " LLC" : " snooped"; | |
| 180 | + case 2: return " L3+LLC"; | |
| 181 | + case 3: return " WT"; | |
| 182 | + default: return " not defined"; | |
| 183 | + } | |
| 150 | 184 | } |
| 151 | 185 | } |
| 152 | 186 | |
| 153 | 187 | void |
| 154 | 188 | i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) |
| 155 | 189 | { |
| 156 | − struct drm_i915_private *dev_priv = to_i915(obj->base.dev); | |
| 157 | 190 | struct i915_vma *vma; |
| 158 | 191 | int pin_count = 0; |
| 159 | 192 | |
| @@ -165,7 +198,7 @@ i915_debugfs_describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) · 5 unmodified lines | ||
| 165 | 198 | obj->base.size / 1024, |
| 166 | 199 | obj->read_domains, |
| 167 | 200 | obj->write_domain, |
| 168 | − i915_cache_level_str(dev_priv, obj->cache_level), | |
| 201 | + i915_cache_level_str(obj), | |
| 169 | 202 | obj->mm.dirty ? " dirty" : "", |
| 170 | 203 | obj->mm.madv == I915_MADV_DONTNEED ? " purgeable" : ""); |
| 171 | 204 | if (obj->base.name) |
| @@ -147,11 +147,7 @@ void i915_drm_client_fdinfo(struct seq_file *m, struct file *f) · 146 unmodified lines | ||
| 147 | 147 | PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); |
| 148 | 148 | seq_printf(m, "drm-client-id:\t%u\n", client->id); |
| 149 | 149 | |
| 150 | − /* | |
| 151 | − * Temporarily skip showing client engine information with GuC submission till | |
| 152 | − * fetching engine busyness is implemented in the GuC submission backend | |
| 153 | − */ | |
| 154 | − if (GRAPHICS_VER(i915) < 8 || intel_uc_uses_guc_submission(&i915->gt0.uc)) | |
| 150 | + if (GRAPHICS_VER(i915) < 8) | |
| 155 | 151 | return; |
| 156 | 152 | |
| 157 | 153 | for (i = 0; i < ARRAY_SIZE(uabi_class_names); i++) |
| @@ -382,11 +382,11 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) · 381 unmodified lines | ||
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | /* Simple iterator over all initialised engines */ |
| 385 | −#define for_each_engine(engine__, dev_priv__, id__) \ | |
| 385 | +#define for_each_engine(engine__, gt__, id__) \ | |
| 386 | 386 | for ((id__) = 0; \ |
| 387 | 387 | (id__) < I915_NUM_ENGINES; \ |
| 388 | 388 | (id__)++) \ |
| 389 | − for_each_if ((engine__) = (dev_priv__)->engine[(id__)]) | |
| 389 | + for_each_if ((engine__) = (gt__)->engine[(id__)]) | |
| 390 | 390 | |
| 391 | 391 | /* Iterator over subset of engines selected by mask */ |
| 392 | 392 | #define for_each_engine_masked(engine__, gt__, mask__, tmp__) \ |
| @@ -408,13 +408,13 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) · 15 unmodified lines | ||
| 408 | 408 | (engine__) && (engine__)->uabi_class == (class__); \ |
| 409 | 409 | (engine__) = rb_to_uabi_engine(rb_next(&(engine__)->uabi_node))) |
| 410 | 410 | |
| 411 | −#define INTEL_INFO(dev_priv) (&(dev_priv)->__info) | |
| 411 | +#define INTEL_INFO(i915) (&(i915)->__info) | |
| 412 | 412 | #define DISPLAY_INFO(i915) (INTEL_INFO(i915)->display) |
| 413 | −#define RUNTIME_INFO(dev_priv) (&(dev_priv)->__runtime) | |
| 413 | +#define RUNTIME_INFO(i915) (&(i915)->__runtime) | |
| 414 | 414 | #define DISPLAY_RUNTIME_INFO(i915) (&(i915)->__display_runtime) |
| 415 | −#define DRIVER_CAPS(dev_priv) (&(dev_priv)->caps) | |
| 415 | +#define DRIVER_CAPS(i915) (&(i915)->caps) | |
| 416 | 416 | |
| 417 | −#define INTEL_DEVID(dev_priv) (RUNTIME_INFO(dev_priv)->device_id) | |
| 417 | +#define INTEL_DEVID(i915) (RUNTIME_INFO(i915)->device_id) | |
| 418 | 418 | |
| 419 | 419 | #define IP_VER(ver, rel) ((ver) << 8 | (rel)) |
| 420 | 420 | |
| @@ -434,7 +434,7 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) · 13 unmodified lines | ||
| 434 | 434 | #define IS_DISPLAY_VER(i915, from, until) \ |
| 435 | 435 | (DISPLAY_VER(i915) >= (from) && DISPLAY_VER(i915) <= (until)) |
| 436 | 436 | |
| 437 | −#define INTEL_REVID(dev_priv) (to_pci_dev((dev_priv)->drm.dev)->revision) | |
| 437 | +#define INTEL_REVID(i915) (to_pci_dev((i915)->drm.dev)->revision) | |
| 438 | 438 | |
| 439 | 439 | #define INTEL_DISPLAY_STEP(__i915) (RUNTIME_INFO(__i915)->step.display_step) |
| 440 | 440 | #define INTEL_GRAPHICS_STEP(__i915) (RUNTIME_INFO(__i915)->step.graphics_step) |
| @@ -519,135 +519,135 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, · 78 unmodified lines | ||
| 519 | 519 | return ((mask << (msb - pb)) & (mask << (msb - s))) & BIT(msb); |
| 520 | 520 | } |
| 521 | 521 | |
| 522 | −#define IS_MOBILE(dev_priv) (INTEL_INFO(dev_priv)->is_mobile) | |
| 523 | −#define IS_DGFX(dev_priv) (INTEL_INFO(dev_priv)->is_dgfx) | |
| 524 | − | |
| 525 | −#define IS_I830(dev_priv) IS_PLATFORM(dev_priv, INTEL_I830) | |
| 526 | −#define IS_I845G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I845G) | |
| 527 | −#define IS_I85X(dev_priv) IS_PLATFORM(dev_priv, INTEL_I85X) | |
| 528 | −#define IS_I865G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I865G) | |
| 529 | −#define IS_I915G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I915G) | |
| 530 | −#define IS_I915GM(dev_priv) IS_PLATFORM(dev_priv, INTEL_I915GM) | |
| 531 | −#define IS_I945G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I945G) | |
| 532 | −#define IS_I945GM(dev_priv) IS_PLATFORM(dev_priv, INTEL_I945GM) | |
| 533 | −#define IS_I965G(dev_priv) IS_PLATFORM(dev_priv, INTEL_I965G) | |
| 534 | −#define IS_I965GM(dev_priv) IS_PLATFORM(dev_priv, INTEL_I965GM) | |
| 535 | −#define IS_G45(dev_priv) IS_PLATFORM(dev_priv, INTEL_G45) | |
| 536 | −#define IS_GM45(dev_priv) IS_PLATFORM(dev_priv, INTEL_GM45) | |
| 537 | −#define IS_G4X(dev_priv) (IS_G45(dev_priv) || IS_GM45(dev_priv)) | |
| 538 | −#define IS_PINEVIEW(dev_priv) IS_PLATFORM(dev_priv, INTEL_PINEVIEW) | |
| 539 | −#define IS_G33(dev_priv) IS_PLATFORM(dev_priv, INTEL_G33) | |
| 540 | −#define IS_IRONLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_IRONLAKE) | |
| 541 | −#define IS_IRONLAKE_M(dev_priv) \ | |
| 542 | − (IS_PLATFORM(dev_priv, INTEL_IRONLAKE) && IS_MOBILE(dev_priv)) | |
| 543 | −#define IS_SANDYBRIDGE(dev_priv) IS_PLATFORM(dev_priv, INTEL_SANDYBRIDGE) | |
| 544 | −#define IS_IVYBRIDGE(dev_priv) IS_PLATFORM(dev_priv, INTEL_IVYBRIDGE) | |
| 545 | −#define IS_IVB_GT1(dev_priv) (IS_IVYBRIDGE(dev_priv) && \ | |
| 546 | − INTEL_INFO(dev_priv)->gt == 1) | |
| 547 | −#define IS_VALLEYVIEW(dev_priv) IS_PLATFORM(dev_priv, INTEL_VALLEYVIEW) | |
| 548 | −#define IS_CHERRYVIEW(dev_priv) IS_PLATFORM(dev_priv, INTEL_CHERRYVIEW) | |
| 549 | −#define IS_HASWELL(dev_priv) IS_PLATFORM(dev_priv, INTEL_HASWELL) | |
| 550 | −#define IS_BROADWELL(dev_priv) IS_PLATFORM(dev_priv, INTEL_BROADWELL) | |
| 551 | −#define IS_SKYLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_SKYLAKE) | |
| 552 | −#define IS_BROXTON(dev_priv) IS_PLATFORM(dev_priv, INTEL_BROXTON) | |
| 553 | −#define IS_KABYLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_KABYLAKE) | |
| 554 | −#define IS_GEMINILAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_GEMINILAKE) | |
| 555 | −#define IS_COFFEELAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_COFFEELAKE) | |
| 556 | −#define IS_COMETLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_COMETLAKE) | |
| 557 | −#define IS_ICELAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ICELAKE) | |
| 558 | −#define IS_JSL_EHL(dev_priv) (IS_PLATFORM(dev_priv, INTEL_JASPERLAKE) || \ | |
| 559 | − IS_PLATFORM(dev_priv, INTEL_ELKHARTLAKE)) | |
| 560 | −#define IS_TIGERLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_TIGERLAKE) | |
| 561 | −#define IS_ROCKETLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_ROCKETLAKE) | |
| 562 | −#define IS_DG1(dev_priv) IS_PLATFORM(dev_priv, INTEL_DG1) | |
| 563 | −#define IS_ALDERLAKE_S(dev_priv) IS_PLATFORM(dev_priv, INTEL_ALDERLAKE_S) | |
| 564 | −#define IS_ALDERLAKE_P(dev_priv) IS_PLATFORM(dev_priv, INTEL_ALDERLAKE_P) | |
| 565 | −#define IS_XEHPSDV(dev_priv) IS_PLATFORM(dev_priv, INTEL_XEHPSDV) | |
| 566 | −#define IS_DG2(dev_priv) IS_PLATFORM(dev_priv, INTEL_DG2) | |
| 567 | −#define IS_PONTEVECCHIO(dev_priv) IS_PLATFORM(dev_priv, INTEL_PONTEVECCHIO) | |
| 568 | −#define IS_METEORLAKE(dev_priv) IS_PLATFORM(dev_priv, INTEL_METEORLAKE) | |
| 569 | − | |
| 570 | −#define IS_METEORLAKE_M(dev_priv) \ | |
| 571 | − IS_SUBPLATFORM(dev_priv, INTEL_METEORLAKE, INTEL_SUBPLATFORM_M) | |
| 572 | −#define IS_METEORLAKE_P(dev_priv) \ | |
| 573 | − IS_SUBPLATFORM(dev_priv, INTEL_METEORLAKE, INTEL_SUBPLATFORM_P) | |
| 574 | −#define IS_DG2_G10(dev_priv) \ | |
| 575 | − IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G10) | |
| 576 | −#define IS_DG2_G11(dev_priv) \ | |
| 577 | − IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G11) | |
| 578 | −#define IS_DG2_G12(dev_priv) \ | |
| 579 | − IS_SUBPLATFORM(dev_priv, INTEL_DG2, INTEL_SUBPLATFORM_G12) | |
| 580 | −#define IS_ADLS_RPLS(dev_priv) \ | |
| 581 | − IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_S, INTEL_SUBPLATFORM_RPL) | |
| 582 | −#define IS_ADLP_N(dev_priv) \ | |
| 583 | − IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_N) | |
| 584 | −#define IS_ADLP_RPLP(dev_priv) \ | |
| 585 | − IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPL) | |
| 586 | −#define IS_ADLP_RPLU(dev_priv) \ | |
| 587 | − IS_SUBPLATFORM(dev_priv, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPLU) | |
| 588 | −#define IS_HSW_EARLY_SDV(dev_priv) (IS_HASWELL(dev_priv) && \ | |
| 589 | − (INTEL_DEVID(dev_priv) & 0xFF00) == 0x0C00) | |
| 590 | −#define IS_BDW_ULT(dev_priv) \ | |
| 591 | − IS_SUBPLATFORM(dev_priv, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULT) | |
| 592 | −#define IS_BDW_ULX(dev_priv) \ | |
| 593 | − IS_SUBPLATFORM(dev_priv, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULX) | |
| 594 | −#define IS_BDW_GT3(dev_priv) (IS_BROADWELL(dev_priv) && \ | |
| 595 | − INTEL_INFO(dev_priv)->gt == 3) | |
| 596 | −#define IS_HSW_ULT(dev_priv) \ | |
| 597 | − IS_SUBPLATFORM(dev_priv, INTEL_HASWELL, INTEL_SUBPLATFORM_ULT) | |
| 598 | −#define IS_HSW_GT3(dev_priv) (IS_HASWELL(dev_priv) && \ | |
| 599 | − INTEL_INFO(dev_priv)->gt == 3) | |
| 600 | −#define IS_HSW_GT1(dev_priv) (IS_HASWELL(dev_priv) && \ | |
| 601 | − INTEL_INFO(dev_priv)->gt == 1) | |
| 522 | +#define IS_MOBILE(i915) (INTEL_INFO(i915)->is_mobile) | |
| 523 | +#define IS_DGFX(i915) (INTEL_INFO(i915)->is_dgfx) | |
| 524 | + | |
| 525 | +#define IS_I830(i915) IS_PLATFORM(i915, INTEL_I830) | |
| 526 | +#define IS_I845G(i915) IS_PLATFORM(i915, INTEL_I845G) | |
| 527 | +#define IS_I85X(i915) IS_PLATFORM(i915, INTEL_I85X) | |
| 528 | +#define IS_I865G(i915) IS_PLATFORM(i915, INTEL_I865G) | |
| 529 | +#define IS_I915G(i915) IS_PLATFORM(i915, INTEL_I915G) | |
| 530 | +#define IS_I915GM(i915) IS_PLATFORM(i915, INTEL_I915GM) | |
| 531 | +#define IS_I945G(i915) IS_PLATFORM(i915, INTEL_I945G) | |
| 532 | +#define IS_I945GM(i915) IS_PLATFORM(i915, INTEL_I945GM) | |
| 533 | +#define IS_I965G(i915) IS_PLATFORM(i915, INTEL_I965G) | |
| 534 | +#define IS_I965GM(i915) IS_PLATFORM(i915, INTEL_I965GM) | |
| 535 | +#define IS_G45(i915) IS_PLATFORM(i915, INTEL_G45) | |
| 536 | +#define IS_GM45(i915) IS_PLATFORM(i915, INTEL_GM45) | |
| 537 | +#define IS_G4X(i915) (IS_G45(i915) || IS_GM45(i915)) | |
| 538 | +#define IS_PINEVIEW(i915) IS_PLATFORM(i915, INTEL_PINEVIEW) | |
| 539 | +#define IS_G33(i915) IS_PLATFORM(i915, INTEL_G33) | |
| 540 | +#define IS_IRONLAKE(i915) IS_PLATFORM(i915, INTEL_IRONLAKE) | |
| 541 | +#define IS_IRONLAKE_M(i915) \ | |
| 542 | + (IS_PLATFORM(i915, INTEL_IRONLAKE) && IS_MOBILE(i915)) | |
| 543 | +#define IS_SANDYBRIDGE(i915) IS_PLATFORM(i915, INTEL_SANDYBRIDGE) | |
| 544 | +#define IS_IVYBRIDGE(i915) IS_PLATFORM(i915, INTEL_IVYBRIDGE) | |
| 545 | +#define IS_IVB_GT1(i915) (IS_IVYBRIDGE(i915) && \ | |
| 546 | + INTEL_INFO(i915)->gt == 1) | |
| 547 | +#define IS_VALLEYVIEW(i915) IS_PLATFORM(i915, INTEL_VALLEYVIEW) | |
| 548 | +#define IS_CHERRYVIEW(i915) IS_PLATFORM(i915, INTEL_CHERRYVIEW) | |
| 549 | +#define IS_HASWELL(i915) IS_PLATFORM(i915, INTEL_HASWELL) | |
| 550 | +#define IS_BROADWELL(i915) IS_PLATFORM(i915, INTEL_BROADWELL) | |
| 551 | +#define IS_SKYLAKE(i915) IS_PLATFORM(i915, INTEL_SKYLAKE) | |
| 552 | +#define IS_BROXTON(i915) IS_PLATFORM(i915, INTEL_BROXTON) | |
| 553 | +#define IS_KABYLAKE(i915) IS_PLATFORM(i915, INTEL_KABYLAKE) | |
| 554 | +#define IS_GEMINILAKE(i915) IS_PLATFORM(i915, INTEL_GEMINILAKE) | |
| 555 | +#define IS_COFFEELAKE(i915) IS_PLATFORM(i915, INTEL_COFFEELAKE) | |
| 556 | +#define IS_COMETLAKE(i915) IS_PLATFORM(i915, INTEL_COMETLAKE) | |
| 557 | +#define IS_ICELAKE(i915) IS_PLATFORM(i915, INTEL_ICELAKE) | |
| 558 | +#define IS_JSL_EHL(i915) (IS_PLATFORM(i915, INTEL_JASPERLAKE) || \ | |
| 559 | + IS_PLATFORM(i915, INTEL_ELKHARTLAKE)) | |
| 560 | +#define IS_TIGERLAKE(i915) IS_PLATFORM(i915, INTEL_TIGERLAKE) | |
| 561 | +#define IS_ROCKETLAKE(i915) IS_PLATFORM(i915, INTEL_ROCKETLAKE) | |
| 562 | +#define IS_DG1(i915) IS_PLATFORM(i915, INTEL_DG1) | |
| 563 | +#define IS_ALDERLAKE_S(i915) IS_PLATFORM(i915, INTEL_ALDERLAKE_S) | |
| 564 | +#define IS_ALDERLAKE_P(i915) IS_PLATFORM(i915, INTEL_ALDERLAKE_P) | |
| 565 | +#define IS_XEHPSDV(i915) IS_PLATFORM(i915, INTEL_XEHPSDV) | |
| 566 | +#define IS_DG2(i915) IS_PLATFORM(i915, INTEL_DG2) | |
| 567 | +#define IS_PONTEVECCHIO(i915) IS_PLATFORM(i915, INTEL_PONTEVECCHIO) | |
| 568 | +#define IS_METEORLAKE(i915) IS_PLATFORM(i915, INTEL_METEORLAKE) | |
| 569 | + | |
| 570 | +#define IS_METEORLAKE_M(i915) \ | |
| 571 | + IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_M) | |
| 572 | +#define IS_METEORLAKE_P(i915) \ | |
| 573 | + IS_SUBPLATFORM(i915, INTEL_METEORLAKE, INTEL_SUBPLATFORM_P) | |
| 574 | +#define IS_DG2_G10(i915) \ | |
| 575 | + IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G10) | |
| 576 | +#define IS_DG2_G11(i915) \ | |
| 577 | + IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G11) | |
| 578 | +#define IS_DG2_G12(i915) \ | |
| 579 | + IS_SUBPLATFORM(i915, INTEL_DG2, INTEL_SUBPLATFORM_G12) | |
| 580 | +#define IS_ADLS_RPLS(i915) \ | |
| 581 | + IS_SUBPLATFORM(i915, INTEL_ALDERLAKE_S, INTEL_SUBPLATFORM_RPL) | |
| 582 | +#define IS_ADLP_N(i915) \ | |
| 583 | + IS_SUBPLATFORM(i915, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_N) | |
| 584 | +#define IS_ADLP_RPLP(i915) \ | |
| 585 | + IS_SUBPLATFORM(i915, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPL) | |
| 586 | +#define IS_ADLP_RPLU(i915) \ | |
| 587 | + IS_SUBPLATFORM(i915, INTEL_ALDERLAKE_P, INTEL_SUBPLATFORM_RPLU) | |
| 588 | +#define IS_HSW_EARLY_SDV(i915) (IS_HASWELL(i915) && \ | |
| 589 | + (INTEL_DEVID(i915) & 0xFF00) == 0x0C00) | |
| 590 | +#define IS_BDW_ULT(i915) \ | |
| 591 | + IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULT) | |
| 592 | +#define IS_BDW_ULX(i915) \ | |
| 593 | + IS_SUBPLATFORM(i915, INTEL_BROADWELL, INTEL_SUBPLATFORM_ULX) | |
| 594 | +#define IS_BDW_GT3(i915) (IS_BROADWELL(i915) && \ | |
| 595 | + INTEL_INFO(i915)->gt == 3) | |
| 596 | +#define IS_HSW_ULT(i915) \ | |
| 597 | + IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULT) | |
| 598 | +#define IS_HSW_GT3(i915) (IS_HASWELL(i915) && \ | |
| 599 | + INTEL_INFO(i915)->gt == 3) | |
| 600 | +#define IS_HSW_GT1(i915) (IS_HASWELL(i915) && \ | |
| 601 | + INTEL_INFO(i915)->gt == 1) | |
| 602 | 602 | /* ULX machines are also considered ULT. */ |
| 603 | −#define IS_HSW_ULX(dev_priv) \ | |
| 604 | − IS_SUBPLATFORM(dev_priv, INTEL_HASWELL, INTEL_SUBPLATFORM_ULX) | |
| 605 | −#define IS_SKL_ULT(dev_priv) \ | |
| 606 | − IS_SUBPLATFORM(dev_priv, INTEL_SKYLAKE, INTEL_SUBPLATFORM_ULT) | |
| 607 | −#define IS_SKL_ULX(dev_priv) \ | |
| 608 | − IS_SUBPLATFORM(dev_priv, INTEL_SKYLAKE, INTEL_SUBPLATFORM_ULX) | |
| 609 | −#define IS_KBL_ULT(dev_priv) \ | |
| 610 | − IS_SUBPLATFORM(dev_priv, INTEL_KABYLAKE, INTEL_SUBPLATFORM_ULT) | |
| 611 | −#define IS_KBL_ULX(dev_priv) \ | |
| 612 | − IS_SUBPLATFORM(dev_priv, INTEL_KABYLAKE, INTEL_SUBPLATFORM_ULX) | |
| 613 | −#define IS_SKL_GT2(dev_priv) (IS_SKYLAKE(dev_priv) && \ | |
| 614 | − INTEL_INFO(dev_priv)->gt == 2) | |
| 615 | −#define IS_SKL_GT3(dev_priv) (IS_SKYLAKE(dev_priv) && \ | |
| 616 | − INTEL_INFO(dev_priv)->gt == 3) | |
| 617 | −#define IS_SKL_GT4(dev_priv) (IS_SKYLAKE(dev_priv) && \ | |
| 618 | − INTEL_INFO(dev_priv)->gt == 4) | |
| 619 | −#define IS_KBL_GT2(dev_priv) (IS_KABYLAKE(dev_priv) && \ | |
| 620 | − INTEL_INFO(dev_priv)->gt == 2) | |
| 621 | −#define IS_KBL_GT3(dev_priv) (IS_KABYLAKE(dev_priv) && \ | |
| 622 | − INTEL_INFO(dev_priv)->gt == 3) | |
| 623 | −#define IS_CFL_ULT(dev_priv) \ | |
| 624 | − IS_SUBPLATFORM(dev_priv, INTEL_COFFEELAKE, INTEL_SUBPLATFORM_ULT) | |
| 625 | −#define IS_CFL_ULX(dev_priv) \ | |
| 626 | − IS_SUBPLATFORM(dev_priv, INTEL_COFFEELAKE, INTEL_SUBPLATFORM_ULX) | |
| 627 | −#define IS_CFL_GT2(dev_priv) (IS_COFFEELAKE(dev_priv) && \ | |
| 628 | − INTEL_INFO(dev_priv)->gt == 2) | |
| 629 | −#define IS_CFL_GT3(dev_priv) (IS_COFFEELAKE(dev_priv) && \ | |
| 630 | − INTEL_INFO(dev_priv)->gt == 3) | |
| 631 | − | |
| 632 | −#define IS_CML_ULT(dev_priv) \ | |
| 633 | − IS_SUBPLATFORM(dev_priv, INTEL_COMETLAKE, INTEL_SUBPLATFORM_ULT) | |
| 634 | −#define IS_CML_ULX(dev_priv) \ | |
| 635 | − IS_SUBPLATFORM(dev_priv, INTEL_COMETLAKE, INTEL_SUBPLATFORM_ULX) | |
| 636 | −#define IS_CML_GT2(dev_priv) (IS_COMETLAKE(dev_priv) && \ | |
| 637 | − INTEL_INFO(dev_priv)->gt == 2) | |
| 638 | − | |
| 639 | −#define IS_ICL_WITH_PORT_F(dev_priv) \ | |
| 640 | − IS_SUBPLATFORM(dev_priv, INTEL_ICELAKE, INTEL_SUBPLATFORM_PORTF) | |
| 641 | − | |
| 642 | −#define IS_TGL_UY(dev_priv) \ | |
| 643 | − IS_SUBPLATFORM(dev_priv, INTEL_TIGERLAKE, INTEL_SUBPLATFORM_UY) | |
| 603 | +#define IS_HSW_ULX(i915) \ | |
| 604 | + IS_SUBPLATFORM(i915, INTEL_HASWELL, INTEL_SUBPLATFORM_ULX) | |
| 605 | +#define IS_SKL_ULT(i915) \ | |
| 606 | + IS_SUBPLATFORM(i915, INTEL_SKYLAKE, INTEL_SUBPLATFORM_ULT) | |
| 607 | +#define IS_SKL_ULX(i915) \ | |
| 608 | + IS_SUBPLATFORM(i915, INTEL_SKYLAKE, INTEL_SUBPLATFORM_ULX) | |
| 609 | +#define IS_KBL_ULT(i915) \ | |
| 610 | + IS_SUBPLATFORM(i915, INTEL_KABYLAKE, INTEL_SUBPLATFORM_ULT) | |
| 611 | +#define IS_KBL_ULX(i915) \ | |
| 612 | + IS_SUBPLATFORM(i915, INTEL_KABYLAKE, INTEL_SUBPLATFORM_ULX) | |
| 613 | +#define IS_SKL_GT2(i915) (IS_SKYLAKE(i915) && \ | |
| 614 | + INTEL_INFO(i915)->gt == 2) | |
| 615 | +#define IS_SKL_GT3(i915) (IS_SKYLAKE(i915) && \ | |
| 616 | + INTEL_INFO(i915)->gt == 3) | |
| 617 | +#define IS_SKL_GT4(i915) (IS_SKYLAKE(i915) && \ | |
| 618 | + INTEL_INFO(i915)->gt == 4) | |
| 619 | +#define IS_KBL_GT2(i915) (IS_KABYLAKE(i915) && \ | |
| 620 | + INTEL_INFO(i915)->gt == 2) | |
| 621 | +#define IS_KBL_GT3(i915) (IS_KABYLAKE(i915) && \ | |
| 622 | + INTEL_INFO(i915)->gt == 3) | |
| 623 | +#define IS_CFL_ULT(i915) \ | |
| 624 | + IS_SUBPLATFORM(i915, INTEL_COFFEELAKE, INTEL_SUBPLATFORM_ULT) | |
| 625 | +#define IS_CFL_ULX(i915) \ | |
| 626 | + IS_SUBPLATFORM(i915, INTEL_COFFEELAKE, INTEL_SUBPLATFORM_ULX) | |
| 627 | +#define IS_CFL_GT2(i915) (IS_COFFEELAKE(i915) && \ | |
| 628 | + INTEL_INFO(i915)->gt == 2) | |
| 629 | +#define IS_CFL_GT3(i915) (IS_COFFEELAKE(i915) && \ | |
| 630 | + INTEL_INFO(i915)->gt == 3) | |
| 631 | + | |
| 632 | +#define IS_CML_ULT(i915) \ | |
| 633 | + IS_SUBPLATFORM(i915, INTEL_COMETLAKE, INTEL_SUBPLATFORM_ULT) | |
| 634 | +#define IS_CML_ULX(i915) \ | |
| 635 | + IS_SUBPLATFORM(i915, INTEL_COMETLAKE, INTEL_SUBPLATFORM_ULX) | |
| 636 | +#define IS_CML_GT2(i915) (IS_COMETLAKE(i915) && \ | |
| 637 | + INTEL_INFO(i915)->gt == 2) | |
| 638 | + | |
| 639 | +#define IS_ICL_WITH_PORT_F(i915) \ | |
| 640 | + IS_SUBPLATFORM(i915, INTEL_ICELAKE, INTEL_SUBPLATFORM_PORTF) | |
| 641 | + | |
| 642 | +#define IS_TGL_UY(i915) \ | |
| 643 | + IS_SUBPLATFORM(i915, INTEL_TIGERLAKE, INTEL_SUBPLATFORM_UY) | |
| 644 | 644 | |
| 645 | 645 | #define IS_SKL_GRAPHICS_STEP(p, since, until) (IS_SKYLAKE(p) && IS_GRAPHICS_STEP(p, since, until)) |
| 646 | 646 | |
| 647 | −#define IS_KBL_GRAPHICS_STEP(dev_priv, since, until) \ | |
| 648 | − (IS_KABYLAKE(dev_priv) && IS_GRAPHICS_STEP(dev_priv, since, until)) | |
| 649 | −#define IS_KBL_DISPLAY_STEP(dev_priv, since, until) \ | |
| 650 | − (IS_KABYLAKE(dev_priv) && IS_DISPLAY_STEP(dev_priv, since, until)) | |
| 647 | +#define IS_KBL_GRAPHICS_STEP(i915, since, until) \ | |
| 648 | + (IS_KABYLAKE(i915) && IS_GRAPHICS_STEP(i915, since, until)) | |
| 649 | +#define IS_KBL_DISPLAY_STEP(i915, since, until) \ | |
| 650 | + (IS_KABYLAKE(i915) && IS_DISPLAY_STEP(i915, since, until)) | |
| 651 | 651 | |
| 652 | 652 | #define IS_JSL_EHL_GRAPHICS_STEP(p, since, until) \ |
| 653 | 653 | (IS_JSL_EHL(p) && IS_GRAPHICS_STEP(p, since, until)) |
| @@ -723,9 +723,9 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, · 69 unmodified lines | ||
| 723 | 723 | (IS_PONTEVECCHIO(__i915) && \ |
| 724 | 724 | IS_GRAPHICS_STEP(__i915, since, until)) |
| 725 | 725 | |
| 726 | −#define IS_LP(dev_priv) (INTEL_INFO(dev_priv)->is_lp) | |
| 727 | −#define IS_GEN9_LP(dev_priv) (GRAPHICS_VER(dev_priv) == 9 && IS_LP(dev_priv)) | |
| 728 | −#define IS_GEN9_BC(dev_priv) (GRAPHICS_VER(dev_priv) == 9 && !IS_LP(dev_priv)) | |
| 726 | +#define IS_LP(i915) (INTEL_INFO(i915)->is_lp) | |
| 727 | +#define IS_GEN9_LP(i915) (GRAPHICS_VER(i915) == 9 && IS_LP(i915)) | |
| 728 | +#define IS_GEN9_BC(i915) (GRAPHICS_VER(i915) == 9 && !IS_LP(i915)) | |
| 729 | 729 | |
| 730 | 730 | #define __HAS_ENGINE(engine_mask, id) ((engine_mask) & BIT(id)) |
| 731 | 731 | #define HAS_ENGINE(gt, id) __HAS_ENGINE((gt)->info.engine_mask, id) |
| @@ -750,122 +750,121 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, · 18 unmodified lines | ||
| 750 | 750 | #define CCS_MASK(gt) \ |
| 751 | 751 | ENGINE_INSTANCES_MASK(gt, CCS0, I915_MAX_CCS) |
| 752 | 752 | |
| 753 | −#define HAS_MEDIA_RATIO_MODE(dev_priv) (INTEL_INFO(dev_priv)->has_media_ratio_mode) | |
| 753 | +#define HAS_MEDIA_RATIO_MODE(i915) (INTEL_INFO(i915)->has_media_ratio_mode) | |
| 754 | 754 | |
| 755 | 755 | /* |
| 756 | 756 | * The Gen7 cmdparser copies the scanned buffer to the ggtt for execution |
| 757 | 757 | * All later gens can run the final buffer from the ppgtt |
| 758 | 758 | */ |
| 759 | −#define CMDPARSER_USES_GGTT(dev_priv) (GRAPHICS_VER(dev_priv) == 7) | |
| 759 | +#define CMDPARSER_USES_GGTT(i915) (GRAPHICS_VER(i915) == 7) | |
| 760 | 760 | |
| 761 | −#define HAS_LLC(dev_priv) (INTEL_INFO(dev_priv)->has_llc) | |
| 762 | −#define HAS_4TILE(dev_priv) (INTEL_INFO(dev_priv)->has_4tile) | |
| 763 | −#define HAS_SNOOP(dev_priv) (INTEL_INFO(dev_priv)->has_snoop) | |
| 764 | −#define HAS_EDRAM(dev_priv) ((dev_priv)->edram_size_mb) | |
| 765 | −#define HAS_SECURE_BATCHES(dev_priv) (GRAPHICS_VER(dev_priv) < 6) | |
| 766 | −#define HAS_WT(dev_priv) HAS_EDRAM(dev_priv) | |
| 761 | +#define HAS_LLC(i915) (INTEL_INFO(i915)->has_llc) | |
| 762 | +#define HAS_4TILE(i915) (INTEL_INFO(i915)->has_4tile) | |
| 763 | +#define HAS_SNOOP(i915) (INTEL_INFO(i915)->has_snoop) | |
| 764 | +#define HAS_EDRAM(i915) ((i915)->edram_size_mb) | |
| 765 | +#define HAS_SECURE_BATCHES(i915) (GRAPHICS_VER(i915) < 6) | |
| 766 | +#define HAS_WT(i915) HAS_EDRAM(i915) | |
| 767 | 767 | |
| 768 | −#define HWS_NEEDS_PHYSICAL(dev_priv) (INTEL_INFO(dev_priv)->hws_needs_physical) | |
| 768 | +#define HWS_NEEDS_PHYSICAL(i915) (INTEL_INFO(i915)->hws_needs_physical) | |
| 769 | 769 | |
| 770 | −#define HAS_LOGICAL_RING_CONTEXTS(dev_priv) \ | |
| 771 | − (INTEL_INFO(dev_priv)->has_logical_ring_contexts) | |
| 772 | −#define HAS_LOGICAL_RING_ELSQ(dev_priv) \ | |
| 773 | − (INTEL_INFO(dev_priv)->has_logical_ring_elsq) | |
| 770 | +#define HAS_LOGICAL_RING_CONTEXTS(i915) \ | |
| 771 | + (INTEL_INFO(i915)->has_logical_ring_contexts) | |
| 772 | +#define HAS_LOGICAL_RING_ELSQ(i915) \ | |
| 773 | + (INTEL_INFO(i915)->has_logical_ring_elsq) | |
| 774 | 774 | |
| 775 | −#define HAS_EXECLISTS(dev_priv) HAS_LOGICAL_RING_CONTEXTS(dev_priv) | |
| 775 | +#define HAS_EXECLISTS(i915) HAS_LOGICAL_RING_CONTEXTS(i915) | |
| 776 | 776 | |
| 777 | −#define INTEL_PPGTT(dev_priv) (RUNTIME_INFO(dev_priv)->ppgtt_type) | |
| 778 | −#define HAS_PPGTT(dev_priv) \ | |
| 779 | − (INTEL_PPGTT(dev_priv) != INTEL_PPGTT_NONE) | |
| 780 | −#define HAS_FULL_PPGTT(dev_priv) \ | |
| 781 | − (INTEL_PPGTT(dev_priv) >= INTEL_PPGTT_FULL) | |
| 777 | +#define INTEL_PPGTT(i915) (RUNTIME_INFO(i915)->ppgtt_type) | |
| 778 | +#define HAS_PPGTT(i915) \ | |
| 779 | + (INTEL_PPGTT(i915) != INTEL_PPGTT_NONE) | |
| 780 | +#define HAS_FULL_PPGTT(i915) \ | |
| 781 | + (INTEL_PPGTT(i915) >= INTEL_PPGTT_FULL) | |
| 782 | 782 | |
| 783 | −#define HAS_PAGE_SIZES(dev_priv, sizes) ({ \ | |
| 783 | +#define HAS_PAGE_SIZES(i915, sizes) ({ \ | |
| 784 | 784 | GEM_BUG_ON((sizes) == 0); \ |
| 785 | − ((sizes) & ~RUNTIME_INFO(dev_priv)->page_sizes) == 0; \ | |
| 785 | + ((sizes) & ~RUNTIME_INFO(i915)->page_sizes) == 0; \ | |
| 786 | 786 | }) |
| 787 | 787 | |
| 788 | 788 | /* Early gen2 have a totally busted CS tlb and require pinned batches. */ |
| 789 | −#define HAS_BROKEN_CS_TLB(dev_priv) (IS_I830(dev_priv) || IS_I845G(dev_priv)) | |
| 789 | +#define HAS_BROKEN_CS_TLB(i915) (IS_I830(i915) || IS_I845G(i915)) | |
| 790 | 790 | |
| 791 | −#define NEEDS_RC6_CTX_CORRUPTION_WA(dev_priv) \ | |
| 792 | − (IS_BROADWELL(dev_priv) || GRAPHICS_VER(dev_priv) == 9) | |
| 791 | +#define NEEDS_RC6_CTX_CORRUPTION_WA(i915) \ | |
| 792 | + (IS_BROADWELL(i915) || GRAPHICS_VER(i915) == 9) | |
| 793 | 793 | |
| 794 | 794 | /* WaRsDisableCoarsePowerGating:skl,cnl */ |
| 795 | −#define NEEDS_WaRsDisableCoarsePowerGating(dev_priv) \ | |
| 796 | − (IS_SKL_GT3(dev_priv) || IS_SKL_GT4(dev_priv)) | |
| 795 | +#define NEEDS_WaRsDisableCoarsePowerGating(i915) \ | |
| 796 | + (IS_SKL_GT3(i915) || IS_SKL_GT4(i915)) | |
| 797 | 797 | |
| 798 | 798 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte |
| 799 | 799 | * rows, which changed the alignment requirements and fence programming. |
| 800 | 800 | */ |
| 801 | −#define HAS_128_BYTE_Y_TILING(dev_priv) (GRAPHICS_VER(dev_priv) != 2 && \ | |
| 802 | − !(IS_I915G(dev_priv) || IS_I915GM(dev_priv))) | |
| 801 | +#define HAS_128_BYTE_Y_TILING(i915) (GRAPHICS_VER(i915) != 2 && \ | |
| 802 | + !(IS_I915G(i915) || IS_I915GM(i915))) | |
| 803 | 803 | |
| 804 | +#define HAS_RC6(i915) (INTEL_INFO(i915)->has_rc6) | |
| 805 | +#define HAS_RC6p(i915) (INTEL_INFO(i915)->has_rc6p) | |
| 806 | +#define HAS_RC6pp(i915) (false) /* HW was never validated */ | |
| 804 | 807 | |
| 805 | −#define HAS_RC6(dev_priv) (INTEL_INFO(dev_priv)->has_rc6) | |
| 806 | −#define HAS_RC6p(dev_priv) (INTEL_INFO(dev_priv)->has_rc6p) | |
| 807 | −#define HAS_RC6pp(dev_priv) (false) /* HW was never validated */ | |
| 808 | +#define HAS_RPS(i915) (INTEL_INFO(i915)->has_rps) | |
| 808 | 809 | |
| 809 | −#define HAS_RPS(dev_priv) (INTEL_INFO(dev_priv)->has_rps) | |
| 810 | +#define HAS_HECI_PXP(i915) \ | |
| 811 | + (INTEL_INFO(i915)->has_heci_pxp) | |
| 810 | 812 | |
| 811 | −#define HAS_HECI_PXP(dev_priv) \ | |
| 812 | − (INTEL_INFO(dev_priv)->has_heci_pxp) | |
| 813 | +#define HAS_HECI_GSCFI(i915) \ | |
| 814 | + (INTEL_INFO(i915)->has_heci_gscfi) | |
| 813 | 815 | |
| 814 | −#define HAS_HECI_GSCFI(dev_priv) \ | |
| 815 | − (INTEL_INFO(dev_priv)->has_heci_gscfi) | |
| 816 | +#define HAS_HECI_GSC(i915) (HAS_HECI_PXP(i915) || HAS_HECI_GSCFI(i915)) | |
| 816 | 817 | |
| 817 | −#define HAS_HECI_GSC(dev_priv) (HAS_HECI_PXP(dev_priv) || HAS_HECI_GSCFI(dev_priv)) | |
| 818 | +#define HAS_RUNTIME_PM(i915) (INTEL_INFO(i915)->has_runtime_pm) | |
| 819 | +#define HAS_64BIT_RELOC(i915) (INTEL_INFO(i915)->has_64bit_reloc) | |
| 818 | 820 | |
| 819 | −#define HAS_RUNTIME_PM(dev_priv) (INTEL_INFO(dev_priv)->has_runtime_pm) | |
| 820 | −#define HAS_64BIT_RELOC(dev_priv) (INTEL_INFO(dev_priv)->has_64bit_reloc) | |
| 821 | − | |
| 822 | −#define HAS_OA_BPC_REPORTING(dev_priv) \ | |
| 823 | − (INTEL_INFO(dev_priv)->has_oa_bpc_reporting) | |
| 824 | −#define HAS_OA_SLICE_CONTRIB_LIMITS(dev_priv) \ | |
| 825 | − (INTEL_INFO(dev_priv)->has_oa_slice_contrib_limits) | |
| 826 | −#define HAS_OAM(dev_priv) \ | |
| 827 | − (INTEL_INFO(dev_priv)->has_oam) | |
| 821 | +#define HAS_OA_BPC_REPORTING(i915) \ | |
| 822 | + (INTEL_INFO(i915)->has_oa_bpc_reporting) | |
| 823 | +#define HAS_OA_SLICE_CONTRIB_LIMITS(i915) \ | |
| 824 | + (INTEL_INFO(i915)->has_oa_slice_contrib_limits) | |
| 825 | +#define HAS_OAM(i915) \ | |
| 826 | + (INTEL_INFO(i915)->has_oam) | |
| 828 | 827 | |
| 829 | 828 | /* |
| 830 | 829 | * Set this flag, when platform requires 64K GTT page sizes or larger for |
| 831 | 830 | * device local memory access. |
| 832 | 831 | */ |
| 833 | −#define HAS_64K_PAGES(dev_priv) (INTEL_INFO(dev_priv)->has_64k_pages) | |
| 832 | +#define HAS_64K_PAGES(i915) (INTEL_INFO(i915)->has_64k_pages) | |
| 834 | 833 | |
| 835 | 834 | #define HAS_REGION(i915, i) (RUNTIME_INFO(i915)->memory_regions & (i)) |
| 836 | 835 | #define HAS_LMEM(i915) HAS_REGION(i915, REGION_LMEM) |
| 837 | 836 | |
| 838 | −#define HAS_EXTRA_GT_LIST(dev_priv) (INTEL_INFO(dev_priv)->extra_gt_list) | |
| 837 | +#define HAS_EXTRA_GT_LIST(i915) (INTEL_INFO(i915)->extra_gt_list) | |
| 839 | 838 | |
| 840 | 839 | /* |
| 841 | 840 | * Platform has the dedicated compression control state for each lmem surfaces |
| 842 | 841 | * stored in lmem to support the 3D and media compression formats. |
| 843 | 842 | */ |
| 844 | −#define HAS_FLAT_CCS(dev_priv) (INTEL_INFO(dev_priv)->has_flat_ccs) | |
| 843 | +#define HAS_FLAT_CCS(i915) (INTEL_INFO(i915)->has_flat_ccs) | |
| 845 | 844 | |
| 846 | −#define HAS_GT_UC(dev_priv) (INTEL_INFO(dev_priv)->has_gt_uc) | |
| 845 | +#define HAS_GT_UC(i915) (INTEL_INFO(i915)->has_gt_uc) | |
| 847 | 846 | |
| 848 | −#define HAS_POOLED_EU(dev_priv) (RUNTIME_INFO(dev_priv)->has_pooled_eu) | |
| 847 | +#define HAS_POOLED_EU(i915) (RUNTIME_INFO(i915)->has_pooled_eu) | |
| 849 | 848 | |
| 850 | −#define HAS_GLOBAL_MOCS_REGISTERS(dev_priv) (INTEL_INFO(dev_priv)->has_global_mocs) | |
| 849 | +#define HAS_GLOBAL_MOCS_REGISTERS(i915) (INTEL_INFO(i915)->has_global_mocs) | |
| 851 | 850 | |
| 852 | 851 | #define HAS_GMD_ID(i915) (INTEL_INFO(i915)->has_gmd_id) |
| 853 | 852 | |
| 854 | 853 | #define HAS_L3_CCS_READ(i915) (INTEL_INFO(i915)->has_l3_ccs_read) |
| 855 | 854 | |
| 856 | 855 | /* DPF == dynamic parity feature */ |
| 857 | −#define HAS_L3_DPF(dev_priv) (INTEL_INFO(dev_priv)->has_l3_dpf) | |
| 858 | −#define NUM_L3_SLICES(dev_priv) (IS_HSW_GT3(dev_priv) ? \ | |
| 859 | − 2 : HAS_L3_DPF(dev_priv)) | |
| 856 | +#define HAS_L3_DPF(i915) (INTEL_INFO(i915)->has_l3_dpf) | |
| 857 | +#define NUM_L3_SLICES(i915) (IS_HSW_GT3(i915) ? \ | |
| 858 | + 2 : HAS_L3_DPF(i915)) | |
| 860 | 859 | |
| 861 | 860 | /* Only valid when HAS_DISPLAY() is true */ |
| 862 | −#define INTEL_DISPLAY_ENABLED(dev_priv) \ | |
| 863 | − (drm_WARN_ON(&(dev_priv)->drm, !HAS_DISPLAY(dev_priv)), \ | |
| 864 | − !(dev_priv)->params.disable_display && \ | |
| 865 | − !intel_opregion_headless_sku(dev_priv)) | |
| 861 | +#define INTEL_DISPLAY_ENABLED(i915) \ | |
| 862 | + (drm_WARN_ON(&(i915)->drm, !HAS_DISPLAY(i915)), \ | |
| 863 | + !(i915)->params.disable_display && \ | |
| 864 | + !intel_opregion_headless_sku(i915)) | |
| 866 | 865 | |
| 867 | −#define HAS_GUC_DEPRIVILEGE(dev_priv) \ | |
| 868 | − (INTEL_INFO(dev_priv)->has_guc_deprivilege) | |
| 866 | +#define HAS_GUC_DEPRIVILEGE(i915) \ | |
| 867 | + (INTEL_INFO(i915)->has_guc_deprivilege) | |
| 869 | 868 | |
| 870 | 869 | #define HAS_3D_PIPELINE(i915) (INTEL_INFO(i915)->has_3d_pipeline) |
| 871 | 870 | |
| @@ -420,8 +420,11 @@ i915_gem_gtt_pread(struct drm_i915_gem_object *obj, · 419 unmodified lines | ||
| 420 | 420 | page_length = remain < page_length ? remain : page_length; |
| 421 | 421 | if (drm_mm_node_allocated(&node)) { |
| 422 | 422 | ggtt->vm.insert_page(&ggtt->vm, |
| 423 | − i915_gem_object_get_dma_address(obj, offset >> PAGE_SHIFT), | |
| 424 | − node.start, I915_CACHE_NONE, 0); | |
| 423 | + i915_gem_object_get_dma_address(obj, | |
| 424 | + offset >> PAGE_SHIFT), | |
| 425 | + node.start, | |
| 426 | + i915_gem_get_pat_index(i915, | |
| 427 | + I915_CACHE_NONE), 0); | |
| 425 | 428 | } else { |
| 426 | 429 | page_base += offset & PAGE_MASK; |
| 427 | 430 | } |
| @@ -598,8 +601,11 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_gem_object *obj, · 170 unmodified lines | ||
| 598 | 601 | /* flush the write before we modify the GGTT */ |
| 599 | 602 | intel_gt_flush_ggtt_writes(ggtt->vm.gt); |
| 600 | 603 | ggtt->vm.insert_page(&ggtt->vm, |
| 601 | − i915_gem_object_get_dma_address(obj, offset >> PAGE_SHIFT), | |
| 602 | − node.start, I915_CACHE_NONE, 0); | |
| 604 | + i915_gem_object_get_dma_address(obj, | |
| 605 | + offset >> PAGE_SHIFT), | |
| 606 | + node.start, | |
| 607 | + i915_gem_get_pat_index(i915, | |
| 608 | + I915_CACHE_NONE), 0); | |
| 603 | 609 | wmb(); /* flush modifications to the GGTT (insert_page) */ |
| 604 | 610 | } else { |
| 605 | 611 | page_base += offset & PAGE_MASK; |
| @@ -1142,6 +1148,19 @@ int i915_gem_init(struct drm_i915_private *dev_priv) · 536 unmodified lines | ||
| 1142 | 1148 | unsigned int i; |
| 1143 | 1149 | int ret; |
| 1144 | 1150 | |
| 1151 | + /* | |
| 1152 | + * In the proccess of replacing cache_level with pat_index a tricky | |
| 1153 | + * dependency is created on the definition of the enum i915_cache_level. | |
| 1154 | + * in case this enum is changed, PTE encode would be broken. | |
| 1155 | + * Add a WARNING here. And remove when we completely quit using this | |
| 1156 | + * enum | |
| 1157 | + */ | |
| 1158 | + BUILD_BUG_ON(I915_CACHE_NONE != 0 || | |
| 1159 | + I915_CACHE_LLC != 1 || | |
| 1160 | + I915_CACHE_L3_LLC != 2 || | |
| 1161 | + I915_CACHE_WT != 3 || | |
| 1162 | + I915_MAX_CACHE_LEVEL != 4); | |
| 1163 | + | |
| 1145 | 1164 | /* We need to fallback to 4K pages if host doesn't support huge gtt. */ |
| 1146 | 1165 | if (intel_vgpu_active(dev_priv) && !intel_vgpu_has_huge_gtt(dev_priv)) |
| 1147 | 1166 | RUNTIME_INFO(dev_priv)->page_sizes = I915_GTT_PAGE_SIZE_4K; |
| @@ -5,6 +5,8 @@ · 4 unmodified lines | ||
| 5 | 5 | #include "gem/i915_gem_mman.h" |
| 6 | 6 | #include "gt/intel_engine_user.h" |
| 7 | 7 | |
| 8 | +#include "pxp/intel_pxp.h" | |
| 9 | + | |
| 8 | 10 | #include "i915_cmd_parser.h" |
| 9 | 11 | #include "i915_drv.h" |
| 10 | 12 | #include "i915_getparam.h" |
| @@ -102,6 +104,11 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data, · 91 unmodified lines | ||
| 102 | 104 | if (value < 0) |
| 103 | 105 | return value; |
| 104 | 106 | break; |
| 107 | + case I915_PARAM_PXP_STATUS: | |
| 108 | + value = intel_pxp_get_readiness_status(i915->pxp); | |
| 109 | + if (value < 0) | |
| 110 | + return value; | |
| 111 | + break; | |
| 105 | 112 | case I915_PARAM_MMAP_GTT_VERSION: |
| 106 | 113 | /* Though we've started our numbering from 1, and so class all |
| 107 | 114 | * earlier versions as 0, in effect their value is undefined as |
| @@ -808,10 +808,15 @@ static void err_print_gt_engines(struct drm_i915_error_state_buf *m, · 807 unmodified lines | ||
| 808 | 808 | for (ee = gt->engine; ee; ee = ee->next) { |
| 809 | 809 | const struct i915_vma_coredump *vma; |
| 810 | 810 | |
| 811 | − if (ee->guc_capture_node) | |
| 812 | − intel_guc_capture_print_engine_node(m, ee); | |
| 813 | − else | |
| 811 | + if (gt->uc && gt->uc->guc.is_guc_capture) { | |
| 812 | + if (ee->guc_capture_node) | |
| 813 | + intel_guc_capture_print_engine_node(m, ee); | |
| 814 | + else | |
| 815 | + err_printf(m, " Missing GuC capture node for %s\n", | |
| 816 | + ee->engine->name); | |
| 817 | + } else { | |
| 814 | 818 | error_print_engine(m, ee); |
| 819 | + } | |
| 815 | 820 | |
| 816 | 821 | err_printf(m, " hung: %u\n", ee->hung); |
| 817 | 822 | err_printf(m, " engine reset count: %u\n", ee->reset_count); |
| @@ -1117,10 +1122,14 @@ i915_vma_coredump_create(const struct intel_gt *gt, · 299 unmodified lines | ||
| 1117 | 1122 | mutex_lock(&ggtt->error_mutex); |
| 1118 | 1123 | if (ggtt->vm.raw_insert_page) |
| 1119 | 1124 | ggtt->vm.raw_insert_page(&ggtt->vm, dma, slot, |
| 1120 | − I915_CACHE_NONE, 0); | |
| 1125 | + i915_gem_get_pat_index(gt->i915, | |
| 1126 | + I915_CACHE_NONE), | |
| 1127 | + 0); | |
| 1121 | 1128 | else |
| 1122 | 1129 | ggtt->vm.insert_page(&ggtt->vm, dma, slot, |
| 1123 | − I915_CACHE_NONE, 0); | |
| 1130 | + i915_gem_get_pat_index(gt->i915, | |
| 1131 | + I915_CACHE_NONE), | |
| 1132 | + 0); | |
| 1124 | 1133 | mb(); |
| 1125 | 1134 | |
| 1126 | 1135 | s = io_mapping_map_wc(&ggtt->iomap, slot, PAGE_SIZE); |
| @@ -2162,7 +2171,7 @@ void i915_error_state_store(struct i915_gpu_coredump *error) · 1035 unmodified lines | ||
| 2162 | 2171 | * i915_capture_error_state - capture an error record for later analysis |
| 2163 | 2172 | * @gt: intel_gt which originated the hang |
| 2164 | 2173 | * @engine_mask: hung engines |
| 2165 | − * | |
| 2174 | + * @dump_flags: dump flags | |
| 2166 | 2175 | * |
| 2167 | 2176 | * Should be called when an error is detected (either a hang or an error |
| 2168 | 2177 | * interrupt) to capture error state from the time of the error. Fills |
| @@ -2219,3 +2228,135 @@ void i915_disable_error_state(struct drm_i915_private *i915, int err) · 50 unmodified lines | ||
| 2219 | 2228 | i915->gpu_error.first_error = ERR_PTR(err); |
| 2220 | 2229 | spin_unlock_irq(&i915->gpu_error.lock); |
| 2221 | 2230 | } |
| 2231 | + | |
| 2232 | +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) | |
| 2233 | +void intel_klog_error_capture(struct intel_gt *gt, | |
| 2234 | + intel_engine_mask_t engine_mask) | |
| 2235 | +{ | |
| 2236 | + static int g_count; | |
| 2237 | + struct drm_i915_private *i915 = gt->i915; | |
| 2238 | + struct i915_gpu_coredump *error; | |
| 2239 | + intel_wakeref_t wakeref; | |
| 2240 | + size_t buf_size = PAGE_SIZE * 128; | |
| 2241 | + size_t pos_err; | |
| 2242 | + char *buf, *ptr, *next; | |
| 2243 | + int l_count = g_count++; | |
| 2244 | + int line = 0; | |
| 2245 | + | |
| 2246 | + /* Can't allocate memory during a reset */ | |
| 2247 | + if (test_bit(I915_RESET_BACKOFF, >->reset.flags)) { | |
| 2248 | + drm_err(>->i915->drm, "[Capture/%d.%d] Inside GT reset, skipping error capture :(\n", | |
| 2249 | + l_count, line++); | |
| 2250 | + return; | |
| 2251 | + } | |
| 2252 | + | |
| 2253 | + error = READ_ONCE(i915->gpu_error.first_error); | |
| 2254 | + if (error) { | |
| 2255 | + drm_err(&i915->drm, "[Capture/%d.%d] Clearing existing error capture first...\n", | |
| 2256 | + l_count, line++); | |
| 2257 | + i915_reset_error_state(i915); | |
| 2258 | + } | |
| 2259 | + | |
| 2260 | + with_intel_runtime_pm(&i915->runtime_pm, wakeref) | |
| 2261 | + error = i915_gpu_coredump(gt, engine_mask, CORE_DUMP_FLAG_NONE); | |
| 2262 | + | |
| 2263 | + if (IS_ERR(error)) { | |
| 2264 | + drm_err(&i915->drm, "[Capture/%d.%d] Failed to capture error capture: %ld!\n", | |
| 2265 | + l_count, line++, PTR_ERR(error)); | |
| 2266 | + return; | |
| 2267 | + } | |
| 2268 | + | |
| 2269 | + buf = kvmalloc(buf_size, GFP_KERNEL); | |
| 2270 | + if (!buf) { | |
| 2271 | + drm_err(&i915->drm, "[Capture/%d.%d] Failed to allocate buffer for error capture!\n", | |
| 2272 | + l_count, line++); | |
| 2273 | + i915_gpu_coredump_put(error); | |
| 2274 | + return; | |
| 2275 | + } | |
| 2276 | + | |
| 2277 | + drm_info(&i915->drm, "[Capture/%d.%d] Dumping i915 error capture for %ps...\n", | |
| 2278 | + l_count, line++, __builtin_return_address(0)); | |
| 2279 | + | |
| 2280 | + /* Largest string length safe to print via dmesg */ | |
| 2281 | +# define MAX_CHUNK 800 | |
| 2282 | + | |
| 2283 | + pos_err = 0; | |
| 2284 | + while (1) { | |
| 2285 | + ssize_t got = i915_gpu_coredump_copy_to_buffer(error, buf, pos_err, buf_size - 1); | |
| 2286 | + | |
| 2287 | + if (got <= 0) | |
| 2288 | + break; | |
| 2289 | + | |
| 2290 | + buf[got] = 0; | |
| 2291 | + pos_err += got; | |
| 2292 | + | |
| 2293 | + ptr = buf; | |
| 2294 | + while (got > 0) { | |
| 2295 | + size_t count; | |
| 2296 | + char tag[2]; | |
| 2297 | + | |
| 2298 | + next = strnchr(ptr, got, '\n'); | |
| 2299 | + if (next) { | |
| 2300 | + count = next - ptr; | |
| 2301 | + *next = 0; | |
| 2302 | + tag[0] = '>'; | |
| 2303 | + tag[1] = '<'; | |
| 2304 | + } else { | |
| 2305 | + count = got; | |
| 2306 | + tag[0] = '}'; | |
| 2307 | + tag[1] = '{'; | |
| 2308 | + } | |
| 2309 | + | |
| 2310 | + if (count > MAX_CHUNK) { | |
| 2311 | + size_t pos; | |
| 2312 | + char *ptr2 = ptr; | |
| 2313 | + | |
| 2314 | + for (pos = MAX_CHUNK; pos < count; pos += MAX_CHUNK) { | |
| 2315 | + char chr = ptr[pos]; | |
| 2316 | + | |
| 2317 | + ptr[pos] = 0; | |
| 2318 | + drm_info(&i915->drm, "[Capture/%d.%d] }%s{\n", | |
| 2319 | + l_count, line++, ptr2); | |
| 2320 | + ptr[pos] = chr; | |
| 2321 | + ptr2 = ptr + pos; | |
| 2322 | + | |
| 2323 | + /* | |
| 2324 | + * If spewing large amounts of data via a serial console, | |
| 2325 | + * this can be a very slow process. So be friendly and try | |
| 2326 | + * not to cause 'softlockup on CPU' problems. | |
| 2327 | + */ | |
| 2328 | + cond_resched(); | |
| 2329 | + } | |
| 2330 | + | |
| 2331 | + if (ptr2 < (ptr + count)) | |
| 2332 | + drm_info(&i915->drm, "[Capture/%d.%d] %c%s%c\n", | |
| 2333 | + l_count, line++, tag[0], ptr2, tag[1]); | |
| 2334 | + else if (tag[0] == '>') | |
| 2335 | + drm_info(&i915->drm, "[Capture/%d.%d] ><\n", | |
| 2336 | + l_count, line++); | |
| 2337 | + } else { | |
| 2338 | + drm_info(&i915->drm, "[Capture/%d.%d] %c%s%c\n", | |
| 2339 | + l_count, line++, tag[0], ptr, tag[1]); | |
| 2340 | + } | |
| 2341 | + | |
| 2342 | + ptr = next; | |
| 2343 | + got -= count; | |
| 2344 | + if (next) { | |
| 2345 | + ptr++; | |
| 2346 | + got--; | |
| 2347 | + } | |
| 2348 | + | |
| 2349 | + /* As above. */ | |
| 2350 | + cond_resched(); | |
| 2351 | + } | |
| 2352 | + | |
| 2353 | + if (got) | |
| 2354 | + drm_info(&i915->drm, "[Capture/%d.%d] Got %zd bytes remaining!\n", | |
| 2355 | + l_count, line++, got); | |
| 2356 | + } | |
| 2357 | + | |
| 2358 | + kvfree(buf); | |
| 2359 | + | |
| 2360 | + drm_info(&i915->drm, "[Capture/%d.%d] Dumped %zd bytes\n", l_count, line++, pos_err); | |
| 2361 | +} | |
| 2362 | +#endif | |
| @@ -258,6 +258,16 @@ static inline u32 i915_reset_engine_count(struct i915_gpu_error *error, · 257 unmodified lines | ||
| 258 | 258 | #define CORE_DUMP_FLAG_NONE 0x0 |
| 259 | 259 | #define CORE_DUMP_FLAG_IS_GUC_CAPTURE BIT(0) |
| 260 | 260 | |
| 261 | +#if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) && IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) | |
| 262 | +void intel_klog_error_capture(struct intel_gt *gt, | |
| 263 | + intel_engine_mask_t engine_mask); | |
| 264 | +#else | |
| 265 | +static inline void intel_klog_error_capture(struct intel_gt *gt, | |
| 266 | + intel_engine_mask_t engine_mask) | |
| 267 | +{ | |
| 268 | +} | |
| 269 | +#endif | |
| 270 | + | |
| 261 | 271 | #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) |
| 262 | 272 | |
| 263 | 273 | __printf(2, 3) |
| @@ -50,6 +50,8 @@ struct hwm_drvdata { · 49 unmodified lines | ||
| 50 | 50 | struct hwm_energy_info ei; /* Energy info for energy1_input */ |
| 51 | 51 | char name[12]; |
| 52 | 52 | int gt_n; |
| 53 | + bool reset_in_progress; | |
| 54 | + wait_queue_head_t waitq; | |
| 53 | 55 | }; |
| 54 | 56 | |
| 55 | 57 | struct i915_hwmon { |
| @@ -396,31 +398,56 @@ hwm_power_max_write(struct hwm_drvdata *ddat, long val) · 340 unmodified lines | ||
| 396 | 398 | { |
| 397 | 399 | struct i915_hwmon *hwmon = ddat->hwmon; |
| 398 | 400 | intel_wakeref_t wakeref; |
| 401 | + DEFINE_WAIT(wait); | |
| 402 | + int ret = 0; | |
| 399 | 403 | u32 nval; |
| 400 | 404 | |
| 401 | − /* Disable PL1 limit and verify, because the limit cannot be disabled on all platforms */ | |
| 402 | − if (val == PL1_DISABLE) { | |
| 405 | + /* Block waiting for GuC reset to complete when needed */ | |
| 406 | + for (;;) { | |
| 403 | 407 | mutex_lock(&hwmon->hwmon_lock); |
| 404 | − with_intel_runtime_pm(ddat->uncore->rpm, wakeref) { | |
| 405 | − intel_uncore_rmw(ddat->uncore, hwmon->rg.pkg_rapl_limit, | |
| 406 | − PKG_PWR_LIM_1_EN, 0); | |
| 407 | − nval = intel_uncore_read(ddat->uncore, hwmon->rg.pkg_rapl_limit); | |
| 408 | + | |
| 409 | + prepare_to_wait(&ddat->waitq, &wait, TASK_INTERRUPTIBLE); | |
| 410 | + | |
| 411 | + if (!hwmon->ddat.reset_in_progress) | |
| 412 | + break; | |
| 413 | + | |
| 414 | + if (signal_pending(current)) { | |
| 415 | + ret = -EINTR; | |
| 416 | + break; | |
| 408 | 417 | } |
| 418 | + | |
| 409 | 419 | mutex_unlock(&hwmon->hwmon_lock); |
| 410 | 420 | |
| 421 | + schedule(); | |
| 422 | + } | |
| 423 | + finish_wait(&ddat->waitq, &wait); | |
| 424 | + if (ret) | |
| 425 | + goto unlock; | |
| 426 | + | |
| 427 | + wakeref = intel_runtime_pm_get(ddat->uncore->rpm); | |
| 428 | + | |
| 429 | + /* Disable PL1 limit and verify, because the limit cannot be disabled on all platforms */ | |
| 430 | + if (val == PL1_DISABLE) { | |
| 431 | + intel_uncore_rmw(ddat->uncore, hwmon->rg.pkg_rapl_limit, | |
| 432 | + PKG_PWR_LIM_1_EN, 0); | |
| 433 | + nval = intel_uncore_read(ddat->uncore, hwmon->rg.pkg_rapl_limit); | |
| 434 | + | |
| 411 | 435 | if (nval & PKG_PWR_LIM_1_EN) |
| 412 | − return -ENODEV; | |
| 413 | − return 0; | |
| 436 | + ret = -ENODEV; | |
| 437 | + goto exit; | |
| 414 | 438 | } |
| 415 | 439 | |
| 416 | 440 | /* Computation in 64-bits to avoid overflow. Round to nearest. */ |
| 417 | 441 | nval = DIV_ROUND_CLOSEST_ULL((u64)val << hwmon->scl_shift_power, SF_POWER); |
| 418 | 442 | nval = PKG_PWR_LIM_1_EN | REG_FIELD_PREP(PKG_PWR_LIM_1, nval); |
| 419 | 443 | |
| 420 | − hwm_locked_with_pm_intel_uncore_rmw(ddat, hwmon->rg.pkg_rapl_limit, | |
| 421 | − PKG_PWR_LIM_1_EN | PKG_PWR_LIM_1, | |
| 422 | − nval); | |
| 423 | − return 0; | |
| 444 | + intel_uncore_rmw(ddat->uncore, hwmon->rg.pkg_rapl_limit, | |
| 445 | + PKG_PWR_LIM_1_EN | PKG_PWR_LIM_1, nval); | |
| 446 | +exit: | |
| 447 | + intel_runtime_pm_put(ddat->uncore->rpm, wakeref); | |
| 448 | +unlock: | |
| 449 | + mutex_unlock(&hwmon->hwmon_lock); | |
| 450 | + return ret; | |
| 424 | 451 | } |
| 425 | 452 | |
| 426 | 453 | static int |
| @@ -470,6 +497,41 @@ hwm_power_write(struct hwm_drvdata *ddat, u32 attr, int chan, long val) · 43 unmodified lines | ||
| 470 | 497 | } |
| 471 | 498 | } |
| 472 | 499 | |
| 500 | +void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old) | |
| 501 | +{ | |
| 502 | + struct i915_hwmon *hwmon = i915->hwmon; | |
| 503 | + u32 r; | |
| 504 | + | |
| 505 | + if (!hwmon || !i915_mmio_reg_valid(hwmon->rg.pkg_rapl_limit)) | |
| 506 | + return; | |
| 507 | + | |
| 508 | + mutex_lock(&hwmon->hwmon_lock); | |
| 509 | + | |
| 510 | + hwmon->ddat.reset_in_progress = true; | |
| 511 | + r = intel_uncore_rmw(hwmon->ddat.uncore, hwmon->rg.pkg_rapl_limit, | |
| 512 | + PKG_PWR_LIM_1_EN, 0); | |
| 513 | + *old = !!(r & PKG_PWR_LIM_1_EN); | |
| 514 | + | |
| 515 | + mutex_unlock(&hwmon->hwmon_lock); | |
| 516 | +} | |
| 517 | + | |
| 518 | +void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old) | |
| 519 | +{ | |
| 520 | + struct i915_hwmon *hwmon = i915->hwmon; | |
| 521 | + | |
| 522 | + if (!hwmon || !i915_mmio_reg_valid(hwmon->rg.pkg_rapl_limit)) | |
| 523 | + return; | |
| 524 | + | |
| 525 | + mutex_lock(&hwmon->hwmon_lock); | |
| 526 | + | |
| 527 | + intel_uncore_rmw(hwmon->ddat.uncore, hwmon->rg.pkg_rapl_limit, | |
| 528 | + PKG_PWR_LIM_1_EN, old ? PKG_PWR_LIM_1_EN : 0); | |
| 529 | + hwmon->ddat.reset_in_progress = false; | |
| 530 | + wake_up_all(&hwmon->ddat.waitq); | |
| 531 | + | |
| 532 | + mutex_unlock(&hwmon->hwmon_lock); | |
| 533 | +} | |
| 534 | + | |
| 473 | 535 | static umode_t |
| 474 | 536 | hwm_energy_is_visible(const struct hwm_drvdata *ddat, u32 attr) |
| 475 | 537 | { |
| @@ -742,6 +804,7 @@ void i915_hwmon_register(struct drm_i915_private *i915) · 266 unmodified lines | ||
| 742 | 804 | ddat->uncore = &i915->uncore; |
| 743 | 805 | snprintf(ddat->name, sizeof(ddat->name), "i915"); |
| 744 | 806 | ddat->gt_n = -1; |
| 807 | + init_waitqueue_head(&ddat->waitq); | |
| 745 | 808 | |
| 746 | 809 | for_each_gt(gt, i915, i) { |
| 747 | 810 | ddat_gt = hwmon->ddat_gt + i; |
| @@ -7,14 +7,21 @@ · 6 unmodified lines | ||
| 7 | 7 | #ifndef __I915_HWMON_H__ |
| 8 | 8 | #define __I915_HWMON_H__ |
| 9 | 9 | |
| 10 | +#include <linux/types.h> | |
| 11 | + | |
| 10 | 12 | struct drm_i915_private; |
| 13 | +struct intel_gt; | |
| 11 | 14 | |
| 12 | 15 | #if IS_REACHABLE(CONFIG_HWMON) |
| 13 | 16 | void i915_hwmon_register(struct drm_i915_private *i915); |
| 14 | 17 | void i915_hwmon_unregister(struct drm_i915_private *i915); |
| 18 | +void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old); | |
| 19 | +void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old); | |
| 15 | 20 | #else |
| 16 | 21 | static inline void i915_hwmon_register(struct drm_i915_private *i915) { }; |
| 17 | 22 | static inline void i915_hwmon_unregister(struct drm_i915_private *i915) { }; |
| 23 | +static inline void i915_hwmon_power_max_disable(struct drm_i915_private *i915, bool *old) { }; | |
| 24 | +static inline void i915_hwmon_power_max_restore(struct drm_i915_private *i915, bool old) { }; | |
| 18 | 25 | #endif |
| 19 | 26 | |
| 20 | 27 | #endif /* __I915_HWMON_H__ */ |
| @@ -738,12 +738,15 @@ static void gen11_irq_reset(struct drm_i915_private *dev_priv) · 737 unmodified lines | ||
| 738 | 738 | |
| 739 | 739 | static void dg1_irq_reset(struct drm_i915_private *dev_priv) |
| 740 | 740 | { |
| 741 | − struct intel_gt *gt = to_gt(dev_priv); | |
| 742 | − struct intel_uncore *uncore = gt->uncore; | |
| 741 | + struct intel_uncore *uncore = &dev_priv->uncore; | |
| 742 | + struct intel_gt *gt; | |
| 743 | + unsigned int i; | |
| 743 | 744 | |
| 744 | 745 | dg1_master_intr_disable(dev_priv->uncore.regs); |
| 745 | 746 | |
| 746 | − gen11_gt_irq_reset(gt); | |
| 747 | + for_each_gt(gt, dev_priv, i) | |
| 748 | + gen11_gt_irq_reset(gt); | |
| 749 | + | |
| 747 | 750 | gen11_display_irq_reset(dev_priv); |
| 748 | 751 | |
| 749 | 752 | GEN3_IRQ_RESET(uncore, GEN11_GU_MISC_); |
| @@ -856,11 +859,13 @@ static void gen11_irq_postinstall(struct drm_i915_private *dev_priv) · 106 unmodified lines | ||
| 856 | 859 | |
| 857 | 860 | static void dg1_irq_postinstall(struct drm_i915_private *dev_priv) |
| 858 | 861 | { |
| 859 | − struct intel_gt *gt = to_gt(dev_priv); | |
| 860 | − struct intel_uncore *uncore = gt->uncore; | |
| 862 | + struct intel_uncore *uncore = &dev_priv->uncore; | |
| 861 | 863 | u32 gu_misc_masked = GEN11_GU_MISC_GSE; |
| 864 | + struct intel_gt *gt; | |
| 865 | + unsigned int i; | |
| 862 | 866 | |
| 863 | − gen11_gt_irq_postinstall(gt); | |
| 867 | + for_each_gt(gt, dev_priv, i) | |
| 868 | + gen11_gt_irq_postinstall(gt); | |
| 864 | 869 | |
| 865 | 870 | GEN3_IRQ_INIT(uncore, GEN11_GU_MISC_, ~gu_misc_masked, gu_misc_masked); |
| 866 | 871 | |
| @@ -30,6 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "display/intel_display_driver.h" |
| 31 | 31 | #include "gt/intel_gt_regs.h" |
| 32 | 32 | #include "gt/intel_sa_media.h" |
| 33 | +#include "gem/i915_gem_object_types.h" | |
| 33 | 34 | |
| 34 | 35 | #include "i915_driver.h" |
| 35 | 36 | #include "i915_drv.h" |
| @@ -42,6 +43,38 @@ · 6 unmodified lines | ||
| 42 | 43 | .__runtime.graphics.ip.ver = (x), \ |
| 43 | 44 | .__runtime.media.ip.ver = (x) |
| 44 | 45 | |
| 46 | +#define LEGACY_CACHELEVEL \ | |
| 47 | + .cachelevel_to_pat = { \ | |
| 48 | + [I915_CACHE_NONE] = 0, \ | |
| 49 | + [I915_CACHE_LLC] = 1, \ | |
| 50 | + [I915_CACHE_L3_LLC] = 2, \ | |
| 51 | + [I915_CACHE_WT] = 3, \ | |
| 52 | + } | |
| 53 | + | |
| 54 | +#define TGL_CACHELEVEL \ | |
| 55 | + .cachelevel_to_pat = { \ | |
| 56 | + [I915_CACHE_NONE] = 3, \ | |
| 57 | + [I915_CACHE_LLC] = 0, \ | |
| 58 | + [I915_CACHE_L3_LLC] = 0, \ | |
| 59 | + [I915_CACHE_WT] = 2, \ | |
| 60 | + } | |
| 61 | + | |
| 62 | +#define PVC_CACHELEVEL \ | |
| 63 | + .cachelevel_to_pat = { \ | |
| 64 | + [I915_CACHE_NONE] = 0, \ | |
| 65 | + [I915_CACHE_LLC] = 3, \ | |
| 66 | + [I915_CACHE_L3_LLC] = 3, \ | |
| 67 | + [I915_CACHE_WT] = 2, \ | |
| 68 | + } | |
| 69 | + | |
| 70 | +#define MTL_CACHELEVEL \ | |
| 71 | + .cachelevel_to_pat = { \ | |
| 72 | + [I915_CACHE_NONE] = 2, \ | |
| 73 | + [I915_CACHE_LLC] = 3, \ | |
| 74 | + [I915_CACHE_L3_LLC] = 3, \ | |
| 75 | + [I915_CACHE_WT] = 1, \ | |
| 76 | + } | |
| 77 | + | |
| 45 | 78 | /* Keep in gen based order, and chronological order within a gen */ |
| 46 | 79 | |
| 47 | 80 | #define GEN_DEFAULT_PAGE_SIZES \ |
| @@ -61,8 +94,10 @@ · 13 unmodified lines | ||
| 61 | 94 | .has_snoop = true, \ |
| 62 | 95 | .has_coherent_ggtt = false, \ |
| 63 | 96 | .dma_mask_size = 32, \ |
| 97 | + .max_pat_index = 3, \ | |
| 64 | 98 | GEN_DEFAULT_PAGE_SIZES, \ |
| 65 | − GEN_DEFAULT_REGIONS | |
| 99 | + GEN_DEFAULT_REGIONS, \ | |
| 100 | + LEGACY_CACHELEVEL | |
| 66 | 101 | |
| 67 | 102 | #define I845_FEATURES \ |
| 68 | 103 | GEN(2), \ |
| @@ -74,8 +109,10 @@ · 5 unmodified lines | ||
| 74 | 109 | .has_snoop = true, \ |
| 75 | 110 | .has_coherent_ggtt = false, \ |
| 76 | 111 | .dma_mask_size = 32, \ |
| 112 | + .max_pat_index = 3, \ | |
| 77 | 113 | GEN_DEFAULT_PAGE_SIZES, \ |
| 78 | − GEN_DEFAULT_REGIONS | |
| 114 | + GEN_DEFAULT_REGIONS, \ | |
| 115 | + LEGACY_CACHELEVEL | |
| 79 | 116 | |
| 80 | 117 | static const struct intel_device_info i830_info = { |
| 81 | 118 | I830_FEATURES, |
| @@ -105,8 +142,10 @@ static const struct intel_device_info i865g_info = { · 23 unmodified lines | ||
| 105 | 142 | .has_snoop = true, \ |
| 106 | 143 | .has_coherent_ggtt = true, \ |
| 107 | 144 | .dma_mask_size = 32, \ |
| 145 | + .max_pat_index = 3, \ | |
| 108 | 146 | GEN_DEFAULT_PAGE_SIZES, \ |
| 109 | − GEN_DEFAULT_REGIONS | |
| 147 | + GEN_DEFAULT_REGIONS, \ | |
| 148 | + LEGACY_CACHELEVEL | |
| 110 | 149 | |
| 111 | 150 | static const struct intel_device_info i915g_info = { |
| 112 | 151 | GEN3_FEATURES, |
| @@ -166,8 +205,10 @@ static const struct intel_device_info pnv_m_info = { · 53 unmodified lines | ||
| 166 | 205 | .has_snoop = true, \ |
| 167 | 206 | .has_coherent_ggtt = true, \ |
| 168 | 207 | .dma_mask_size = 36, \ |
| 208 | + .max_pat_index = 3, \ | |
| 169 | 209 | GEN_DEFAULT_PAGE_SIZES, \ |
| 170 | − GEN_DEFAULT_REGIONS | |
| 210 | + GEN_DEFAULT_REGIONS, \ | |
| 211 | + LEGACY_CACHELEVEL | |
| 171 | 212 | |
| 172 | 213 | static const struct intel_device_info i965g_info = { |
| 173 | 214 | GEN4_FEATURES, |
| @@ -208,8 +249,10 @@ static const struct intel_device_info gm45_info = { · 34 unmodified lines | ||
| 208 | 249 | /* ilk does support rc6, but we do not implement [power] contexts */ \ |
| 209 | 250 | .has_rc6 = 0, \ |
| 210 | 251 | .dma_mask_size = 36, \ |
| 252 | + .max_pat_index = 3, \ | |
| 211 | 253 | GEN_DEFAULT_PAGE_SIZES, \ |
| 212 | − GEN_DEFAULT_REGIONS | |
| 254 | + GEN_DEFAULT_REGIONS, \ | |
| 255 | + LEGACY_CACHELEVEL | |
| 213 | 256 | |
| 214 | 257 | static const struct intel_device_info ilk_d_info = { |
| 215 | 258 | GEN5_FEATURES, |
| @@ -234,10 +277,12 @@ static const struct intel_device_info ilk_m_info = { · 18 unmodified lines | ||
| 234 | 277 | .has_rc6p = 0, \ |
| 235 | 278 | .has_rps = true, \ |
| 236 | 279 | .dma_mask_size = 40, \ |
| 280 | + .max_pat_index = 3, \ | |
| 237 | 281 | .__runtime.ppgtt_type = INTEL_PPGTT_ALIASING, \ |
| 238 | 282 | .__runtime.ppgtt_size = 31, \ |
| 239 | 283 | GEN_DEFAULT_PAGE_SIZES, \ |
| 240 | − GEN_DEFAULT_REGIONS | |
| 284 | + GEN_DEFAULT_REGIONS, \ | |
| 285 | + LEGACY_CACHELEVEL | |
| 241 | 286 | |
| 242 | 287 | #define SNB_D_PLATFORM \ |
| 243 | 288 | GEN6_FEATURES, \ |
| @@ -280,10 +325,12 @@ static const struct intel_device_info snb_m_gt2_info = { · 36 unmodified lines | ||
| 280 | 325 | .has_reset_engine = true, \ |
| 281 | 326 | .has_rps = true, \ |
| 282 | 327 | .dma_mask_size = 40, \ |
| 328 | + .max_pat_index = 3, \ | |
| 283 | 329 | .__runtime.ppgtt_type = INTEL_PPGTT_ALIASING, \ |
| 284 | 330 | .__runtime.ppgtt_size = 31, \ |
| 285 | 331 | GEN_DEFAULT_PAGE_SIZES, \ |
| 286 | − GEN_DEFAULT_REGIONS | |
| 332 | + GEN_DEFAULT_REGIONS, \ | |
| 333 | + LEGACY_CACHELEVEL | |
| 287 | 334 | |
| 288 | 335 | #define IVB_D_PLATFORM \ |
| 289 | 336 | GEN7_FEATURES, \ |
| @@ -332,6 +379,7 @@ static const struct intel_device_info vlv_info = { · 42 unmodified lines | ||
| 332 | 379 | .has_reset_engine = true, |
| 333 | 380 | .has_rps = true, |
| 334 | 381 | .dma_mask_size = 40, |
| 382 | + .max_pat_index = 3, | |
| 335 | 383 | .__runtime.ppgtt_type = INTEL_PPGTT_ALIASING, |
| 336 | 384 | .__runtime.ppgtt_size = 31, |
| 337 | 385 | .has_snoop = true, |
| @@ -339,6 +387,7 @@ static const struct intel_device_info vlv_info = { · 1 unmodified line | ||
| 339 | 387 | .__runtime.platform_engine_mask = BIT(RCS0) | BIT(VCS0) | BIT(BCS0), |
| 340 | 388 | GEN_DEFAULT_PAGE_SIZES, |
| 341 | 389 | GEN_DEFAULT_REGIONS, |
| 390 | + LEGACY_CACHELEVEL, | |
| 342 | 391 | }; |
| 343 | 392 | |
| 344 | 393 | #define G75_FEATURES \ |
| @@ -416,6 +465,7 @@ static const struct intel_device_info chv_info = { · 71 unmodified lines | ||
| 416 | 465 | .has_rps = true, |
| 417 | 466 | .has_logical_ring_contexts = 1, |
| 418 | 467 | .dma_mask_size = 39, |
| 468 | + .max_pat_index = 3, | |
| 419 | 469 | .__runtime.ppgtt_type = INTEL_PPGTT_FULL, |
| 420 | 470 | .__runtime.ppgtt_size = 32, |
| 421 | 471 | .has_reset_engine = 1, |
| @@ -423,6 +473,7 @@ static const struct intel_device_info chv_info = { · 1 unmodified line | ||
| 423 | 473 | .has_coherent_ggtt = false, |
| 424 | 474 | GEN_DEFAULT_PAGE_SIZES, |
| 425 | 475 | GEN_DEFAULT_REGIONS, |
| 476 | + LEGACY_CACHELEVEL, | |
| 426 | 477 | }; |
| 427 | 478 | |
| 428 | 479 | #define GEN9_DEFAULT_PAGE_SIZES \ |
| @@ -482,8 +533,10 @@ static const struct intel_device_info skl_gt4_info = { · 53 unmodified lines | ||
| 482 | 533 | .has_reset_engine = 1, \ |
| 483 | 534 | .has_snoop = true, \ |
| 484 | 535 | .has_coherent_ggtt = false, \ |
| 536 | + .max_pat_index = 3, \ | |
| 485 | 537 | GEN9_DEFAULT_PAGE_SIZES, \ |
| 486 | − GEN_DEFAULT_REGIONS | |
| 538 | + GEN_DEFAULT_REGIONS, \ | |
| 539 | + LEGACY_CACHELEVEL | |
| 487 | 540 | |
| 488 | 541 | static const struct intel_device_info bxt_info = { |
| 489 | 542 | GEN9_LP_FEATURES, |
| @@ -587,8 +640,10 @@ static const struct intel_device_info jsl_info = { · 97 unmodified lines | ||
| 587 | 640 | #define GEN12_FEATURES \ |
| 588 | 641 | GEN11_FEATURES, \ |
| 589 | 642 | GEN(12), \ |
| 643 | + TGL_CACHELEVEL, \ | |
| 590 | 644 | .has_global_mocs = 1, \ |
| 591 | − .has_pxp = 1 | |
| 645 | + .has_pxp = 1, \ | |
| 646 | + .max_pat_index = 3 | |
| 592 | 647 | |
| 593 | 648 | static const struct intel_device_info tgl_info = { |
| 594 | 649 | GEN12_FEATURES, |
| @@ -653,6 +708,7 @@ static const struct intel_device_info adl_p_info = { · 58 unmodified lines | ||
| 653 | 708 | .__runtime.graphics.ip.ver = 12, \ |
| 654 | 709 | .__runtime.graphics.ip.rel = 50, \ |
| 655 | 710 | XE_HP_PAGE_SIZES, \ |
| 711 | + TGL_CACHELEVEL, \ | |
| 656 | 712 | .dma_mask_size = 46, \ |
| 657 | 713 | .has_3d_pipeline = 1, \ |
| 658 | 714 | .has_64bit_reloc = 1, \ |
| @@ -671,6 +727,7 @@ static const struct intel_device_info adl_p_info = { · 12 unmodified lines | ||
| 671 | 727 | .has_reset_engine = 1, \ |
| 672 | 728 | .has_rps = 1, \ |
| 673 | 729 | .has_runtime_pm = 1, \ |
| 730 | + .max_pat_index = 3, \ | |
| 674 | 731 | .__runtime.ppgtt_size = 48, \ |
| 675 | 732 | .__runtime.ppgtt_type = INTEL_PPGTT_FULL |
| 676 | 733 | |
| @@ -740,11 +797,13 @@ static const struct intel_device_info pvc_info = { · 63 unmodified lines | ||
| 740 | 797 | .__runtime.media.ip.rel = 60, |
| 741 | 798 | PLATFORM(INTEL_PONTEVECCHIO), |
| 742 | 799 | .has_flat_ccs = 0, |
| 800 | + .max_pat_index = 7, | |
| 743 | 801 | .__runtime.platform_engine_mask = |
| 744 | 802 | BIT(BCS0) | |
| 745 | 803 | BIT(VCS0) | |
| 746 | 804 | BIT(CCS0) | BIT(CCS1) | BIT(CCS2) | BIT(CCS3), |
| 747 | 805 | .require_force_probe = 1, |
| 806 | + PVC_CACHELEVEL, | |
| 748 | 807 | }; |
| 749 | 808 | |
| 750 | 809 | static const struct intel_gt_definition xelpmp_extra_gt[] = { |
| @@ -774,9 +833,12 @@ static const struct intel_device_info mtl_info = { · 23 unmodified lines | ||
| 774 | 833 | .has_llc = 0, |
| 775 | 834 | .has_mslice_steering = 0, |
| 776 | 835 | .has_snoop = 1, |
| 836 | + .max_pat_index = 4, | |
| 837 | + .has_pxp = 1, | |
| 777 | 838 | .__runtime.memory_regions = REGION_SMEM | REGION_STOLEN_LMEM, |
| 778 | 839 | .__runtime.platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(CCS0), |
| 779 | 840 | .require_force_probe = 1, |
| 841 | + MTL_CACHELEVEL, | |
| 780 | 842 | }; |
| 781 | 843 | |
| 782 | 844 | #undef PLATFORM |
| @@ -5300,6 +5300,7 @@ void i915_perf_fini(struct drm_i915_private *i915) · 5299 unmodified lines | ||
| 5300 | 5300 | |
| 5301 | 5301 | /** |
| 5302 | 5302 | * i915_perf_ioctl_version - Version of the i915-perf subsystem |
| 5303 | + * @i915: The i915 device | |
| 5303 | 5304 | * |
| 5304 | 5305 | * This version number is used by userspace to detect available features. |
| 5305 | 5306 | */ |
| @@ -134,10 +134,6 @@ · 133 unmodified lines | ||
| 134 | 134 | #define GDT_CHICKEN_BITS _MMIO(0x9840) |
| 135 | 135 | #define GT_NOA_ENABLE 0x00000080 |
| 136 | 136 | |
| 137 | −#define GEN12_SQCNT1 _MMIO(0x8718) | |
| 138 | −#define GEN12_SQCNT1_PMON_ENABLE REG_BIT(30) | |
| 139 | −#define GEN12_SQCNT1_OABPC REG_BIT(29) | |
| 140 | − | |
| 141 | 137 | /* Gen12 OAM unit */ |
| 142 | 138 | #define GEN12_OAM_HEAD_POINTER_OFFSET (0x1a0) |
| 143 | 139 | #define GEN12_OAM_HEAD_POINTER_MASK 0xffffffc0 |
| @@ -10,6 +10,7 @@ · 9 unmodified lines | ||
| 10 | 10 | #include "gt/intel_engine_pm.h" |
| 11 | 11 | #include "gt/intel_engine_regs.h" |
| 12 | 12 | #include "gt/intel_engine_user.h" |
| 13 | +#include "gt/intel_gt.h" | |
| 13 | 14 | #include "gt/intel_gt_pm.h" |
| 14 | 15 | #include "gt/intel_gt_regs.h" |
| 15 | 16 | #include "gt/intel_rc6.h" |
| @@ -50,16 +51,26 @@ static u8 engine_event_instance(struct perf_event *event) · 34 unmodified lines | ||
| 50 | 51 | return (event->attr.config >> I915_PMU_SAMPLE_BITS) & 0xff; |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | −static bool is_engine_config(u64 config) | |
| 54 | +static bool is_engine_config(const u64 config) | |
| 54 | 55 | { |
| 55 | 56 | return config < __I915_PMU_OTHER(0); |
| 56 | 57 | } |
| 57 | 58 | |
| 59 | +static unsigned int config_gt_id(const u64 config) | |
| 60 | +{ | |
| 61 | + return config >> __I915_PMU_GT_SHIFT; | |
| 62 | +} | |
| 63 | + | |
| 64 | +static u64 config_counter(const u64 config) | |
| 65 | +{ | |
| 66 | + return config & ~(~0ULL << __I915_PMU_GT_SHIFT); | |
| 67 | +} | |
| 68 | + | |
| 58 | 69 | static unsigned int other_bit(const u64 config) |
| 59 | 70 | { |
| 60 | 71 | unsigned int val; |
| 61 | 72 | |
| 62 | − switch (config) { | |
| 73 | + switch (config_counter(config)) { | |
| 63 | 74 | case I915_PMU_ACTUAL_FREQUENCY: |
| 64 | 75 | val = __I915_PMU_ACTUAL_FREQUENCY_ENABLED; |
| 65 | 76 | break; |
| @@ -77,7 +88,9 @@ static unsigned int other_bit(const u64 config) · 11 unmodified lines | ||
| 77 | 88 | return -1; |
| 78 | 89 | } |
| 79 | 90 | |
| 80 | − return I915_ENGINE_SAMPLE_COUNT + val; | |
| 91 | + return I915_ENGINE_SAMPLE_COUNT + | |
| 92 | + config_gt_id(config) * __I915_PMU_TRACKED_EVENT_COUNT + | |
| 93 | + val; | |
| 81 | 94 | } |
| 82 | 95 | |
| 83 | 96 | static unsigned int config_bit(const u64 config) |
| @@ -88,9 +101,20 @@ static unsigned int config_bit(const u64 config) · 4 unmodified lines | ||
| 88 | 101 | return other_bit(config); |
| 89 | 102 | } |
| 90 | 103 | |
| 91 | −static u64 config_mask(u64 config) | |
| 104 | +static u32 config_mask(const u64 config) | |
| 92 | 105 | { |
| 93 | − return BIT_ULL(config_bit(config)); | |
| 106 | + unsigned int bit = config_bit(config); | |
| 107 | + | |
| 108 | + if (__builtin_constant_p(config)) | |
| 109 | + BUILD_BUG_ON(bit > | |
| 110 | + BITS_PER_TYPE(typeof_member(struct i915_pmu, | |
| 111 | + enable)) - 1); | |
| 112 | + else | |
| 113 | + WARN_ON_ONCE(bit > | |
| 114 | + BITS_PER_TYPE(typeof_member(struct i915_pmu, | |
| 115 | + enable)) - 1); | |
| 116 | + | |
| 117 | + return BIT(config_bit(config)); | |
| 94 | 118 | } |
| 95 | 119 | |
| 96 | 120 | static bool is_engine_event(struct perf_event *event) |
| @@ -103,6 +127,18 @@ static unsigned int event_bit(struct perf_event *event) · 6 unmodified lines | ||
| 103 | 127 | return config_bit(event->attr.config); |
| 104 | 128 | } |
| 105 | 129 | |
| 130 | +static u32 frequency_enabled_mask(void) | |
| 131 | +{ | |
| 132 | + unsigned int i; | |
| 133 | + u32 mask = 0; | |
| 134 | + | |
| 135 | + for (i = 0; i < I915_PMU_MAX_GTS; i++) | |
| 136 | + mask |= config_mask(__I915_PMU_ACTUAL_FREQUENCY(i)) | | |
| 137 | + config_mask(__I915_PMU_REQUESTED_FREQUENCY(i)); | |
| 138 | + | |
| 139 | + return mask; | |
| 140 | +} | |
| 141 | + | |
| 106 | 142 | static bool pmu_needs_timer(struct i915_pmu *pmu, bool gpu_active) |
| 107 | 143 | { |
| 108 | 144 | struct drm_i915_private *i915 = container_of(pmu, typeof(*i915), pmu); |
| @@ -119,9 +155,7 @@ static bool pmu_needs_timer(struct i915_pmu *pmu, bool gpu_active) · 10 unmodified lines | ||
| 119 | 155 | * Mask out all the ones which do not need the timer, or in |
| 120 | 156 | * other words keep all the ones that could need the timer. |
| 121 | 157 | */ |
| 122 | − enable &= config_mask(I915_PMU_ACTUAL_FREQUENCY) | | |
| 123 | − config_mask(I915_PMU_REQUESTED_FREQUENCY) | | |
| 124 | − ENGINE_SAMPLE_MASK; | |
| 158 | + enable &= frequency_enabled_mask() | ENGINE_SAMPLE_MASK; | |
| 125 | 159 | |
| 126 | 160 | /* |
| 127 | 161 | * When the GPU is idle per-engine counters do not need to be |
| @@ -163,9 +197,37 @@ static inline s64 ktime_since_raw(const ktime_t kt) · 35 unmodified lines | ||
| 163 | 197 | return ktime_to_ns(ktime_sub(ktime_get_raw(), kt)); |
| 164 | 198 | } |
| 165 | 199 | |
| 200 | +static unsigned int | |
| 201 | +__sample_idx(struct i915_pmu *pmu, unsigned int gt_id, int sample) | |
| 202 | +{ | |
| 203 | + unsigned int idx = gt_id * __I915_NUM_PMU_SAMPLERS + sample; | |
| 204 | + | |
| 205 | + GEM_BUG_ON(idx >= ARRAY_SIZE(pmu->sample)); | |
| 206 | + | |
| 207 | + return idx; | |
| 208 | +} | |
| 209 | + | |
| 210 | +static u64 read_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample) | |
| 211 | +{ | |
| 212 | + return pmu->sample[__sample_idx(pmu, gt_id, sample)].cur; | |
| 213 | +} | |
| 214 | + | |
| 215 | +static void | |
| 216 | +store_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample, u64 val) | |
| 217 | +{ | |
| 218 | + pmu->sample[__sample_idx(pmu, gt_id, sample)].cur = val; | |
| 219 | +} | |
| 220 | + | |
| 221 | +static void | |
| 222 | +add_sample_mult(struct i915_pmu *pmu, unsigned int gt_id, int sample, u32 val, u32 mul) | |
| 223 | +{ | |
| 224 | + pmu->sample[__sample_idx(pmu, gt_id, sample)].cur += mul_u32_u32(val, mul); | |
| 225 | +} | |
| 226 | + | |
| 166 | 227 | static u64 get_rc6(struct intel_gt *gt) |
| 167 | 228 | { |
| 168 | 229 | struct drm_i915_private *i915 = gt->i915; |
| 230 | + const unsigned int gt_id = gt->info.id; | |
| 169 | 231 | struct i915_pmu *pmu = &i915->pmu; |
| 170 | 232 | unsigned long flags; |
| 171 | 233 | bool awake = false; |
| @@ -180,7 +242,7 @@ static u64 get_rc6(struct intel_gt *gt) · 8 unmodified lines | ||
| 180 | 242 | spin_lock_irqsave(&pmu->lock, flags); |
| 181 | 243 | |
| 182 | 244 | if (awake) { |
| 183 | − pmu->sample[__I915_SAMPLE_RC6].cur = val; | |
| 245 | + store_sample(pmu, gt_id, __I915_SAMPLE_RC6, val); | |
| 184 | 246 | } else { |
| 185 | 247 | /* |
| 186 | 248 | * We think we are runtime suspended. |
| @@ -189,14 +251,14 @@ static u64 get_rc6(struct intel_gt *gt) · 2 unmodified lines | ||
| 189 | 251 | * on top of the last known real value, as the approximated RC6 |
| 190 | 252 | * counter value. |
| 191 | 253 | */ |
| 192 | − val = ktime_since_raw(pmu->sleep_last); | |
| 193 | − val += pmu->sample[__I915_SAMPLE_RC6].cur; | |
| 254 | + val = ktime_since_raw(pmu->sleep_last[gt_id]); | |
| 255 | + val += read_sample(pmu, gt_id, __I915_SAMPLE_RC6); | |
| 194 | 256 | } |
| 195 | 257 | |
| 196 | − if (val < pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur) | |
| 197 | − val = pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur; | |
| 258 | + if (val < read_sample(pmu, gt_id, __I915_SAMPLE_RC6_LAST_REPORTED)) | |
| 259 | + val = read_sample(pmu, gt_id, __I915_SAMPLE_RC6_LAST_REPORTED); | |
| 198 | 260 | else |
| 199 | − pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = val; | |
| 261 | + store_sample(pmu, gt_id, __I915_SAMPLE_RC6_LAST_REPORTED, val); | |
| 200 | 262 | |
| 201 | 263 | spin_unlock_irqrestore(&pmu->lock, flags); |
| 202 | 264 | |
| @@ -206,22 +268,29 @@ static u64 get_rc6(struct intel_gt *gt) · 3 unmodified lines | ||
| 206 | 268 | static void init_rc6(struct i915_pmu *pmu) |
| 207 | 269 | { |
| 208 | 270 | struct drm_i915_private *i915 = container_of(pmu, typeof(*i915), pmu); |
| 209 | − intel_wakeref_t wakeref; | |
| 271 | + struct intel_gt *gt; | |
| 272 | + unsigned int i; | |
| 210 | 273 | |
| 211 | − with_intel_runtime_pm(to_gt(i915)->uncore->rpm, wakeref) { | |
| 212 | − pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(to_gt(i915)); | |
| 213 | − pmu->sample[__I915_SAMPLE_RC6_LAST_REPORTED].cur = | |
| 214 | − pmu->sample[__I915_SAMPLE_RC6].cur; | |
| 215 | − pmu->sleep_last = ktime_get_raw(); | |
| 274 | + for_each_gt(gt, i915, i) { | |
| 275 | + intel_wakeref_t wakeref; | |
| 276 | + | |
| 277 | + with_intel_runtime_pm(gt->uncore->rpm, wakeref) { | |
| 278 | + u64 val = __get_rc6(gt); | |
| 279 | + | |
| 280 | + store_sample(pmu, i, __I915_SAMPLE_RC6, val); | |
| 281 | + store_sample(pmu, i, __I915_SAMPLE_RC6_LAST_REPORTED, | |
| 282 | + val); | |
| 283 | + pmu->sleep_last[i] = ktime_get_raw(); | |
| 284 | + } | |
| 216 | 285 | } |
| 217 | 286 | } |
| 218 | 287 | |
| 219 | −static void park_rc6(struct drm_i915_private *i915) | |
| 288 | +static void park_rc6(struct intel_gt *gt) | |
| 220 | 289 | { |
| 221 | − struct i915_pmu *pmu = &i915->pmu; | |
| 290 | + struct i915_pmu *pmu = >->i915->pmu; | |
| 222 | 291 | |
| 223 | − pmu->sample[__I915_SAMPLE_RC6].cur = __get_rc6(to_gt(i915)); | |
| 224 | − pmu->sleep_last = ktime_get_raw(); | |
| 292 | + store_sample(pmu, gt->info.id, __I915_SAMPLE_RC6, __get_rc6(gt)); | |
| 293 | + pmu->sleep_last[gt->info.id] = ktime_get_raw(); | |
| 225 | 294 | } |
| 226 | 295 | |
| 227 | 296 | static void __i915_pmu_maybe_start_timer(struct i915_pmu *pmu) |
| @@ -235,29 +304,31 @@ static void __i915_pmu_maybe_start_timer(struct i915_pmu *pmu) · 7 unmodified lines | ||
| 235 | 304 | } |
| 236 | 305 | } |
| 237 | 306 | |
| 238 | −void i915_pmu_gt_parked(struct drm_i915_private *i915) | |
| 307 | +void i915_pmu_gt_parked(struct intel_gt *gt) | |
| 239 | 308 | { |
| 240 | − struct i915_pmu *pmu = &i915->pmu; | |
| 309 | + struct i915_pmu *pmu = >->i915->pmu; | |
| 241 | 310 | |
| 242 | 311 | if (!pmu->base.event_init) |
| 243 | 312 | return; |
| 244 | 313 | |
| 245 | 314 | spin_lock_irq(&pmu->lock); |
| 246 | 315 | |
| 247 | − park_rc6(i915); | |
| 316 | + park_rc6(gt); | |
| 248 | 317 | |
| 249 | 318 | /* |
| 250 | 319 | * Signal sampling timer to stop if only engine events are enabled and |
| 251 | 320 | * GPU went idle. |
| 252 | 321 | */ |
| 253 | − pmu->timer_enabled = pmu_needs_timer(pmu, false); | |
| 322 | + pmu->unparked &= ~BIT(gt->info.id); | |
| 323 | + if (pmu->unparked == 0) | |
| 324 | + pmu->timer_enabled = pmu_needs_timer(pmu, false); | |
| 254 | 325 | |
| 255 | 326 | spin_unlock_irq(&pmu->lock); |
| 256 | 327 | } |
| 257 | 328 | |
| 258 | −void i915_pmu_gt_unparked(struct drm_i915_private *i915) | |
| 329 | +void i915_pmu_gt_unparked(struct intel_gt *gt) | |
| 259 | 330 | { |
| 260 | − struct i915_pmu *pmu = &i915->pmu; | |
| 331 | + struct i915_pmu *pmu = >->i915->pmu; | |
| 261 | 332 | |
| 262 | 333 | if (!pmu->base.event_init) |
| 263 | 334 | return; |
| @@ -267,7 +338,10 @@ void i915_pmu_gt_unparked(struct drm_i915_private *i915) · 3 unmodified lines | ||
| 267 | 338 | /* |
| 268 | 339 | * Re-enable sampling timer when GPU goes active. |
| 269 | 340 | */ |
| 270 | − __i915_pmu_maybe_start_timer(pmu); | |
| 341 | + if (pmu->unparked == 0) | |
| 342 | + __i915_pmu_maybe_start_timer(pmu); | |
| 343 | + | |
| 344 | + pmu->unparked |= BIT(gt->info.id); | |
| 271 | 345 | |
| 272 | 346 | spin_unlock_irq(&pmu->lock); |
| 273 | 347 | } |
| @@ -338,6 +412,9 @@ engines_sample(struct intel_gt *gt, unsigned int period_ns) · 64 unmodified lines | ||
| 338 | 412 | return; |
| 339 | 413 | |
| 340 | 414 | for_each_engine(engine, gt, id) { |
| 415 | + if (!engine->pmu.enable) | |
| 416 | + continue; | |
| 417 | + | |
| 341 | 418 | if (!intel_engine_pm_get_if_awake(engine)) |
| 342 | 419 | continue; |
| 343 | 420 | |
| @@ -353,34 +430,30 @@ engines_sample(struct intel_gt *gt, unsigned int period_ns) · 9 unmodified lines | ||
| 353 | 430 | } |
| 354 | 431 | } |
| 355 | 432 | |
| 356 | −static void | |
| 357 | −add_sample_mult(struct i915_pmu_sample *sample, u32 val, u32 mul) | |
| 358 | −{ | |
| 359 | − sample->cur += mul_u32_u32(val, mul); | |
| 360 | −} | |
| 361 | − | |
| 362 | −static bool frequency_sampling_enabled(struct i915_pmu *pmu) | |
| 433 | +static bool | |
| 434 | +frequency_sampling_enabled(struct i915_pmu *pmu, unsigned int gt) | |
| 363 | 435 | { |
| 364 | 436 | return pmu->enable & |
| 365 | − (config_mask(I915_PMU_ACTUAL_FREQUENCY) | | |
| 366 | − config_mask(I915_PMU_REQUESTED_FREQUENCY)); | |
| 437 | + (config_mask(__I915_PMU_ACTUAL_FREQUENCY(gt)) | | |
| 438 | + config_mask(__I915_PMU_REQUESTED_FREQUENCY(gt))); | |
| 367 | 439 | } |
| 368 | 440 | |
| 369 | 441 | static void |
| 370 | 442 | frequency_sample(struct intel_gt *gt, unsigned int period_ns) |
| 371 | 443 | { |
| 372 | 444 | struct drm_i915_private *i915 = gt->i915; |
| 445 | + const unsigned int gt_id = gt->info.id; | |
| 373 | 446 | struct i915_pmu *pmu = &i915->pmu; |
| 374 | 447 | struct intel_rps *rps = >->rps; |
| 375 | 448 | |
| 376 | − if (!frequency_sampling_enabled(pmu)) | |
| 449 | + if (!frequency_sampling_enabled(pmu, gt_id)) | |
| 377 | 450 | return; |
| 378 | 451 | |
| 379 | 452 | /* Report 0/0 (actual/requested) frequency while parked. */ |
| 380 | 453 | if (!intel_gt_pm_get_if_awake(gt)) |
| 381 | 454 | return; |
| 382 | 455 | |
| 383 | − if (pmu->enable & config_mask(I915_PMU_ACTUAL_FREQUENCY)) { | |
| 456 | + if (pmu->enable & config_mask(__I915_PMU_ACTUAL_FREQUENCY(gt_id))) { | |
| 384 | 457 | u32 val; |
| 385 | 458 | |
| 386 | 459 | /* |
| @@ -396,12 +469,12 @@ frequency_sample(struct intel_gt *gt, unsigned int period_ns) · 9 unmodified lines | ||
| 396 | 469 | if (!val) |
| 397 | 470 | val = intel_gpu_freq(rps, rps->cur_freq); |
| 398 | 471 | |
| 399 | − add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_ACT], | |
| 472 | + add_sample_mult(pmu, gt_id, __I915_SAMPLE_FREQ_ACT, | |
| 400 | 473 | val, period_ns / 1000); |
| 401 | 474 | } |
| 402 | 475 | |
| 403 | − if (pmu->enable & config_mask(I915_PMU_REQUESTED_FREQUENCY)) { | |
| 404 | − add_sample_mult(&pmu->sample[__I915_SAMPLE_FREQ_REQ], | |
| 476 | + if (pmu->enable & config_mask(__I915_PMU_REQUESTED_FREQUENCY(gt_id))) { | |
| 477 | + add_sample_mult(pmu, gt_id, __I915_SAMPLE_FREQ_REQ, | |
| 405 | 478 | intel_rps_get_requested_frequency(rps), |
| 406 | 479 | period_ns / 1000); |
| 407 | 480 | } |
| @@ -414,8 +487,9 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer) · 6 unmodified lines | ||
| 414 | 487 | struct drm_i915_private *i915 = |
| 415 | 488 | container_of(hrtimer, struct drm_i915_private, pmu.timer); |
| 416 | 489 | struct i915_pmu *pmu = &i915->pmu; |
| 417 | − struct intel_gt *gt = to_gt(i915); | |
| 418 | 490 | unsigned int period_ns; |
| 491 | + struct intel_gt *gt; | |
| 492 | + unsigned int i; | |
| 419 | 493 | ktime_t now; |
| 420 | 494 | |
| 421 | 495 | if (!READ_ONCE(pmu->timer_enabled)) |
| @@ -431,8 +505,14 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer) · 9 unmodified lines | ||
| 431 | 505 | * grabbing the forcewake. However the potential error from timer call- |
| 432 | 506 | * back delay greatly dominates this so we keep it simple. |
| 433 | 507 | */ |
| 434 | − engines_sample(gt, period_ns); | |
| 435 | − frequency_sample(gt, period_ns); | |
| 508 | + | |
| 509 | + for_each_gt(gt, i915, i) { | |
| 510 | + if (!(pmu->unparked & BIT(i))) | |
| 511 | + continue; | |
| 512 | + | |
| 513 | + engines_sample(gt, period_ns); | |
| 514 | + frequency_sample(gt, period_ns); | |
| 515 | + } | |
| 436 | 516 | |
| 437 | 517 | hrtimer_forward(hrtimer, now, ns_to_ktime(PERIOD)); |
| 438 | 518 | |
| @@ -473,7 +553,13 @@ config_status(struct drm_i915_private *i915, u64 config) · 34 unmodified lines | ||
| 473 | 553 | { |
| 474 | 554 | struct intel_gt *gt = to_gt(i915); |
| 475 | 555 | |
| 476 | − switch (config) { | |
| 556 | + unsigned int gt_id = config_gt_id(config); | |
| 557 | + unsigned int max_gt_id = HAS_EXTRA_GT_LIST(i915) ? 1 : 0; | |
| 558 | + | |
| 559 | + if (gt_id > max_gt_id) | |
| 560 | + return -ENOENT; | |
| 561 | + | |
| 562 | + switch (config_counter(config)) { | |
| 477 | 563 | case I915_PMU_ACTUAL_FREQUENCY: |
| 478 | 564 | if (IS_VALLEYVIEW(i915) || IS_CHERRYVIEW(i915)) |
| 479 | 565 | /* Requires a mutex for sampling! */ |
| @@ -484,6 +570,8 @@ config_status(struct drm_i915_private *i915, u64 config) · 4 unmodified lines | ||
| 484 | 570 | return -ENODEV; |
| 485 | 571 | break; |
| 486 | 572 | case I915_PMU_INTERRUPTS: |
| 573 | + if (gt_id) | |
| 574 | + return -ENOENT; | |
| 487 | 575 | break; |
| 488 | 576 | case I915_PMU_RC6_RESIDENCY: |
| 489 | 577 | if (!gt->rc6.supported) |
| @@ -581,22 +669,27 @@ static u64 __i915_pmu_event_read(struct perf_event *event) · 91 unmodified lines | ||
| 581 | 669 | val = engine->pmu.sample[sample].cur; |
| 582 | 670 | } |
| 583 | 671 | } else { |
| 584 | − switch (event->attr.config) { | |
| 672 | + const unsigned int gt_id = config_gt_id(event->attr.config); | |
| 673 | + const u64 config = config_counter(event->attr.config); | |
| 674 | + | |
| 675 | + switch (config) { | |
| 585 | 676 | case I915_PMU_ACTUAL_FREQUENCY: |
| 586 | 677 | val = |
| 587 | − div_u64(pmu->sample[__I915_SAMPLE_FREQ_ACT].cur, | |
| 678 | + div_u64(read_sample(pmu, gt_id, | |
| 679 | + __I915_SAMPLE_FREQ_ACT), | |
| 588 | 680 | USEC_PER_SEC /* to MHz */); |
| 589 | 681 | break; |
| 590 | 682 | case I915_PMU_REQUESTED_FREQUENCY: |
| 591 | 683 | val = |
| 592 | − div_u64(pmu->sample[__I915_SAMPLE_FREQ_REQ].cur, | |
| 684 | + div_u64(read_sample(pmu, gt_id, | |
| 685 | + __I915_SAMPLE_FREQ_REQ), | |
| 593 | 686 | USEC_PER_SEC /* to MHz */); |
| 594 | 687 | break; |
| 595 | 688 | case I915_PMU_INTERRUPTS: |
| 596 | 689 | val = READ_ONCE(pmu->irq_count); |
| 597 | 690 | break; |
| 598 | 691 | case I915_PMU_RC6_RESIDENCY: |
| 599 | − val = get_rc6(to_gt(i915)); | |
| 692 | + val = get_rc6(i915->gt[gt_id]); | |
| 600 | 693 | break; |
| 601 | 694 | case I915_PMU_SOFTWARE_GT_AWAKE_TIME: |
| 602 | 695 | val = ktime_to_ns(intel_gt_get_awake_time(to_gt(i915))); |
| @@ -633,11 +726,10 @@ static void i915_pmu_enable(struct perf_event *event) · 30 unmodified lines | ||
| 633 | 726 | { |
| 634 | 727 | struct drm_i915_private *i915 = |
| 635 | 728 | container_of(event->pmu, typeof(*i915), pmu.base); |
| 729 | + const unsigned int bit = event_bit(event); | |
| 636 | 730 | struct i915_pmu *pmu = &i915->pmu; |
| 637 | 731 | unsigned long flags; |
| 638 | − unsigned int bit; | |
| 639 | 732 | |
| 640 | − bit = event_bit(event); | |
| 641 | 733 | if (bit == -1) |
| 642 | 734 | goto update; |
| 643 | 735 | |
| @@ -651,7 +743,7 @@ static void i915_pmu_enable(struct perf_event *event) · 7 unmodified lines | ||
| 651 | 743 | GEM_BUG_ON(bit >= ARRAY_SIZE(pmu->enable_count)); |
| 652 | 744 | GEM_BUG_ON(pmu->enable_count[bit] == ~0); |
| 653 | 745 | |
| 654 | − pmu->enable |= BIT_ULL(bit); | |
| 746 | + pmu->enable |= BIT(bit); | |
| 655 | 747 | pmu->enable_count[bit]++; |
| 656 | 748 | |
| 657 | 749 | /* |
| @@ -698,7 +790,7 @@ static void i915_pmu_disable(struct perf_event *event) · 40 unmodified lines | ||
| 698 | 790 | { |
| 699 | 791 | struct drm_i915_private *i915 = |
| 700 | 792 | container_of(event->pmu, typeof(*i915), pmu.base); |
| 701 | − unsigned int bit = event_bit(event); | |
| 793 | + const unsigned int bit = event_bit(event); | |
| 702 | 794 | struct i915_pmu *pmu = &i915->pmu; |
| 703 | 795 | unsigned long flags; |
| 704 | 796 | |
| @@ -734,7 +826,7 @@ static void i915_pmu_disable(struct perf_event *event) · 29 unmodified lines | ||
| 734 | 826 | * bitmask when the last listener on an event goes away. |
| 735 | 827 | */ |
| 736 | 828 | if (--pmu->enable_count[bit] == 0) { |
| 737 | − pmu->enable &= ~BIT_ULL(bit); | |
| 829 | + pmu->enable &= ~BIT(bit); | |
| 738 | 830 | pmu->timer_enabled &= pmu_needs_timer(pmu, true); |
| 739 | 831 | } |
| 740 | 832 | |
| @@ -848,11 +940,20 @@ static const struct attribute_group i915_pmu_cpumask_attr_group = { · 107 unmodified lines | ||
| 848 | 940 | .attrs = i915_cpumask_attrs, |
| 849 | 941 | }; |
| 850 | 942 | |
| 851 | −#define __event(__config, __name, __unit) \ | |
| 943 | +#define __event(__counter, __name, __unit) \ | |
| 852 | 944 | { \ |
| 853 | − .config = (__config), \ | |
| 945 | + .counter = (__counter), \ | |
| 854 | 946 | .name = (__name), \ |
| 855 | 947 | .unit = (__unit), \ |
| 948 | + .global = false, \ | |
| 949 | +} | |
| 950 | + | |
| 951 | +#define __global_event(__counter, __name, __unit) \ | |
| 952 | +{ \ | |
| 953 | + .counter = (__counter), \ | |
| 954 | + .name = (__name), \ | |
| 955 | + .unit = (__unit), \ | |
| 956 | + .global = true, \ | |
| 856 | 957 | } |
| 857 | 958 | |
| 858 | 959 | #define __engine_event(__sample, __name) \ |
| @@ -891,15 +992,16 @@ create_event_attributes(struct i915_pmu *pmu) · 32 unmodified lines | ||
| 891 | 992 | { |
| 892 | 993 | struct drm_i915_private *i915 = container_of(pmu, typeof(*i915), pmu); |
| 893 | 994 | static const struct { |
| 894 | − u64 config; | |
| 995 | + unsigned int counter; | |
| 895 | 996 | const char *name; |
| 896 | 997 | const char *unit; |
| 998 | + bool global; | |
| 897 | 999 | } events[] = { |
| 898 | − __event(I915_PMU_ACTUAL_FREQUENCY, "actual-frequency", "M"), | |
| 899 | − __event(I915_PMU_REQUESTED_FREQUENCY, "requested-frequency", "M"), | |
| 900 | − __event(I915_PMU_INTERRUPTS, "interrupts", NULL), | |
| 901 | − __event(I915_PMU_RC6_RESIDENCY, "rc6-residency", "ns"), | |
| 902 | − __event(I915_PMU_SOFTWARE_GT_AWAKE_TIME, "software-gt-awake-time", "ns"), | |
| 1000 | + __event(0, "actual-frequency", "M"), | |
| 1001 | + __event(1, "requested-frequency", "M"), | |
| 1002 | + __global_event(2, "interrupts", NULL), | |
| 1003 | + __event(3, "rc6-residency", "ns"), | |
| 1004 | + __event(4, "software-gt-awake-time", "ns"), | |
| 903 | 1005 | }; |
| 904 | 1006 | static const struct { |
| 905 | 1007 | enum drm_i915_pmu_engine_sample sample; |
| @@ -914,12 +1016,17 @@ create_event_attributes(struct i915_pmu *pmu) · 8 unmodified lines | ||
| 914 | 1016 | struct i915_ext_attribute *i915_attr = NULL, *i915_iter; |
| 915 | 1017 | struct attribute **attr = NULL, **attr_iter; |
| 916 | 1018 | struct intel_engine_cs *engine; |
| 917 | − unsigned int i; | |
| 1019 | + struct intel_gt *gt; | |
| 1020 | + unsigned int i, j; | |
| 918 | 1021 | |
| 919 | 1022 | /* Count how many counters we will be exposing. */ |
| 920 | − for (i = 0; i < ARRAY_SIZE(events); i++) { | |
| 921 | − if (!config_status(i915, events[i].config)) | |
| 922 | − count++; | |
| 1023 | + for_each_gt(gt, i915, j) { | |
| 1024 | + for (i = 0; i < ARRAY_SIZE(events); i++) { | |
| 1025 | + u64 config = ___I915_PMU_OTHER(j, events[i].counter); | |
| 1026 | + | |
| 1027 | + if (!config_status(i915, config)) | |
| 1028 | + count++; | |
| 1029 | + } | |
| 923 | 1030 | } |
| 924 | 1031 | |
| 925 | 1032 | for_each_uabi_engine(engine, i915) { |
| @@ -949,26 +1056,39 @@ create_event_attributes(struct i915_pmu *pmu) · 23 unmodified lines | ||
| 949 | 1056 | attr_iter = attr; |
| 950 | 1057 | |
| 951 | 1058 | /* Initialize supported non-engine counters. */ |
| 952 | − for (i = 0; i < ARRAY_SIZE(events); i++) { | |
| 953 | − char *str; | |
| 954 | − | |
| 955 | − if (config_status(i915, events[i].config)) | |
| 956 | − continue; | |
| 957 | − | |
| 958 | − str = kstrdup(events[i].name, GFP_KERNEL); | |
| 959 | − if (!str) | |
| 960 | − goto err; | |
| 1059 | + for_each_gt(gt, i915, j) { | |
| 1060 | + for (i = 0; i < ARRAY_SIZE(events); i++) { | |
| 1061 | + u64 config = ___I915_PMU_OTHER(j, events[i].counter); | |
| 1062 | + char *str; | |
| 961 | 1063 | |
| 962 | − *attr_iter++ = &i915_iter->attr.attr; | |
| 963 | − i915_iter = add_i915_attr(i915_iter, str, events[i].config); | |
| 1064 | + if (config_status(i915, config)) | |
| 1065 | + continue; | |
| 964 | 1066 | |
| 965 | − if (events[i].unit) { | |
| 966 | − str = kasprintf(GFP_KERNEL, "%s.unit", events[i].name); | |
| 1067 | + if (events[i].global || !HAS_EXTRA_GT_LIST(i915)) | |
| 1068 | + str = kstrdup(events[i].name, GFP_KERNEL); | |
| 1069 | + else | |
| 1070 | + str = kasprintf(GFP_KERNEL, "%s-gt%u", | |
| 1071 | + events[i].name, j); | |
| 967 | 1072 | if (!str) |
| 968 | 1073 | goto err; |
| 969 | 1074 | |
| 970 | − *attr_iter++ = &pmu_iter->attr.attr; | |
| 971 | − pmu_iter = add_pmu_attr(pmu_iter, str, events[i].unit); | |
| 1075 | + *attr_iter++ = &i915_iter->attr.attr; | |
| 1076 | + i915_iter = add_i915_attr(i915_iter, str, config); | |
| 1077 | + | |
| 1078 | + if (events[i].unit) { | |
| 1079 | + if (events[i].global || !HAS_EXTRA_GT_LIST(i915)) | |
| 1080 | + str = kasprintf(GFP_KERNEL, "%s.unit", | |
| 1081 | + events[i].name); | |
| 1082 | + else | |
| 1083 | + str = kasprintf(GFP_KERNEL, "%s-gt%u.unit", | |
| 1084 | + events[i].name, j); | |
| 1085 | + if (!str) | |
| 1086 | + goto err; | |
| 1087 | + | |
| 1088 | + *attr_iter++ = &pmu_iter->attr.attr; | |
| 1089 | + pmu_iter = add_pmu_attr(pmu_iter, str, | |
| 1090 | + events[i].unit); | |
| 1091 | + } | |
| 972 | 1092 | } |
| 973 | 1093 | } |
| 974 | 1094 | |
| @@ -13,8 +13,9 @@ · 12 unmodified lines | ||
| 13 | 13 | #include <uapi/drm/i915_drm.h> |
| 14 | 14 | |
| 15 | 15 | struct drm_i915_private; |
| 16 | +struct intel_gt; | |
| 16 | 17 | |
| 17 | −/** | |
| 18 | +/* | |
| 18 | 19 | * Non-engine events that we need to track enabled-disabled transition and |
| 19 | 20 | * current state. |
| 20 | 21 | */ |
| @@ -25,7 +26,7 @@ enum i915_pmu_tracked_events { · 4 unmodified lines | ||
| 25 | 26 | __I915_PMU_TRACKED_EVENT_COUNT, /* count marker */ |
| 26 | 27 | }; |
| 27 | 28 | |
| 28 | −/** | |
| 29 | +/* | |
| 29 | 30 | * Slots used from the sampling timer (non-engine events) with some extras for |
| 30 | 31 | * convenience. |
| 31 | 32 | */ |
| @@ -37,13 +38,16 @@ enum { · 5 unmodified lines | ||
| 37 | 38 | __I915_NUM_PMU_SAMPLERS |
| 38 | 39 | }; |
| 39 | 40 | |
| 40 | −/** | |
| 41 | +#define I915_PMU_MAX_GTS 2 | |
| 42 | + | |
| 43 | +/* | |
| 41 | 44 | * How many different events we track in the global PMU mask. |
| 42 | 45 | * |
| 43 | 46 | * It is also used to know to needed number of event reference counters. |
| 44 | 47 | */ |
| 45 | 48 | #define I915_PMU_MASK_BITS \ |
| 46 | − (I915_ENGINE_SAMPLE_COUNT + __I915_PMU_TRACKED_EVENT_COUNT) | |
| 49 | + (I915_ENGINE_SAMPLE_COUNT + \ | |
| 50 | + I915_PMU_MAX_GTS * __I915_PMU_TRACKED_EVENT_COUNT) | |
| 47 | 51 | |
| 48 | 52 | #define I915_ENGINE_SAMPLE_COUNT (I915_SAMPLE_SEMA + 1) |
| 49 | 53 | |
| @@ -75,6 +79,10 @@ struct i915_pmu { · 25 unmodified lines | ||
| 75 | 79 | * @lock: Lock protecting enable mask and ref count handling. |
| 76 | 80 | */ |
| 77 | 81 | spinlock_t lock; |
| 82 | + /** | |
| 83 | + * @unparked: GT unparked mask. | |
| 84 | + */ | |
| 85 | + unsigned int unparked; | |
| 78 | 86 | /** |
| 79 | 87 | * @timer: Timer for internal i915 PMU sampling. |
| 80 | 88 | */ |
| @@ -119,11 +127,11 @@ struct i915_pmu { · 38 unmodified lines | ||
| 119 | 127 | * Only global counters are held here, while the per-engine ones are in |
| 120 | 128 | * struct intel_engine_cs. |
| 121 | 129 | */ |
| 122 | − struct i915_pmu_sample sample[__I915_NUM_PMU_SAMPLERS]; | |
| 130 | + struct i915_pmu_sample sample[I915_PMU_MAX_GTS * __I915_NUM_PMU_SAMPLERS]; | |
| 123 | 131 | /** |
| 124 | 132 | * @sleep_last: Last time GT parked for RC6 estimation. |
| 125 | 133 | */ |
| 126 | − ktime_t sleep_last; | |
| 134 | + ktime_t sleep_last[I915_PMU_MAX_GTS]; | |
| 127 | 135 | /** |
| 128 | 136 | * @irq_count: Number of interrupts |
| 129 | 137 | * |
| @@ -151,15 +159,15 @@ int i915_pmu_init(void); · 21 unmodified lines | ||
| 151 | 159 | void i915_pmu_exit(void); |
| 152 | 160 | void i915_pmu_register(struct drm_i915_private *i915); |
| 153 | 161 | void i915_pmu_unregister(struct drm_i915_private *i915); |
| 154 | −void i915_pmu_gt_parked(struct drm_i915_private *i915); | |
| 155 | −void i915_pmu_gt_unparked(struct drm_i915_private *i915); | |
| 162 | +void i915_pmu_gt_parked(struct intel_gt *gt); | |
| 163 | +void i915_pmu_gt_unparked(struct intel_gt *gt); | |
| 156 | 164 | #else |
| 157 | 165 | static inline int i915_pmu_init(void) { return 0; } |
| 158 | 166 | static inline void i915_pmu_exit(void) {} |
| 159 | 167 | static inline void i915_pmu_register(struct drm_i915_private *i915) {} |
| 160 | 168 | static inline void i915_pmu_unregister(struct drm_i915_private *i915) {} |
| 161 | −static inline void i915_pmu_gt_parked(struct drm_i915_private *i915) {} | |
| 162 | −static inline void i915_pmu_gt_unparked(struct drm_i915_private *i915) {} | |
| 169 | +static inline void i915_pmu_gt_parked(struct intel_gt *gt) {} | |
| 170 | +static inline void i915_pmu_gt_unparked(struct intel_gt *gt) {} | |
| 163 | 171 | #endif |
| 164 | 172 | |
| 165 | 173 | #endif |
| @@ -172,7 +172,7 @@ enum { · 171 unmodified lines | ||
| 172 | 172 | I915_FENCE_FLAG_COMPOSITE, |
| 173 | 173 | }; |
| 174 | 174 | |
| 175 | −/** | |
| 175 | +/* | |
| 176 | 176 | * Request queue structure. |
| 177 | 177 | * |
| 178 | 178 | * The request queue allows us to note sequence numbers that have been emitted |
| @@ -198,7 +198,7 @@ struct i915_request { · 19 unmodified lines | ||
| 198 | 198 | |
| 199 | 199 | struct drm_i915_private *i915; |
| 200 | 200 | |
| 201 | − /** | |
| 201 | + /* | |
| 202 | 202 | * Context and ring buffer related to this request |
| 203 | 203 | * Contexts are refcounted, so when this request is associated with a |
| 204 | 204 | * context, we must increment the context's refcount, to guarantee that |
| @@ -251,9 +251,9 @@ struct i915_request { · 46 unmodified lines | ||
| 251 | 251 | }; |
| 252 | 252 | struct llist_head execute_cb; |
| 253 | 253 | struct i915_sw_fence semaphore; |
| 254 | − /** | |
| 255 | − * @submit_work: complete submit fence from an IRQ if needed for | |
| 256 | − * locking hierarchy reasons. | |
| 254 | + /* | |
| 255 | + * complete submit fence from an IRQ if needed for locking hierarchy | |
| 256 | + * reasons. | |
| 257 | 257 | */ |
| 258 | 258 | struct irq_work submit_work; |
| 259 | 259 | |
| @@ -277,35 +277,35 @@ struct i915_request { · 17 unmodified lines | ||
| 277 | 277 | */ |
| 278 | 278 | const u32 *hwsp_seqno; |
| 279 | 279 | |
| 280 | − /** Position in the ring of the start of the request */ | |
| 280 | + /* Position in the ring of the start of the request */ | |
| 281 | 281 | u32 head; |
| 282 | 282 | |
| 283 | − /** Position in the ring of the start of the user packets */ | |
| 283 | + /* Position in the ring of the start of the user packets */ | |
| 284 | 284 | u32 infix; |
| 285 | 285 | |
| 286 | − /** | |
| 286 | + /* | |
| 287 | 287 | * Position in the ring of the start of the postfix. |
| 288 | 288 | * This is required to calculate the maximum available ring space |
| 289 | 289 | * without overwriting the postfix. |
| 290 | 290 | */ |
| 291 | 291 | u32 postfix; |
| 292 | 292 | |
| 293 | − /** Position in the ring of the end of the whole request */ | |
| 293 | + /* Position in the ring of the end of the whole request */ | |
| 294 | 294 | u32 tail; |
| 295 | 295 | |
| 296 | − /** Position in the ring of the end of any workarounds after the tail */ | |
| 296 | + /* Position in the ring of the end of any workarounds after the tail */ | |
| 297 | 297 | u32 wa_tail; |
| 298 | 298 | |
| 299 | − /** Preallocate space in the ring for the emitting the request */ | |
| 299 | + /* Preallocate space in the ring for the emitting the request */ | |
| 300 | 300 | u32 reserved_space; |
| 301 | 301 | |
| 302 | − /** Batch buffer pointer for selftest internal use. */ | |
| 302 | + /* Batch buffer pointer for selftest internal use. */ | |
| 303 | 303 | I915_SELFTEST_DECLARE(struct i915_vma *batch); |
| 304 | 304 | |
| 305 | 305 | struct i915_vma_resource *batch_res; |
| 306 | 306 | |
| 307 | 307 | #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) |
| 308 | − /** | |
| 308 | + /* | |
| 309 | 309 | * Additional buffers requested by userspace to be captured upon |
| 310 | 310 | * a GPU hang. The vma/obj on this list are protected by their |
| 311 | 311 | * active reference - all objects on this list must also be |
| @@ -314,29 +314,29 @@ struct i915_request { · 2 unmodified lines | ||
| 314 | 314 | struct i915_capture_list *capture_list; |
| 315 | 315 | #endif |
| 316 | 316 | |
| 317 | − /** Time at which this request was emitted, in jiffies. */ | |
| 317 | + /* Time at which this request was emitted, in jiffies. */ | |
| 318 | 318 | unsigned long emitted_jiffies; |
| 319 | 319 | |
| 320 | − /** timeline->request entry for this request */ | |
| 320 | + /* timeline->request entry for this request */ | |
| 321 | 321 | struct list_head link; |
| 322 | 322 | |
| 323 | − /** Watchdog support fields. */ | |
| 323 | + /* Watchdog support fields. */ | |
| 324 | 324 | struct i915_request_watchdog { |
| 325 | 325 | struct llist_node link; |
| 326 | 326 | struct hrtimer timer; |
| 327 | 327 | } watchdog; |
| 328 | 328 | |
| 329 | − /** | |
| 330 | − * @guc_fence_link: Requests may need to be stalled when using GuC | |
| 331 | − * submission waiting for certain GuC operations to complete. If that is | |
| 332 | − * the case, stalled requests are added to a per context list of stalled | |
| 333 | − * requests. The below list_head is the link in that list. Protected by | |
| 329 | + /* | |
| 330 | + * Requests may need to be stalled when using GuC submission waiting for | |
| 331 | + * certain GuC operations to complete. If that is the case, stalled | |
| 332 | + * requests are added to a per context list of stalled requests. The | |
| 333 | + * below list_head is the link in that list. Protected by | |
| 334 | 334 | * ce->guc_state.lock. |
| 335 | 335 | */ |
| 336 | 336 | struct list_head guc_fence_link; |
| 337 | 337 | |
| 338 | − /** | |
| 339 | − * @guc_prio: Priority level while the request is in flight. Differs | |
| 338 | + /* | |
| 339 | + * Priority level while the request is in flight. Differs | |
| 340 | 340 | * from i915 scheduler priority. See comment above |
| 341 | 341 | * I915_SCHEDULER_CAP_STATIC_PRIORITY_MAP for details. Protected by |
| 342 | 342 | * ce->guc_active.lock. Two special values (GUC_PRIO_INIT and |
| @@ -348,8 +348,8 @@ struct i915_request { · 5 unmodified lines | ||
| 348 | 348 | #define GUC_PRIO_FINI 0xfe |
| 349 | 349 | u8 guc_prio; |
| 350 | 350 | |
| 351 | − /** | |
| 352 | − * @hucq: wait queue entry used to wait on the HuC load to complete | |
| 351 | + /* | |
| 352 | + * wait queue entry used to wait on the HuC load to complete | |
| 353 | 353 | */ |
| 354 | 354 | wait_queue_entry_t hucq; |
| 355 | 355 | |
| @@ -473,7 +473,7 @@ i915_request_has_initial_breadcrumb(const struct i915_request *rq) · 117 unmodified lines | ||
| 473 | 473 | return test_bit(I915_FENCE_FLAG_INITIAL_BREADCRUMB, &rq->fence.flags); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | −/** | |
| 476 | +/* | |
| 477 | 477 | * Returns true if seq1 is later than seq2. |
| 478 | 478 | */ |
| 479 | 479 | static inline bool i915_seqno_passed(u32 seq1, u32 seq2) |
| @@ -157,8 +157,7 @@ bool i915_sg_trim(struct sg_table *orig_st); · 156 unmodified lines | ||
| 157 | 157 | */ |
| 158 | 158 | struct i915_refct_sgt_ops { |
| 159 | 159 | /** |
| 160 | − * release() - Free the memory of the struct i915_refct_sgt | |
| 161 | − * @ref: struct kref that is embedded in the struct i915_refct_sgt | |
| 160 | + * @release: Free the memory of the struct i915_refct_sgt | |
| 162 | 161 | */ |
| 163 | 162 | void (*release)(struct kref *ref); |
| 164 | 163 | }; |
| @@ -181,7 +180,7 @@ struct i915_refct_sgt { · 16 unmodified lines | ||
| 181 | 180 | |
| 182 | 181 | /** |
| 183 | 182 | * i915_refct_sgt_put - Put a refcounted sg-table |
| 184 | − * @rsgt the struct i915_refct_sgt to put. | |
| 183 | + * @rsgt: the struct i915_refct_sgt to put. | |
| 185 | 184 | */ |
| 186 | 185 | static inline void i915_refct_sgt_put(struct i915_refct_sgt *rsgt) |
| 187 | 186 | { |
| @@ -191,7 +190,7 @@ static inline void i915_refct_sgt_put(struct i915_refct_sgt *rsgt) · 3 unmodified lines | ||
| 191 | 190 | |
| 192 | 191 | /** |
| 193 | 192 | * i915_refct_sgt_get - Get a refcounted sg-table |
| 194 | − * @rsgt the struct i915_refct_sgt to get. | |
| 193 | + * @rsgt: the struct i915_refct_sgt to get. | |
| 195 | 194 | */ |
| 196 | 195 | static inline struct i915_refct_sgt * |
| 197 | 196 | i915_refct_sgt_get(struct i915_refct_sgt *rsgt) |
| @@ -203,7 +202,7 @@ i915_refct_sgt_get(struct i915_refct_sgt *rsgt) · 5 unmodified lines | ||
| 203 | 202 | /** |
| 204 | 203 | * __i915_refct_sgt_init - Initialize a refcounted sg-list with a custom |
| 205 | 204 | * operations structure |
| 206 | − * @rsgt The struct i915_refct_sgt to initialize. | |
| 205 | + * @rsgt: The struct i915_refct_sgt to initialize. | |
| 207 | 206 | * @size: Size in bytes of the underlying memory buffer. |
| 208 | 207 | * @ops: A customized operations structure in case the refcounted sg-list |
| 209 | 208 | * is embedded into another structure. |
| @@ -250,7 +250,7 @@ wait_remaining_ms_from_jiffies(unsigned long timestamp_jiffies, int to_wait_ms) · 249 unmodified lines | ||
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | −/** | |
| 253 | +/* | |
| 254 | 254 | * __wait_for - magic wait macro |
| 255 | 255 | * |
| 256 | 256 | * Macro to help avoid open coding check/wait/timeout patterns. Note that it's |
| @@ -315,7 +315,7 @@ struct i915_vma_work { · 314 unmodified lines | ||
| 315 | 315 | struct i915_vma_resource *vma_res; |
| 316 | 316 | struct drm_i915_gem_object *obj; |
| 317 | 317 | struct i915_sw_dma_fence_cb cb; |
| 318 | − enum i915_cache_level cache_level; | |
| 318 | + unsigned int pat_index; | |
| 319 | 319 | unsigned int flags; |
| 320 | 320 | }; |
| 321 | 321 | |
| @@ -334,7 +334,7 @@ static void __vma_bind(struct dma_fence_work *work) · 12 unmodified lines | ||
| 334 | 334 | return; |
| 335 | 335 | |
| 336 | 336 | vma_res->ops->bind_vma(vma_res->vm, &vw->stash, |
| 337 | − vma_res, vw->cache_level, vw->flags); | |
| 337 | + vma_res, vw->pat_index, vw->flags); | |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | static void __vma_release(struct dma_fence_work *work) |
| @@ -426,7 +426,7 @@ i915_vma_resource_init_from_vma(struct i915_vma_resource *vma_res, · 85 unmodified lines | ||
| 426 | 426 | /** |
| 427 | 427 | * i915_vma_bind - Sets up PTEs for an VMA in it's corresponding address space. |
| 428 | 428 | * @vma: VMA to map |
| 429 | − * @cache_level: mapping cache level | |
| 429 | + * @pat_index: PAT index to set in PTE | |
| 430 | 430 | * @flags: flags like global or local mapping |
| 431 | 431 | * @work: preallocated worker for allocating and binding the PTE |
| 432 | 432 | * @vma_res: pointer to a preallocated vma resource. The resource is either |
| @@ -437,7 +437,7 @@ i915_vma_resource_init_from_vma(struct i915_vma_resource *vma_res, · 4 unmodified lines | ||
| 437 | 437 | * Note that DMA addresses are also the only part of the SG table we care about. |
| 438 | 438 | */ |
| 439 | 439 | int i915_vma_bind(struct i915_vma *vma, |
| 440 | − enum i915_cache_level cache_level, | |
| 440 | + unsigned int pat_index, | |
| 441 | 441 | u32 flags, |
| 442 | 442 | struct i915_vma_work *work, |
| 443 | 443 | struct i915_vma_resource *vma_res) |
| @@ -507,7 +507,7 @@ int i915_vma_bind(struct i915_vma *vma, · 63 unmodified lines | ||
| 507 | 507 | struct dma_fence *prev; |
| 508 | 508 | |
| 509 | 509 | work->vma_res = i915_vma_resource_get(vma->resource); |
| 510 | − work->cache_level = cache_level; | |
| 510 | + work->pat_index = pat_index; | |
| 511 | 511 | work->flags = bind_flags; |
| 512 | 512 | |
| 513 | 513 | /* |
| @@ -537,7 +537,7 @@ int i915_vma_bind(struct i915_vma *vma, · 23 unmodified lines | ||
| 537 | 537 | |
| 538 | 538 | return ret; |
| 539 | 539 | } |
| 540 | − vma->ops->bind_vma(vma->vm, NULL, vma->resource, cache_level, | |
| 540 | + vma->ops->bind_vma(vma->vm, NULL, vma->resource, pat_index, | |
| 541 | 541 | bind_flags); |
| 542 | 542 | } |
| 543 | 543 | |
| @@ -814,7 +814,7 @@ i915_vma_insert(struct i915_vma *vma, struct i915_gem_ww_ctx *ww, · 270 unmodified lines | ||
| 814 | 814 | color = 0; |
| 815 | 815 | |
| 816 | 816 | if (i915_vm_has_cache_coloring(vma->vm)) |
| 817 | − color = vma->obj->cache_level; | |
| 817 | + color = vma->obj->pat_index; | |
| 818 | 818 | |
| 819 | 819 | if (flags & PIN_OFFSET_FIXED) { |
| 820 | 820 | u64 offset = flags & PIN_OFFSET_MASK; |
| @@ -1518,7 +1518,7 @@ int i915_vma_pin_ww(struct i915_vma *vma, struct i915_gem_ww_ctx *ww, · 697 unmodified lines | ||
| 1518 | 1518 | |
| 1519 | 1519 | GEM_BUG_ON(!vma->pages); |
| 1520 | 1520 | err = i915_vma_bind(vma, |
| 1521 | − vma->obj->cache_level, | |
| 1521 | + vma->obj->pat_index, | |
| 1522 | 1522 | flags, work, vma_res); |
| 1523 | 1523 | vma_res = NULL; |
| 1524 | 1524 | if (err) |
| @@ -132,7 +132,7 @@ static inline u64 __i915_vma_size(const struct i915_vma *vma) · 131 unmodified lines | ||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
| 135 | − * i915_vma_offset - Obtain the va range size of the vma | |
| 135 | + * i915_vma_size - Obtain the va range size of the vma | |
| 136 | 136 | * @vma: The vma |
| 137 | 137 | * |
| 138 | 138 | * GPU virtual address space may be allocated with padding. This |
| @@ -250,7 +250,7 @@ i915_vma_compare(struct i915_vma *vma, · 111 unmodified lines | ||
| 250 | 250 | |
| 251 | 251 | struct i915_vma_work *i915_vma_work(void); |
| 252 | 252 | int i915_vma_bind(struct i915_vma *vma, |
| 253 | − enum i915_cache_level cache_level, | |
| 253 | + unsigned int pat_index, | |
| 254 | 254 | u32 flags, |
| 255 | 255 | struct i915_vma_work *work, |
| 256 | 256 | struct i915_vma_resource *vma_res); |
| @@ -33,6 +33,27 @@ struct i915_page_sizes { · 32 unmodified lines | ||
| 33 | 33 | unsigned int sg; |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | +/** | |
| 37 | + * struct i915_vma_bindinfo - Information needed for async bind | |
| 38 | + * only but that can be dropped after the bind has taken place. | |
| 39 | + * Consider making this a separate argument to the bind_vma | |
| 40 | + * op, coalescing with other arguments like vm, stash, cache_level | |
| 41 | + * and flags | |
| 42 | + * @pages: The pages sg-table. | |
| 43 | + * @page_sizes: Page sizes of the pages. | |
| 44 | + * @pages_rsgt: Refcounted sg-table when delayed object destruction | |
| 45 | + * is supported. May be NULL. | |
| 46 | + * @readonly: Whether the vma should be bound read-only. | |
| 47 | + * @lmem: Whether the vma points to lmem. | |
| 48 | + */ | |
| 49 | +struct i915_vma_bindinfo { | |
| 50 | + struct sg_table *pages; | |
| 51 | + struct i915_page_sizes page_sizes; | |
| 52 | + struct i915_refct_sgt *pages_rsgt; | |
| 53 | + bool readonly:1; | |
| 54 | + bool lmem:1; | |
| 55 | +}; | |
| 56 | + | |
| 36 | 57 | /** |
| 37 | 58 | * struct i915_vma_resource - Snapshotted unbind information. |
| 38 | 59 | * @unbind_fence: Fence to mark unbinding complete. Note that this fence |
| @@ -47,6 +68,7 @@ struct i915_page_sizes { · 8 unmodified lines | ||
| 47 | 68 | * @chain: Pointer to struct i915_sw_fence used to await dependencies. |
| 48 | 69 | * @rb: Rb node for the vm's pending unbind interval tree. |
| 49 | 70 | * @__subtree_last: Interval tree private member. |
| 71 | + * @wakeref: wakeref. | |
| 50 | 72 | * @vm: non-refcounted pointer to the vm. This is for internal use only and |
| 51 | 73 | * this member is cleared after vm_resource unbind. |
| 52 | 74 | * @mr: The memory region of the object pointed to by the vma. |
| @@ -88,25 +110,13 @@ struct i915_vma_resource { · 35 unmodified lines | ||
| 88 | 110 | intel_wakeref_t wakeref; |
| 89 | 111 | |
| 90 | 112 | /** |
| 91 | − * struct i915_vma_bindinfo - Information needed for async bind | |
| 92 | − * only but that can be dropped after the bind has taken place. | |
| 93 | − * Consider making this a separate argument to the bind_vma | |
| 94 | − * op, coalescing with other arguments like vm, stash, cache_level | |
| 95 | − * and flags | |
| 96 | − * @pages: The pages sg-table. | |
| 97 | − * @page_sizes: Page sizes of the pages. | |
| 98 | − * @pages_rsgt: Refcounted sg-table when delayed object destruction | |
| 99 | − * is supported. May be NULL. | |
| 100 | − * @readonly: Whether the vma should be bound read-only. | |
| 101 | − * @lmem: Whether the vma points to lmem. | |
| 113 | + * @bi: Information needed for async bind only but that can be dropped | |
| 114 | + * after the bind has taken place. | |
| 115 | + * | |
| 116 | + * Consider making this a separate argument to the bind_vma op, | |
| 117 | + * coalescing with other arguments like vm, stash, cache_level and flags | |
| 102 | 118 | */ |
| 103 | − struct i915_vma_bindinfo { | |
| 104 | − struct sg_table *pages; | |
| 105 | − struct i915_page_sizes page_sizes; | |
| 106 | − struct i915_refct_sgt *pages_rsgt; | |
| 107 | − bool readonly:1; | |
| 108 | − bool lmem:1; | |
| 109 | − } bi; | |
| 119 | + struct i915_vma_bindinfo bi; | |
| 110 | 120 | |
| 111 | 121 | #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR) |
| 112 | 122 | struct intel_memory_region *mr; |
| @@ -32,8 +32,6 @@ · 31 unmodified lines | ||
| 32 | 32 | |
| 33 | 33 | #include "gem/i915_gem_object_types.h" |
| 34 | 34 | |
| 35 | −enum i915_cache_level; | |
| 36 | − | |
| 37 | 35 | /** |
| 38 | 36 | * DOC: Global GTT views |
| 39 | 37 | * |
| @@ -35,6 +35,8 @@ · 34 unmodified lines | ||
| 35 | 35 | #include "gt/intel_context_types.h" |
| 36 | 36 | #include "gt/intel_sseu.h" |
| 37 | 37 | |
| 38 | +#include "gem/i915_gem_object_types.h" | |
| 39 | + | |
| 38 | 40 | struct drm_printer; |
| 39 | 41 | struct drm_i915_private; |
| 40 | 42 | struct intel_gt_definition; |
| @@ -245,6 +247,9 @@ struct intel_device_info { · 204 unmodified lines | ||
| 245 | 247 | * Initial runtime info. Do not access outside of i915_driver_create(). |
| 246 | 248 | */ |
| 247 | 249 | const struct intel_runtime_info __runtime; |
| 250 | + | |
| 251 | + u32 cachelevel_to_pat[I915_MAX_CACHE_LEVEL]; | |
| 252 | + u32 max_pat_index; | |
| 248 | 253 | }; |
| 249 | 254 | |
| 250 | 255 | struct intel_driver_caps { |
| @@ -12,7 +12,9 @@ · 11 unmodified lines | ||
| 12 | 12 | #include "i915_drv.h" |
| 13 | 13 | |
| 14 | 14 | #include "intel_pxp.h" |
| 15 | +#include "intel_pxp_gsccs.h" | |
| 15 | 16 | #include "intel_pxp_irq.h" |
| 17 | +#include "intel_pxp_regs.h" | |
| 16 | 18 | #include "intel_pxp_session.h" |
| 17 | 19 | #include "intel_pxp_tee.h" |
| 18 | 20 | #include "intel_pxp_types.h" |
| @@ -60,21 +62,22 @@ bool intel_pxp_is_active(const struct intel_pxp *pxp) · 41 unmodified lines | ||
| 60 | 62 | return IS_ENABLED(CONFIG_DRM_I915_PXP) && pxp && pxp->arb_is_valid; |
| 61 | 63 | } |
| 62 | 64 | |
| 63 | −/* KCR register definitions */ | |
| 64 | −#define KCR_INIT _MMIO(0x320f0) | |
| 65 | −/* Setting KCR Init bit is required after system boot */ | |
| 66 | −#define KCR_INIT_ALLOW_DISPLAY_ME_WRITES REG_BIT(14) | |
| 65 | +static void kcr_pxp_set_status(const struct intel_pxp *pxp, bool enable) | |
| 66 | +{ | |
| 67 | + u32 val = enable ? _MASKED_BIT_ENABLE(KCR_INIT_ALLOW_DISPLAY_ME_WRITES) : | |
| 68 | + _MASKED_BIT_DISABLE(KCR_INIT_ALLOW_DISPLAY_ME_WRITES); | |
| 69 | + | |
| 70 | + intel_uncore_write(pxp->ctrl_gt->uncore, KCR_INIT(pxp->kcr_base), val); | |
| 71 | +} | |
| 67 | 72 | |
| 68 | −static void kcr_pxp_enable(struct intel_gt *gt) | |
| 73 | +static void kcr_pxp_enable(const struct intel_pxp *pxp) | |
| 69 | 74 | { |
| 70 | − intel_uncore_write(gt->uncore, KCR_INIT, | |
| 71 | − _MASKED_BIT_ENABLE(KCR_INIT_ALLOW_DISPLAY_ME_WRITES)); | |
| 75 | + kcr_pxp_set_status(pxp, true); | |
| 72 | 76 | } |
| 73 | 77 | |
| 74 | −static void kcr_pxp_disable(struct intel_gt *gt) | |
| 78 | +static void kcr_pxp_disable(const struct intel_pxp *pxp) | |
| 75 | 79 | { |
| 76 | − intel_uncore_write(gt->uncore, KCR_INIT, | |
| 77 | − _MASKED_BIT_DISABLE(KCR_INIT_ALLOW_DISPLAY_ME_WRITES)); | |
| 80 | + kcr_pxp_set_status(pxp, false); | |
| 78 | 81 | } |
| 79 | 82 | |
| 80 | 83 | static int create_vcs_context(struct intel_pxp *pxp) |
| @@ -126,13 +129,21 @@ static void pxp_init_full(struct intel_pxp *pxp) · 45 unmodified lines | ||
| 126 | 129 | init_completion(&pxp->termination); |
| 127 | 130 | complete_all(&pxp->termination); |
| 128 | 131 | |
| 132 | + if (pxp->ctrl_gt->type == GT_MEDIA) | |
| 133 | + pxp->kcr_base = MTL_KCR_BASE; | |
| 134 | + else | |
| 135 | + pxp->kcr_base = GEN12_KCR_BASE; | |
| 136 | + | |
| 129 | 137 | intel_pxp_session_management_init(pxp); |
| 130 | 138 | |
| 131 | 139 | ret = create_vcs_context(pxp); |
| 132 | 140 | if (ret) |
| 133 | 141 | return; |
| 134 | 142 | |
| 135 | − ret = intel_pxp_tee_component_init(pxp); | |
| 143 | + if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) | |
| 144 | + ret = intel_pxp_gsccs_init(pxp); | |
| 145 | + else | |
| 146 | + ret = intel_pxp_tee_component_init(pxp); | |
| 136 | 147 | if (ret) |
| 137 | 148 | goto out_context; |
| 138 | 149 | |
| @@ -165,9 +176,12 @@ static struct intel_gt *find_gt_for_required_protected_content(struct drm_i915_p · 26 unmodified lines | ||
| 165 | 176 | /* |
| 166 | 177 | * For MTL onwards, PXP-controller-GT needs to have a valid GSC engine |
| 167 | 178 | * on the media GT. NOTE: if we have a media-tile with a GSC-engine, |
| 168 | − * the VDBOX is already present so skip that check | |
| 179 | + * the VDBOX is already present so skip that check. We also have to | |
| 180 | + * ensure the GSC and HUC firmware are coming online | |
| 169 | 181 | */ |
| 170 | − if (i915->media_gt && HAS_ENGINE(i915->media_gt, GSC0)) | |
| 182 | + if (i915->media_gt && HAS_ENGINE(i915->media_gt, GSC0) && | |
| 183 | + intel_uc_fw_is_loadable(&i915->media_gt->uc.gsc.fw) && | |
| 184 | + intel_uc_fw_is_loadable(&i915->media_gt->uc.huc.fw)) | |
| 171 | 185 | return i915->media_gt; |
| 172 | 186 | |
| 173 | 187 | /* |
| @@ -207,7 +221,9 @@ int intel_pxp_init(struct drm_i915_private *i915) · 33 unmodified lines | ||
| 207 | 221 | if (!i915->pxp) |
| 208 | 222 | return -ENOMEM; |
| 209 | 223 | |
| 224 | + /* init common info used by all feature-mode usages*/ | |
| 210 | 225 | i915->pxp->ctrl_gt = gt; |
| 226 | + mutex_init(&i915->pxp->tee_mutex); | |
| 211 | 227 | |
| 212 | 228 | /* |
| 213 | 229 | * If full PXP feature is not available but HuC is loaded by GSC on pre-MTL |
| @@ -229,7 +245,10 @@ void intel_pxp_fini(struct drm_i915_private *i915) · 15 unmodified lines | ||
| 229 | 245 | |
| 230 | 246 | i915->pxp->arb_is_valid = false; |
| 231 | 247 | |
| 232 | − intel_pxp_tee_component_fini(i915->pxp); | |
| 248 | + if (HAS_ENGINE(i915->pxp->ctrl_gt, GSC0)) | |
| 249 | + intel_pxp_gsccs_fini(i915->pxp); | |
| 250 | + else | |
| 251 | + intel_pxp_tee_component_fini(i915->pxp); | |
| 233 | 252 | |
| 234 | 253 | destroy_vcs_context(i915->pxp); |
| 235 | 254 | |
| @@ -270,8 +289,18 @@ static bool pxp_component_bound(struct intel_pxp *pxp) · 34 unmodified lines | ||
| 270 | 289 | return bound; |
| 271 | 290 | } |
| 272 | 291 | |
| 292 | +int intel_pxp_get_backend_timeout_ms(struct intel_pxp *pxp) | |
| 293 | +{ | |
| 294 | + if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) | |
| 295 | + return GSCFW_MAX_ROUND_TRIP_LATENCY_MS; | |
| 296 | + else | |
| 297 | + return 250; | |
| 298 | +} | |
| 299 | + | |
| 273 | 300 | static int __pxp_global_teardown_final(struct intel_pxp *pxp) |
| 274 | 301 | { |
| 302 | + int timeout; | |
| 303 | + | |
| 275 | 304 | if (!pxp->arb_is_valid) |
| 276 | 305 | return 0; |
| 277 | 306 | /* |
| @@ -281,7 +310,9 @@ static int __pxp_global_teardown_final(struct intel_pxp *pxp) · 3 unmodified lines | ||
| 281 | 310 | intel_pxp_mark_termination_in_progress(pxp); |
| 282 | 311 | intel_pxp_terminate(pxp, false); |
| 283 | 312 | |
| 284 | − if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(250))) | |
| 313 | + timeout = intel_pxp_get_backend_timeout_ms(pxp); | |
| 314 | + | |
| 315 | + if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(timeout))) | |
| 285 | 316 | return -ETIMEDOUT; |
| 286 | 317 | |
| 287 | 318 | return 0; |
| @@ -289,6 +320,8 @@ static int __pxp_global_teardown_final(struct intel_pxp *pxp) · 1 unmodified line | ||
| 289 | 320 | |
| 290 | 321 | static int __pxp_global_teardown_restart(struct intel_pxp *pxp) |
| 291 | 322 | { |
| 323 | + int timeout; | |
| 324 | + | |
| 292 | 325 | if (pxp->arb_is_valid) |
| 293 | 326 | return 0; |
| 294 | 327 | /* |
| @@ -297,7 +330,9 @@ static int __pxp_global_teardown_restart(struct intel_pxp *pxp) · 2 unmodified lines | ||
| 297 | 330 | */ |
| 298 | 331 | pxp_queue_termination(pxp); |
| 299 | 332 | |
| 300 | − if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(250))) | |
| 333 | + timeout = intel_pxp_get_backend_timeout_ms(pxp); | |
| 334 | + | |
| 335 | + if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(timeout))) | |
| 301 | 336 | return -ETIMEDOUT; |
| 302 | 337 | |
| 303 | 338 | return 0; |
| @@ -324,6 +359,26 @@ void intel_pxp_end(struct intel_pxp *pxp) · 20 unmodified lines | ||
| 324 | 359 | intel_runtime_pm_put(&i915->runtime_pm, wakeref); |
| 325 | 360 | } |
| 326 | 361 | |
| 362 | +/* | |
| 363 | + * this helper is used by both intel_pxp_start and by | |
| 364 | + * the GET_PARAM IOCTL that user space calls. Thus, the | |
| 365 | + * return values here should match the UAPI spec. | |
| 366 | + */ | |
| 367 | +int intel_pxp_get_readiness_status(struct intel_pxp *pxp) | |
| 368 | +{ | |
| 369 | + if (!intel_pxp_is_enabled(pxp)) | |
| 370 | + return -ENODEV; | |
| 371 | + | |
| 372 | + if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) { | |
| 373 | + if (wait_for(intel_pxp_gsccs_is_ready_for_sessions(pxp), 250)) | |
| 374 | + return 2; | |
| 375 | + } else { | |
| 376 | + if (wait_for(pxp_component_bound(pxp), 250)) | |
| 377 | + return 2; | |
| 378 | + } | |
| 379 | + return 1; | |
| 380 | +} | |
| 381 | + | |
| 327 | 382 | /* |
| 328 | 383 | * the arb session is restarted from the irq work when we receive the |
| 329 | 384 | * termination completion interrupt |
| @@ -332,11 +387,11 @@ int intel_pxp_start(struct intel_pxp *pxp) · 2 unmodified lines | ||
| 332 | 387 | { |
| 333 | 388 | int ret = 0; |
| 334 | 389 | |
| 335 | − if (!intel_pxp_is_enabled(pxp)) | |
| 336 | − return -ENODEV; | |
| 337 | − | |
| 338 | − if (wait_for(pxp_component_bound(pxp), 250)) | |
| 339 | − return -ENXIO; | |
| 390 | + ret = intel_pxp_get_readiness_status(pxp); | |
| 391 | + if (ret < 0) | |
| 392 | + return ret; | |
| 393 | + else if (ret > 1) | |
| 394 | + return -EIO; /* per UAPI spec, user may retry later */ | |
| 340 | 395 | |
| 341 | 396 | mutex_lock(&pxp->arb_mutex); |
| 342 | 397 | |
| @@ -357,14 +412,13 @@ unlock: · 14 unmodified lines | ||
| 357 | 412 | |
| 358 | 413 | void intel_pxp_init_hw(struct intel_pxp *pxp) |
| 359 | 414 | { |
| 360 | − kcr_pxp_enable(pxp->ctrl_gt); | |
| 415 | + kcr_pxp_enable(pxp); | |
| 361 | 416 | intel_pxp_irq_enable(pxp); |
| 362 | 417 | } |
| 363 | 418 | |
| 364 | 419 | void intel_pxp_fini_hw(struct intel_pxp *pxp) |
| 365 | 420 | { |
| 366 | − kcr_pxp_disable(pxp->ctrl_gt); | |
| 367 | − | |
| 421 | + kcr_pxp_disable(pxp); | |
| 368 | 422 | intel_pxp_irq_disable(pxp); |
| 369 | 423 | } |
| 370 | 424 | |
| @@ -26,6 +26,8 @@ void intel_pxp_fini_hw(struct intel_pxp *pxp); · 25 unmodified lines | ||
| 26 | 26 | void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp); |
| 27 | 27 | void intel_pxp_tee_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id); |
| 28 | 28 | |
| 29 | +int intel_pxp_get_readiness_status(struct intel_pxp *pxp); | |
| 30 | +int intel_pxp_get_backend_timeout_ms(struct intel_pxp *pxp); | |
| 29 | 31 | int intel_pxp_start(struct intel_pxp *pxp); |
| 30 | 32 | void intel_pxp_end(struct intel_pxp *pxp); |
| 31 | 33 | |
| @@ -11,6 +11,10 @@ · 10 unmodified lines | ||
| 11 | 11 | |
| 12 | 12 | /* PXP-Cmd-Op definitions */ |
| 13 | 13 | #define PXP43_CMDID_START_HUC_AUTH 0x0000003A |
| 14 | +#define PXP43_CMDID_INIT_SESSION 0x00000036 | |
| 15 | + | |
| 16 | +/* PXP-Packet sizes for MTL's GSCCS-HECI instruction */ | |
| 17 | +#define PXP43_MAX_HECI_INOUT_SIZE (SZ_32K) | |
| 14 | 18 | |
| 15 | 19 | /* PXP-Input-Packet: HUC-Authentication */ |
| 16 | 20 | struct pxp43_start_huc_auth_in { |
| @@ -23,4 +27,24 @@ struct pxp43_start_huc_auth_out { · 6 unmodified lines | ||
| 23 | 27 | struct pxp_cmd_header header; |
| 24 | 28 | } __packed; |
| 25 | 29 | |
| 30 | +/* PXP-Input-Packet: Init PXP session */ | |
| 31 | +struct pxp43_create_arb_in { | |
| 32 | + struct pxp_cmd_header header; | |
| 33 | + /* header.stream_id fields for vesion 4.3 of Init PXP session: */ | |
| 34 | + #define PXP43_INIT_SESSION_VALID BIT(0) | |
| 35 | + #define PXP43_INIT_SESSION_APPTYPE BIT(1) | |
| 36 | + #define PXP43_INIT_SESSION_APPID GENMASK(17, 2) | |
| 37 | + u32 protection_mode; | |
| 38 | + #define PXP43_INIT_SESSION_PROTECTION_ARB 0x2 | |
| 39 | + u32 sub_session_id; | |
| 40 | + u32 init_flags; | |
| 41 | + u32 rsvd[12]; | |
| 42 | +} __packed; | |
| 43 | + | |
| 44 | +/* PXP-Input-Packet: Init PXP session */ | |
| 45 | +struct pxp43_create_arb_out { | |
| 46 | + struct pxp_cmd_header header; | |
| 47 | + u32 rsvd[8]; | |
| 48 | +} __packed; | |
| 49 | + | |
| 26 | 50 | #endif /* __INTEL_PXP_FW_INTERFACE_43_H__ */ |
| @@ -14,6 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | |
| 15 | 15 | #include "intel_pxp.h" |
| 16 | 16 | #include "intel_pxp_debugfs.h" |
| 17 | +#include "intel_pxp_gsccs.h" | |
| 17 | 18 | #include "intel_pxp_irq.h" |
| 18 | 19 | #include "intel_pxp_types.h" |
| 19 | 20 | |
| @@ -45,6 +46,7 @@ static int pxp_terminate_set(void *data, u64 val) · 25 unmodified lines | ||
| 45 | 46 | { |
| 46 | 47 | struct intel_pxp *pxp = data; |
| 47 | 48 | struct intel_gt *gt = pxp->ctrl_gt; |
| 49 | + int timeout_ms; | |
| 48 | 50 | |
| 49 | 51 | if (!intel_pxp_is_active(pxp)) |
| 50 | 52 | return -ENODEV; |
| @@ -54,8 +56,10 @@ static int pxp_terminate_set(void *data, u64 val) · 3 unmodified lines | ||
| 54 | 56 | intel_pxp_irq_handler(pxp, GEN12_DISPLAY_PXP_STATE_TERMINATED_INTERRUPT); |
| 55 | 57 | spin_unlock_irq(gt->irq_lock); |
| 56 | 58 | |
| 59 | + timeout_ms = intel_pxp_get_backend_timeout_ms(pxp); | |
| 60 | + | |
| 57 | 61 | if (!wait_for_completion_timeout(&pxp->termination, |
| 58 | − msecs_to_jiffies(100))) | |
| 62 | + msecs_to_jiffies(timeout_ms))) | |
| 59 | 63 | return -ETIMEDOUT; |
| 60 | 64 | |
| 61 | 65 | return 0; |
| @@ -0,0 +1,444 @@ | ||
| 1 | +// SPDX-License-Identifier: MIT | |
| 2 | +/* | |
| 3 | + * Copyright(c) 2023 Intel Corporation. | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#include "gem/i915_gem_internal.h" | |
| 7 | + | |
| 8 | +#include "gt/intel_context.h" | |
| 9 | +#include "gt/uc/intel_gsc_fw.h" | |
| 10 | +#include "gt/uc/intel_gsc_uc_heci_cmd_submit.h" | |
| 11 | + | |
| 12 | +#include "i915_drv.h" | |
| 13 | +#include "intel_pxp.h" | |
| 14 | +#include "intel_pxp_cmd_interface_42.h" | |
| 15 | +#include "intel_pxp_cmd_interface_43.h" | |
| 16 | +#include "intel_pxp_gsccs.h" | |
| 17 | +#include "intel_pxp_types.h" | |
| 18 | + | |
| 19 | +static bool | |
| 20 | +is_fw_err_platform_config(u32 type) | |
| 21 | +{ | |
| 22 | + switch (type) { | |
| 23 | + case PXP_STATUS_ERROR_API_VERSION: | |
| 24 | + case PXP_STATUS_PLATFCONFIG_KF1_NOVERIF: | |
| 25 | + case PXP_STATUS_PLATFCONFIG_KF1_BAD: | |
| 26 | + return true; | |
| 27 | + default: | |
| 28 | + break; | |
| 29 | + } | |
| 30 | + return false; | |
| 31 | +} | |
| 32 | + | |
| 33 | +static const char * | |
| 34 | +fw_err_to_string(u32 type) | |
| 35 | +{ | |
| 36 | + switch (type) { | |
| 37 | + case PXP_STATUS_ERROR_API_VERSION: | |
| 38 | + return "ERR_API_VERSION"; | |
| 39 | + case PXP_STATUS_NOT_READY: | |
| 40 | + return "ERR_NOT_READY"; | |
| 41 | + case PXP_STATUS_PLATFCONFIG_KF1_NOVERIF: | |
| 42 | + case PXP_STATUS_PLATFCONFIG_KF1_BAD: | |
| 43 | + return "ERR_PLATFORM_CONFIG"; | |
| 44 | + default: | |
| 45 | + break; | |
| 46 | + } | |
| 47 | + return NULL; | |
| 48 | +} | |
| 49 | + | |
| 50 | +static int | |
| 51 | +gsccs_send_message(struct intel_pxp *pxp, | |
| 52 | + void *msg_in, size_t msg_in_size, | |
| 53 | + void *msg_out, size_t msg_out_size_max, | |
| 54 | + size_t *msg_out_len, | |
| 55 | + u64 *gsc_msg_handle_retry) | |
| 56 | +{ | |
| 57 | + struct intel_gt *gt = pxp->ctrl_gt; | |
| 58 | + struct drm_i915_private *i915 = gt->i915; | |
| 59 | + struct gsccs_session_resources *exec_res = &pxp->gsccs_res; | |
| 60 | + struct intel_gsc_mtl_header *header = exec_res->pkt_vaddr; | |
| 61 | + struct intel_gsc_heci_non_priv_pkt pkt; | |
| 62 | + size_t max_msg_size; | |
| 63 | + u32 reply_size; | |
| 64 | + int ret; | |
| 65 | + | |
| 66 | + if (!exec_res->ce) | |
| 67 | + return -ENODEV; | |
| 68 | + | |
| 69 | + max_msg_size = PXP43_MAX_HECI_INOUT_SIZE - sizeof(*header); | |
| 70 | + | |
| 71 | + if (msg_in_size > max_msg_size || msg_out_size_max > max_msg_size) | |
| 72 | + return -ENOSPC; | |
| 73 | + | |
| 74 | + if (!exec_res->pkt_vma || !exec_res->bb_vma) | |
| 75 | + return -ENOENT; | |
| 76 | + | |
| 77 | + GEM_BUG_ON(exec_res->pkt_vma->size < (2 * PXP43_MAX_HECI_INOUT_SIZE)); | |
| 78 | + | |
| 79 | + mutex_lock(&pxp->tee_mutex); | |
| 80 | + | |
| 81 | + memset(header, 0, sizeof(*header)); | |
| 82 | + intel_gsc_uc_heci_cmd_emit_mtl_header(header, HECI_MEADDRESS_PXP, | |
| 83 | + msg_in_size + sizeof(*header), | |
| 84 | + exec_res->host_session_handle); | |
| 85 | + | |
| 86 | + /* check if this is a host-session-handle cleanup call (empty packet) */ | |
| 87 | + if (!msg_in && !msg_out) | |
| 88 | + header->flags |= GSC_INFLAG_MSG_CLEANUP; | |
| 89 | + | |
| 90 | + /* copy caller provided gsc message handle if this is polling for a prior msg completion */ | |
| 91 | + header->gsc_message_handle = *gsc_msg_handle_retry; | |
| 92 | + | |
| 93 | + /* NOTE: zero size packets are used for session-cleanups */ | |
| 94 | + if (msg_in && msg_in_size) | |
| 95 | + memcpy(exec_res->pkt_vaddr + sizeof(*header), msg_in, msg_in_size); | |
| 96 | + | |
| 97 | + pkt.addr_in = i915_vma_offset(exec_res->pkt_vma); | |
| 98 | + pkt.size_in = header->message_size; | |
| 99 | + pkt.addr_out = pkt.addr_in + PXP43_MAX_HECI_INOUT_SIZE; | |
| 100 | + pkt.size_out = msg_out_size_max + sizeof(*header); | |
| 101 | + pkt.heci_pkt_vma = exec_res->pkt_vma; | |
| 102 | + pkt.bb_vma = exec_res->bb_vma; | |
| 103 | + | |
| 104 | + /* | |
| 105 | + * Before submitting, let's clear-out the validity marker on the reply offset. | |
| 106 | + * We use offset PXP43_MAX_HECI_INOUT_SIZE for reply location so point header there. | |
| 107 | + */ | |
| 108 | + header = exec_res->pkt_vaddr + PXP43_MAX_HECI_INOUT_SIZE; | |
| 109 | + header->validity_marker = 0; | |
| 110 | + | |
| 111 | + ret = intel_gsc_uc_heci_cmd_submit_nonpriv(>->uc.gsc, | |
| 112 | + exec_res->ce, &pkt, exec_res->bb_vaddr, | |
| 113 | + GSC_REPLY_LATENCY_MS); | |
| 114 | + if (ret) { | |
| 115 | + drm_err(&i915->drm, "failed to send gsc PXP msg (%d)\n", ret); | |
| 116 | + goto unlock; | |
| 117 | + } | |
| 118 | + | |
| 119 | + /* Response validity marker, status and busyness */ | |
| 120 | + if (header->validity_marker != GSC_HECI_VALIDITY_MARKER) { | |
| 121 | + drm_err(&i915->drm, "gsc PXP reply with invalid validity marker\n"); | |
| 122 | + ret = -EINVAL; | |
| 123 | + goto unlock; | |
| 124 | + } | |
| 125 | + if (header->status != 0) { | |
| 126 | + drm_dbg(&i915->drm, "gsc PXP reply status has error = 0x%08x\n", | |
| 127 | + header->status); | |
| 128 | + ret = -EINVAL; | |
| 129 | + goto unlock; | |
| 130 | + } | |
| 131 | + if (header->flags & GSC_OUTFLAG_MSG_PENDING) { | |
| 132 | + drm_dbg(&i915->drm, "gsc PXP reply is busy\n"); | |
| 133 | + /* | |
| 134 | + * When the GSC firmware replies with pending bit, it means that the requested | |
| 135 | + * operation has begun but the completion is pending and the caller needs | |
| 136 | + * to re-request with the gsc_message_handle that was returned by the firmware. | |
| 137 | + * until the pending bit is turned off. | |
| 138 | + */ | |
| 139 | + *gsc_msg_handle_retry = header->gsc_message_handle; | |
| 140 | + ret = -EAGAIN; | |
| 141 | + goto unlock; | |
| 142 | + } | |
| 143 | + | |
| 144 | + reply_size = header->message_size - sizeof(*header); | |
| 145 | + if (reply_size > msg_out_size_max) { | |
| 146 | + drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%ld)\n", | |
| 147 | + reply_size, msg_out_size_max); | |
| 148 | + reply_size = msg_out_size_max; | |
| 149 | + } | |
| 150 | + | |
| 151 | + if (msg_out) | |
| 152 | + memcpy(msg_out, exec_res->pkt_vaddr + PXP43_MAX_HECI_INOUT_SIZE + sizeof(*header), | |
| 153 | + reply_size); | |
| 154 | + if (msg_out_len) | |
| 155 | + *msg_out_len = reply_size; | |
| 156 | + | |
| 157 | +unlock: | |
| 158 | + mutex_unlock(&pxp->tee_mutex); | |
| 159 | + return ret; | |
| 160 | +} | |
| 161 | + | |
| 162 | +static int | |
| 163 | +gsccs_send_message_retry_complete(struct intel_pxp *pxp, | |
| 164 | + void *msg_in, size_t msg_in_size, | |
| 165 | + void *msg_out, size_t msg_out_size_max, | |
| 166 | + size_t *msg_out_len) | |
| 167 | +{ | |
| 168 | + u64 gsc_session_retry = 0; | |
| 169 | + int ret, tries = 0; | |
| 170 | + | |
| 171 | + /* | |
| 172 | + * Keep sending request if GSC firmware was busy. Based on fw specs + | |
| 173 | + * sw overhead (and testing) we expect a worst case pending-bit delay of | |
| 174 | + * GSC_PENDING_RETRY_MAXCOUNT x GSC_PENDING_RETRY_PAUSE_MS millisecs. | |
| 175 | + */ | |
| 176 | + do { | |
| 177 | + ret = gsccs_send_message(pxp, msg_in, msg_in_size, msg_out, msg_out_size_max, | |
| 178 | + msg_out_len, &gsc_session_retry); | |
| 179 | + /* Only try again if gsc says so */ | |
| 180 | + if (ret != -EAGAIN) | |
| 181 | + break; | |
| 182 | + | |
| 183 | + msleep(GSC_PENDING_RETRY_PAUSE_MS); | |
| 184 | + } while (++tries < GSC_PENDING_RETRY_MAXCOUNT); | |
| 185 | + | |
| 186 | + return ret; | |
| 187 | +} | |
| 188 | + | |
| 189 | +bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp) | |
| 190 | +{ | |
| 191 | + /* | |
| 192 | + * GSC-fw loading, HuC-fw loading, HuC-fw authentication and | |
| 193 | + * GSC-proxy init flow (requiring an mei component driver) | |
| 194 | + * must all occur first before we can start requesting for PXP | |
| 195 | + * sessions. Checking for completion on HuC authentication and | |
| 196 | + * gsc-proxy init flow (the last set of dependencies that | |
| 197 | + * are out of order) will suffice. | |
| 198 | + */ | |
| 199 | + if (intel_huc_is_authenticated(&pxp->ctrl_gt->uc.huc) && | |
| 200 | + intel_gsc_uc_fw_proxy_init_done(&pxp->ctrl_gt->uc.gsc)) | |
| 201 | + return true; | |
| 202 | + | |
| 203 | + return false; | |
| 204 | +} | |
| 205 | + | |
| 206 | +int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, | |
| 207 | + int arb_session_id) | |
| 208 | +{ | |
| 209 | + struct drm_i915_private *i915 = pxp->ctrl_gt->i915; | |
| 210 | + struct pxp43_create_arb_in msg_in = {0}; | |
| 211 | + struct pxp43_create_arb_out msg_out = {0}; | |
| 212 | + int ret; | |
| 213 | + | |
| 214 | + msg_in.header.api_version = PXP_APIVER(4, 3); | |
| 215 | + msg_in.header.command_id = PXP43_CMDID_INIT_SESSION; | |
| 216 | + msg_in.header.stream_id = (FIELD_PREP(PXP43_INIT_SESSION_APPID, arb_session_id) | | |
| 217 | + FIELD_PREP(PXP43_INIT_SESSION_VALID, 1) | | |
| 218 | + FIELD_PREP(PXP43_INIT_SESSION_APPTYPE, 0)); | |
| 219 | + msg_in.header.buffer_len = sizeof(msg_in) - sizeof(msg_in.header); | |
| 220 | + msg_in.protection_mode = PXP43_INIT_SESSION_PROTECTION_ARB; | |
| 221 | + | |
| 222 | + ret = gsccs_send_message_retry_complete(pxp, | |
| 223 | + &msg_in, sizeof(msg_in), | |
| 224 | + &msg_out, sizeof(msg_out), NULL); | |
| 225 | + if (ret) { | |
| 226 | + drm_err(&i915->drm, "Failed to init session %d, ret=[%d]\n", arb_session_id, ret); | |
| 227 | + } else if (msg_out.header.status != 0) { | |
| 228 | + if (is_fw_err_platform_config(msg_out.header.status)) { | |
| 229 | + drm_info_once(&i915->drm, | |
| 230 | + "PXP init-session-%d failed due to BIOS/SOC:0x%08x:%s\n", | |
| 231 | + arb_session_id, msg_out.header.status, | |
| 232 | + fw_err_to_string(msg_out.header.status)); | |
| 233 | + } else { | |
| 234 | + drm_dbg(&i915->drm, "PXP init-session-%d failed 0x%08x:%st:\n", | |
| 235 | + arb_session_id, msg_out.header.status, | |
| 236 | + fw_err_to_string(msg_out.header.status)); | |
| 237 | + drm_dbg(&i915->drm, " cmd-detail: ID=[0x%08x],API-Ver-[0x%08x]\n", | |
| 238 | + msg_in.header.command_id, msg_in.header.api_version); | |
| 239 | + } | |
| 240 | + } | |
| 241 | + | |
| 242 | + return ret; | |
| 243 | +} | |
| 244 | + | |
| 245 | +void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 session_id) | |
| 246 | +{ | |
| 247 | + struct drm_i915_private *i915 = pxp->ctrl_gt->i915; | |
| 248 | + struct pxp42_inv_stream_key_in msg_in = {0}; | |
| 249 | + struct pxp42_inv_stream_key_out msg_out = {0}; | |
| 250 | + int ret = 0; | |
| 251 | + | |
| 252 | + /* | |
| 253 | + * Stream key invalidation reuses the same version 4.2 input/output | |
| 254 | + * command format but firmware requires 4.3 API interaction | |
| 255 | + */ | |
| 256 | + msg_in.header.api_version = PXP_APIVER(4, 3); | |
| 257 | + msg_in.header.command_id = PXP42_CMDID_INVALIDATE_STREAM_KEY; | |
| 258 | + msg_in.header.buffer_len = sizeof(msg_in) - sizeof(msg_in.header); | |
| 259 | + | |
| 260 | + msg_in.header.stream_id = FIELD_PREP(PXP_CMDHDR_EXTDATA_SESSION_VALID, 1); | |
| 261 | + msg_in.header.stream_id |= FIELD_PREP(PXP_CMDHDR_EXTDATA_APP_TYPE, 0); | |
| 262 | + msg_in.header.stream_id |= FIELD_PREP(PXP_CMDHDR_EXTDATA_SESSION_ID, session_id); | |
| 263 | + | |
| 264 | + ret = gsccs_send_message_retry_complete(pxp, | |
| 265 | + &msg_in, sizeof(msg_in), | |
| 266 | + &msg_out, sizeof(msg_out), NULL); | |
| 267 | + if (ret) { | |
| 268 | + drm_err(&i915->drm, "Failed to inv-stream-key-%u, ret=[%d]\n", | |
| 269 | + session_id, ret); | |
| 270 | + } else if (msg_out.header.status != 0) { | |
| 271 | + if (is_fw_err_platform_config(msg_out.header.status)) { | |
| 272 | + drm_info_once(&i915->drm, | |
| 273 | + "PXP inv-stream-key-%u failed due to BIOS/SOC :0x%08x:%s\n", | |
| 274 | + session_id, msg_out.header.status, | |
| 275 | + fw_err_to_string(msg_out.header.status)); | |
| 276 | + } else { | |
| 277 | + drm_dbg(&i915->drm, "PXP inv-stream-key-%u failed 0x%08x:%s:\n", | |
| 278 | + session_id, msg_out.header.status, | |
| 279 | + fw_err_to_string(msg_out.header.status)); | |
| 280 | + drm_dbg(&i915->drm, " cmd-detail: ID=[0x%08x],API-Ver-[0x%08x]\n", | |
| 281 | + msg_in.header.command_id, msg_in.header.api_version); | |
| 282 | + } | |
| 283 | + } | |
| 284 | +} | |
| 285 | + | |
| 286 | +static void | |
| 287 | +gsccs_cleanup_fw_host_session_handle(struct intel_pxp *pxp) | |
| 288 | +{ | |
| 289 | + struct drm_i915_private *i915 = pxp->ctrl_gt->i915; | |
| 290 | + int ret; | |
| 291 | + | |
| 292 | + ret = gsccs_send_message_retry_complete(pxp, NULL, 0, NULL, 0, NULL); | |
| 293 | + if (ret) | |
| 294 | + drm_dbg(&i915->drm, "Failed to send gsccs msg host-session-cleanup: ret=[%d]\n", | |
| 295 | + ret); | |
| 296 | +} | |
| 297 | + | |
| 298 | +static void | |
| 299 | +gsccs_destroy_execution_resource(struct intel_pxp *pxp) | |
| 300 | +{ | |
| 301 | + struct gsccs_session_resources *exec_res = &pxp->gsccs_res; | |
| 302 | + | |
| 303 | + if (exec_res->host_session_handle) | |
| 304 | + gsccs_cleanup_fw_host_session_handle(pxp); | |
| 305 | + if (exec_res->ce) | |
| 306 | + intel_context_put(exec_res->ce); | |
| 307 | + if (exec_res->bb_vma) | |
| 308 | + i915_vma_unpin_and_release(&exec_res->bb_vma, I915_VMA_RELEASE_MAP); | |
| 309 | + if (exec_res->pkt_vma) | |
| 310 | + i915_vma_unpin_and_release(&exec_res->pkt_vma, I915_VMA_RELEASE_MAP); | |
| 311 | + | |
| 312 | + memset(exec_res, 0, sizeof(*exec_res)); | |
| 313 | +} | |
| 314 | + | |
| 315 | +static int | |
| 316 | +gsccs_create_buffer(struct intel_gt *gt, | |
| 317 | + const char *bufname, size_t size, | |
| 318 | + struct i915_vma **vma, void **map) | |
| 319 | +{ | |
| 320 | + struct drm_i915_private *i915 = gt->i915; | |
| 321 | + struct drm_i915_gem_object *obj; | |
| 322 | + int err = 0; | |
| 323 | + | |
| 324 | + obj = i915_gem_object_create_internal(i915, size); | |
| 325 | + if (IS_ERR(obj)) { | |
| 326 | + drm_err(&i915->drm, "Failed to allocate gsccs backend %s.\n", bufname); | |
| 327 | + err = PTR_ERR(obj); | |
| 328 | + goto out_none; | |
| 329 | + } | |
| 330 | + | |
| 331 | + *vma = i915_vma_instance(obj, gt->vm, NULL); | |
| 332 | + if (IS_ERR(*vma)) { | |
| 333 | + drm_err(&i915->drm, "Failed to vma-instance gsccs backend %s.\n", bufname); | |
| 334 | + err = PTR_ERR(*vma); | |
| 335 | + goto out_put; | |
| 336 | + } | |
| 337 | + | |
| 338 | + /* return a virtual pointer */ | |
| 339 | + *map = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true)); | |
| 340 | + if (IS_ERR(*map)) { | |
| 341 | + drm_err(&i915->drm, "Failed to map gsccs backend %s.\n", bufname); | |
| 342 | + err = PTR_ERR(*map); | |
| 343 | + goto out_put; | |
| 344 | + } | |
| 345 | + | |
| 346 | + /* all PXP sessions commands are treated as non-privileged */ | |
| 347 | + err = i915_vma_pin(*vma, 0, 0, PIN_USER); | |
| 348 | + if (err) { | |
| 349 | + drm_err(&i915->drm, "Failed to vma-pin gsccs backend %s.\n", bufname); | |
| 350 | + goto out_unmap; | |
| 351 | + } | |
| 352 | + | |
| 353 | + return 0; | |
| 354 | + | |
| 355 | +out_unmap: | |
| 356 | + i915_gem_object_unpin_map(obj); | |
| 357 | +out_put: | |
| 358 | + i915_gem_object_put(obj); | |
| 359 | +out_none: | |
| 360 | + *vma = NULL; | |
| 361 | + *map = NULL; | |
| 362 | + | |
| 363 | + return err; | |
| 364 | +} | |
| 365 | + | |
| 366 | +static int | |
| 367 | +gsccs_allocate_execution_resource(struct intel_pxp *pxp) | |
| 368 | +{ | |
| 369 | + struct intel_gt *gt = pxp->ctrl_gt; | |
| 370 | + struct gsccs_session_resources *exec_res = &pxp->gsccs_res; | |
| 371 | + struct intel_engine_cs *engine = gt->engine[GSC0]; | |
| 372 | + struct intel_context *ce; | |
| 373 | + int err = 0; | |
| 374 | + | |
| 375 | + /* | |
| 376 | + * First, ensure the GSC engine is present. | |
| 377 | + * NOTE: Backend would only be called with the correct gt. | |
| 378 | + */ | |
| 379 | + if (!engine) | |
| 380 | + return -ENODEV; | |
| 381 | + | |
| 382 | + /* | |
| 383 | + * Now, allocate, pin and map two objects, one for the heci message packet | |
| 384 | + * and another for the batch buffer we submit into GSC engine (that includes the packet). | |
| 385 | + * NOTE: GSC-CS backend is currently only supported on MTL, so we allocate shmem. | |
| 386 | + */ | |
| 387 | + err = gsccs_create_buffer(pxp->ctrl_gt, "Heci Packet", | |
| 388 | + 2 * PXP43_MAX_HECI_INOUT_SIZE, | |
| 389 | + &exec_res->pkt_vma, &exec_res->pkt_vaddr); | |
| 390 | + if (err) | |
| 391 | + return err; | |
| 392 | + | |
| 393 | + err = gsccs_create_buffer(pxp->ctrl_gt, "Batch Buffer", PAGE_SIZE, | |
| 394 | + &exec_res->bb_vma, &exec_res->bb_vaddr); | |
| 395 | + if (err) | |
| 396 | + goto free_pkt; | |
| 397 | + | |
| 398 | + /* Finally, create an intel_context to be used during the submission */ | |
| 399 | + ce = intel_context_create(engine); | |
| 400 | + if (IS_ERR(ce)) { | |
| 401 | + drm_err(>->i915->drm, "Failed creating gsccs backend ctx\n"); | |
| 402 | + err = PTR_ERR(ce); | |
| 403 | + goto free_batch; | |
| 404 | + } | |
| 405 | + | |
| 406 | + i915_vm_put(ce->vm); | |
| 407 | + ce->vm = i915_vm_get(pxp->ctrl_gt->vm); | |
| 408 | + exec_res->ce = ce; | |
| 409 | + | |
| 410 | + /* initialize host-session-handle (for all i915-to-gsc-firmware PXP cmds) */ | |
| 411 | + get_random_bytes(&exec_res->host_session_handle, sizeof(exec_res->host_session_handle)); | |
| 412 | + | |
| 413 | + return 0; | |
| 414 | + | |
| 415 | +free_batch: | |
| 416 | + i915_vma_unpin_and_release(&exec_res->bb_vma, I915_VMA_RELEASE_MAP); | |
| 417 | +free_pkt: | |
| 418 | + i915_vma_unpin_and_release(&exec_res->pkt_vma, I915_VMA_RELEASE_MAP); | |
| 419 | + memset(exec_res, 0, sizeof(*exec_res)); | |
| 420 | + | |
| 421 | + return err; | |
| 422 | +} | |
| 423 | + | |
| 424 | +void intel_pxp_gsccs_fini(struct intel_pxp *pxp) | |
| 425 | +{ | |
| 426 | + intel_wakeref_t wakeref; | |
| 427 | + | |
| 428 | + gsccs_destroy_execution_resource(pxp); | |
| 429 | + with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref) | |
| 430 | + intel_pxp_fini_hw(pxp); | |
| 431 | +} | |
| 432 | + | |
| 433 | +int intel_pxp_gsccs_init(struct intel_pxp *pxp) | |
| 434 | +{ | |
| 435 | + int ret; | |
| 436 | + intel_wakeref_t wakeref; | |
| 437 | + | |
| 438 | + ret = gsccs_allocate_execution_resource(pxp); | |
| 439 | + if (!ret) { | |
| 440 | + with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref) | |
| 441 | + intel_pxp_init_hw(pxp); | |
| 442 | + } | |
| 443 | + return ret; | |
| 444 | +} | |
| @@ -0,0 +1,43 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | +/* | |
| 3 | + * Copyright(c) 2022, Intel Corporation. All rights reserved. | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#ifndef __INTEL_PXP_GSCCS_H__ | |
| 7 | +#define __INTEL_PXP_GSCCS_H__ | |
| 8 | + | |
| 9 | +#include <linux/types.h> | |
| 10 | + | |
| 11 | +struct intel_pxp; | |
| 12 | + | |
| 13 | +#define GSC_REPLY_LATENCY_MS 210 | |
| 14 | +/* | |
| 15 | + * Max FW response time is 200ms, to which we add 10ms to account for overhead | |
| 16 | + * such as request preparation, GuC submission to hw and pipeline completion times. | |
| 17 | + */ | |
| 18 | +#define GSC_PENDING_RETRY_MAXCOUNT 40 | |
| 19 | +#define GSC_PENDING_RETRY_PAUSE_MS 50 | |
| 20 | +#define GSCFW_MAX_ROUND_TRIP_LATENCY_MS (GSC_PENDING_RETRY_MAXCOUNT * GSC_PENDING_RETRY_PAUSE_MS) | |
| 21 | + | |
| 22 | +#ifdef CONFIG_DRM_I915_PXP | |
| 23 | +void intel_pxp_gsccs_fini(struct intel_pxp *pxp); | |
| 24 | +int intel_pxp_gsccs_init(struct intel_pxp *pxp); | |
| 25 | + | |
| 26 | +int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, int arb_session_id); | |
| 27 | +void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id); | |
| 28 | + | |
| 29 | +#else | |
| 30 | +static inline void intel_pxp_gsccs_fini(struct intel_pxp *pxp) | |
| 31 | +{ | |
| 32 | +} | |
| 33 | + | |
| 34 | +static inline int intel_pxp_gsccs_init(struct intel_pxp *pxp) | |
| 35 | +{ | |
| 36 | + return 0; | |
| 37 | +} | |
| 38 | + | |
| 39 | +#endif | |
| 40 | + | |
| 41 | +bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp); | |
| 42 | + | |
| 43 | +#endif /*__INTEL_PXP_GSCCS_H__ */ | |
| @@ -43,8 +43,9 @@ void intel_pxp_resume_complete(struct intel_pxp *pxp) · 42 unmodified lines | ||
| 43 | 43 | * The PXP component gets automatically unbound when we go into S3 and |
| 44 | 44 | * re-bound after we come out, so in that scenario we can defer the |
| 45 | 45 | * hw init to the bind call. |
| 46 | + * NOTE: GSC-CS backend doesn't rely on components. | |
| 46 | 47 | */ |
| 47 | − if (!pxp->pxp_component) | |
| 48 | + if (!HAS_ENGINE(pxp->ctrl_gt, GSC0) && !pxp->pxp_component) | |
| 48 | 49 | return; |
| 49 | 50 | |
| 50 | 51 | intel_pxp_init_hw(pxp); |
| @@ -0,0 +1,27 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | +/* | |
| 3 | + * Copyright(c) 2023, Intel Corporation. All rights reserved. | |
| 4 | + */ | |
| 5 | + | |
| 6 | +#ifndef __INTEL_PXP_REGS_H__ | |
| 7 | +#define __INTEL_PXP_REGS_H__ | |
| 8 | + | |
| 9 | +#include "i915_reg_defs.h" | |
| 10 | + | |
| 11 | +/* KCR subsystem register base address */ | |
| 12 | +#define GEN12_KCR_BASE 0x32000 | |
| 13 | +#define MTL_KCR_BASE 0x386000 | |
| 14 | + | |
| 15 | +/* KCR enable/disable control */ | |
| 16 | +#define KCR_INIT(base) _MMIO((base) + 0xf0) | |
| 17 | + | |
| 18 | +/* Setting KCR Init bit is required after system boot */ | |
| 19 | +#define KCR_INIT_ALLOW_DISPLAY_ME_WRITES REG_BIT(14) | |
| 20 | + | |
| 21 | +/* KCR hwdrm session in play status 0-31 */ | |
| 22 | +#define KCR_SIP(base) _MMIO((base) + 0x260) | |
| 23 | + | |
| 24 | +/* PXP global terminate register for session termination */ | |
| 25 | +#define KCR_GLOBAL_TERMINATE(base) _MMIO((base) + 0xf8) | |
| 26 | + | |
| 27 | +#endif /* __INTEL_PXP_REGS_H__ */ | |
| @@ -7,17 +7,14 @@ · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | #include "intel_pxp.h" |
| 9 | 9 | #include "intel_pxp_cmd.h" |
| 10 | +#include "intel_pxp_gsccs.h" | |
| 10 | 11 | #include "intel_pxp_session.h" |
| 11 | 12 | #include "intel_pxp_tee.h" |
| 12 | 13 | #include "intel_pxp_types.h" |
| 14 | +#include "intel_pxp_regs.h" | |
| 13 | 15 | |
| 14 | 16 | #define ARB_SESSION I915_PROTECTED_CONTENT_DEFAULT_SESSION /* shorter define */ |
| 15 | 17 | |
| 16 | −#define GEN12_KCR_SIP _MMIO(0x32260) /* KCR hwdrm session in play 0-31 */ | |
| 17 | − | |
| 18 | −/* PXP global terminate register for session termination */ | |
| 19 | −#define PXP_GLOBAL_TERMINATE _MMIO(0x320f8) | |
| 20 | − | |
| 21 | 18 | static bool intel_pxp_session_is_in_play(struct intel_pxp *pxp, u32 id) |
| 22 | 19 | { |
| 23 | 20 | struct intel_uncore *uncore = pxp->ctrl_gt->uncore; |
| @@ -26,7 +23,7 @@ static bool intel_pxp_session_is_in_play(struct intel_pxp *pxp, u32 id) · 2 unmodified lines | ||
| 26 | 23 | |
| 27 | 24 | /* if we're suspended the session is considered off */ |
| 28 | 25 | with_intel_runtime_pm_if_in_use(uncore->rpm, wakeref) |
| 29 | − sip = intel_uncore_read(uncore, GEN12_KCR_SIP); | |
| 26 | + sip = intel_uncore_read(uncore, KCR_SIP(pxp->kcr_base)); | |
| 30 | 27 | |
| 31 | 28 | return sip & BIT(id); |
| 32 | 29 | } |
| @@ -44,10 +41,10 @@ static int pxp_wait_for_session_state(struct intel_pxp *pxp, u32 id, bool in_pla · 11 unmodified lines | ||
| 44 | 41 | return in_play ? -ENODEV : 0; |
| 45 | 42 | |
| 46 | 43 | ret = intel_wait_for_register(uncore, |
| 47 | − GEN12_KCR_SIP, | |
| 44 | + KCR_SIP(pxp->kcr_base), | |
| 48 | 45 | mask, |
| 49 | 46 | in_play ? mask : 0, |
| 50 | − 100); | |
| 47 | + 250); | |
| 51 | 48 | |
| 52 | 49 | intel_runtime_pm_put(uncore->rpm, wakeref); |
| 53 | 50 | |
| @@ -66,7 +63,10 @@ static int pxp_create_arb_session(struct intel_pxp *pxp) · 12 unmodified lines | ||
| 66 | 63 | return -EEXIST; |
| 67 | 64 | } |
| 68 | 65 | |
| 69 | − ret = intel_pxp_tee_cmd_create_arb_session(pxp, ARB_SESSION); | |
| 66 | + if (HAS_ENGINE(pxp->ctrl_gt, GSC0)) | |
| 67 | + ret = intel_pxp_gsccs_create_session(pxp, ARB_SESSION); | |
| 68 | + else | |
| 69 | + ret = intel_pxp_tee_cmd_create_arb_session(pxp, ARB_SESSION); | |
| 70 | 70 | if (ret) { |
| 71 | 71 | drm_err(>->i915->drm, "tee cmd for arb session creation failed\n"); |
| 72 | 72 | return ret; |
| @@ -108,9 +108,12 @@ static int pxp_terminate_arb_session_and_global(struct intel_pxp *pxp) · 35 unmodified lines | ||
| 108 | 108 | return ret; |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | − intel_uncore_write(gt->uncore, PXP_GLOBAL_TERMINATE, 1); | |
| 111 | + intel_uncore_write(gt->uncore, KCR_GLOBAL_TERMINATE(pxp->kcr_base), 1); | |
| 112 | 112 | |
| 113 | − intel_pxp_tee_end_arb_fw_session(pxp, ARB_SESSION); | |
| 113 | + if (HAS_ENGINE(gt, GSC0)) | |
| 114 | + intel_pxp_gsccs_end_arb_fw_session(pxp, ARB_SESSION); | |
| 115 | + else | |
| 116 | + intel_pxp_tee_end_arb_fw_session(pxp, ARB_SESSION); | |
| 114 | 117 | |
| 115 | 118 | return ret; |
| 116 | 119 | } |
| @@ -284,8 +284,6 @@ int intel_pxp_tee_component_init(struct intel_pxp *pxp) · 283 unmodified lines | ||
| 284 | 284 | struct intel_gt *gt = pxp->ctrl_gt; |
| 285 | 285 | struct drm_i915_private *i915 = gt->i915; |
| 286 | 286 | |
| 287 | − mutex_init(&pxp->tee_mutex); | |
| 288 | − | |
| 289 | 287 | ret = alloc_streaming_command(pxp); |
| 290 | 288 | if (ret) |
| 291 | 289 | return ret; |
| @@ -26,6 +26,26 @@ struct intel_pxp { · 25 unmodified lines | ||
| 26 | 26 | */ |
| 27 | 27 | struct intel_gt *ctrl_gt; |
| 28 | 28 | |
| 29 | + /** | |
| 30 | + * @kcr_base: base mmio offset for the KCR engine which is different on legacy platforms | |
| 31 | + * vs newer platforms where the KCR is inside the media-tile. | |
| 32 | + */ | |
| 33 | + u32 kcr_base; | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * @gsccs_res: resources for request submission for platforms that have a GSC engine. | |
| 37 | + */ | |
| 38 | + struct gsccs_session_resources { | |
| 39 | + u64 host_session_handle; /* used by firmware to link commands to sessions */ | |
| 40 | + struct intel_context *ce; /* context for gsc command submission */ | |
| 41 | + | |
| 42 | + struct i915_vma *pkt_vma; /* GSC FW cmd packet vma */ | |
| 43 | + void *pkt_vaddr; /* GSC FW cmd packet virt pointer */ | |
| 44 | + | |
| 45 | + struct i915_vma *bb_vma; /* HECI_PKT batch buffer vma */ | |
| 46 | + void *bb_vaddr; /* HECI_PKT batch buffer virt pointer */ | |
| 47 | + } gsccs_res; | |
| 48 | + | |
| 29 | 49 | /** |
| 30 | 50 | * @pxp_component: i915_pxp_component struct of the bound mei_pxp |
| 31 | 51 | * module. Only set and cleared inside component bind/unbind functions, |
| @@ -33,7 +53,9 @@ struct intel_pxp { · 1 unmodified line | ||
| 33 | 53 | */ |
| 34 | 54 | struct i915_pxp_component *pxp_component; |
| 35 | 55 | |
| 36 | − /* @dev_link: Enforce module relationship for power management ordering. */ | |
| 56 | + /** | |
| 57 | + * @dev_link: Enforce module relationship for power management ordering. | |
| 58 | + */ | |
| 37 | 59 | struct device_link *dev_link; |
| 38 | 60 | /** |
| 39 | 61 | * @pxp_component_added: track if the pxp component has been added. |
| @@ -57,7 +57,10 @@ static void trash_stolen(struct drm_i915_private *i915) · 56 unmodified lines | ||
| 57 | 57 | u32 __iomem *s; |
| 58 | 58 | int x; |
| 59 | 59 | |
| 60 | − ggtt->vm.insert_page(&ggtt->vm, dma, slot, I915_CACHE_NONE, 0); | |
| 60 | + ggtt->vm.insert_page(&ggtt->vm, dma, slot, | |
| 61 | + i915_gem_get_pat_index(i915, | |
| 62 | + I915_CACHE_NONE), | |
| 63 | + 0); | |
| 61 | 64 | |
| 62 | 65 | s = io_mapping_map_atomic_wc(&ggtt->iomap, slot); |
| 63 | 66 | for (x = 0; x < PAGE_SIZE / sizeof(u32); x++) { |
| @@ -27,6 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | #include "gem/selftests/igt_gem_utils.h" |
| 28 | 28 | #include "gem/selftests/mock_context.h" |
| 29 | 29 | #include "gt/intel_gt.h" |
| 30 | +#include "gt/intel_gt_print.h" | |
| 30 | 31 | |
| 31 | 32 | #include "i915_selftest.h" |
| 32 | 33 | |
| @@ -245,7 +246,7 @@ static int igt_evict_for_cache_color(void *arg) · 212 unmodified lines | ||
| 245 | 246 | struct drm_mm_node target = { |
| 246 | 247 | .start = I915_GTT_PAGE_SIZE * 2, |
| 247 | 248 | .size = I915_GTT_PAGE_SIZE, |
| 248 | − .color = I915_CACHE_LLC, | |
| 249 | + .color = i915_gem_get_pat_index(gt->i915, I915_CACHE_LLC), | |
| 249 | 250 | }; |
| 250 | 251 | struct drm_i915_gem_object *obj; |
| 251 | 252 | struct i915_vma *vma; |
| @@ -308,7 +309,7 @@ static int igt_evict_for_cache_color(void *arg) · 56 unmodified lines | ||
| 308 | 309 | /* Attempt to remove the first *pinned* vma, by removing the (empty) |
| 309 | 310 | * neighbour -- this should fail. |
| 310 | 311 | */ |
| 311 | − target.color = I915_CACHE_L3_LLC; | |
| 312 | + target.color = i915_gem_get_pat_index(gt->i915, I915_CACHE_L3_LLC); | |
| 312 | 313 | |
| 313 | 314 | mutex_lock(&ggtt->vm.mutex); |
| 314 | 315 | err = i915_gem_evict_for_node(&ggtt->vm, NULL, &target, 0); |
| @@ -507,7 +508,8 @@ static int igt_evict_contexts(void *arg) · 192 unmodified lines | ||
| 507 | 508 | } |
| 508 | 509 | err = intel_gt_wait_for_idle(engine->gt, HZ * 3); |
| 509 | 510 | if (err) { |
| 510 | − pr_err("Failed to idle GT (on %s)", engine->name); | |
| 511 | + gt_err(engine->gt, "Failed to idle GT (on %s)", | |
| 512 | + engine->name); | |
| 511 | 513 | break; |
| 512 | 514 | } |
| 513 | 515 | } |
| @@ -135,7 +135,7 @@ fake_dma_object(struct drm_i915_private *i915, u64 size) · 134 unmodified lines | ||
| 135 | 135 | |
| 136 | 136 | obj->write_domain = I915_GEM_DOMAIN_CPU; |
| 137 | 137 | obj->read_domains = I915_GEM_DOMAIN_CPU; |
| 138 | − obj->cache_level = I915_CACHE_NONE; | |
| 138 | + obj->pat_index = i915_gem_get_pat_index(i915, I915_CACHE_NONE); | |
| 139 | 139 | |
| 140 | 140 | /* Preallocate the "backing storage" */ |
| 141 | 141 | if (i915_gem_object_pin_pages_unlocked(obj)) |
| @@ -359,7 +359,9 @@ alloc_vm_end: · 217 unmodified lines | ||
| 359 | 359 | |
| 360 | 360 | with_intel_runtime_pm(vm->gt->uncore->rpm, wakeref) |
| 361 | 361 | vm->insert_entries(vm, mock_vma_res, |
| 362 | − I915_CACHE_NONE, 0); | |
| 362 | + i915_gem_get_pat_index(vm->i915, | |
| 363 | + I915_CACHE_NONE), | |
| 364 | + 0); | |
| 363 | 365 | } |
| 364 | 366 | count = n; |
| 365 | 367 | |
| @@ -1377,7 +1379,10 @@ static int igt_ggtt_page(void *arg) · 1011 unmodified lines | ||
| 1377 | 1379 | |
| 1378 | 1380 | ggtt->vm.insert_page(&ggtt->vm, |
| 1379 | 1381 | i915_gem_object_get_dma_address(obj, 0), |
| 1380 | − offset, I915_CACHE_NONE, 0); | |
| 1382 | + offset, | |
| 1383 | + i915_gem_get_pat_index(i915, | |
| 1384 | + I915_CACHE_NONE), | |
| 1385 | + 0); | |
| 1381 | 1386 | } |
| 1382 | 1387 | |
| 1383 | 1388 | order = i915_random_order(count, &prng); |
| @@ -1510,7 +1515,7 @@ static int reserve_gtt_with_resource(struct i915_vma *vma, u64 offset) · 126 unmodified lines | ||
| 1510 | 1515 | mutex_lock(&vm->mutex); |
| 1511 | 1516 | err = i915_gem_gtt_reserve(vm, NULL, &vma->node, obj->base.size, |
| 1512 | 1517 | offset, |
| 1513 | − obj->cache_level, | |
| 1518 | + obj->pat_index, | |
| 1514 | 1519 | 0); |
| 1515 | 1520 | if (!err) { |
| 1516 | 1521 | i915_vma_resource_init_from_vma(vma_res, vma); |
| @@ -1690,7 +1695,7 @@ static int insert_gtt_with_resource(struct i915_vma *vma) · 173 unmodified lines | ||
| 1690 | 1695 | |
| 1691 | 1696 | mutex_lock(&vm->mutex); |
| 1692 | 1697 | err = i915_gem_gtt_insert(vm, NULL, &vma->node, obj->base.size, 0, |
| 1693 | − obj->cache_level, 0, vm->total, 0); | |
| 1698 | + obj->pat_index, 0, vm->total, 0); | |
| 1694 | 1699 | if (!err) { |
| 1695 | 1700 | i915_vma_resource_init_from_vma(vma_res, vma); |
| 1696 | 1701 | vma->resource = vma_res; |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | |
| 7 | 7 | #include "i915_drv.h" |
| 8 | 8 | #include "gt/intel_gt.h" |
| 9 | +#include "gt/intel_gt_print.h" | |
| 9 | 10 | |
| 10 | 11 | #include "../i915_selftest.h" |
| 11 | 12 | #include "igt_flush_test.h" |
| @@ -16,27 +17,31 @@ int igt_live_test_begin(struct igt_live_test *t, · 4 unmodified lines | ||
| 16 | 17 | const char *func, |
| 17 | 18 | const char *name) |
| 18 | 19 | { |
| 19 | − struct intel_gt *gt = to_gt(i915); | |
| 20 | 20 | struct intel_engine_cs *engine; |
| 21 | 21 | enum intel_engine_id id; |
| 22 | + struct intel_gt *gt; | |
| 23 | + unsigned int i; | |
| 22 | 24 | int err; |
| 23 | 25 | |
| 24 | 26 | t->i915 = i915; |
| 25 | 27 | t->func = func; |
| 26 | 28 | t->name = name; |
| 27 | 29 | |
| 28 | − err = intel_gt_wait_for_idle(gt, MAX_SCHEDULE_TIMEOUT); | |
| 29 | − if (err) { | |
| 30 | − pr_err("%s(%s): failed to idle before, with err=%d!", | |
| 31 | − func, name, err); | |
| 32 | − return err; | |
| 33 | − } | |
| 30 | + for_each_gt(gt, i915, i) { | |
| 34 | 31 | |
| 35 | − t->reset_global = i915_reset_count(&i915->gpu_error); | |
| 32 | + err = intel_gt_wait_for_idle(gt, MAX_SCHEDULE_TIMEOUT); | |
| 33 | + if (err) { | |
| 34 | + gt_err(gt, "%s(%s): GT failed to idle before, with err=%d!", | |
| 35 | + func, name, err); | |
| 36 | + return err; | |
| 37 | + } | |
| 36 | 38 | |
| 37 | − for_each_engine(engine, gt, id) | |
| 38 | − t->reset_engine[id] = | |
| 39 | + for_each_engine(engine, gt, id) | |
| 40 | + t->reset_engine[id] = | |
| 39 | 41 | i915_reset_engine_count(&i915->gpu_error, engine); |
| 42 | + } | |
| 43 | + | |
| 44 | + t->reset_global = i915_reset_count(&i915->gpu_error); | |
| 40 | 45 | |
| 41 | 46 | return 0; |
| 42 | 47 | } |
| @@ -46,6 +51,8 @@ int igt_live_test_end(struct igt_live_test *t) · 3 unmodified lines | ||
| 46 | 51 | struct drm_i915_private *i915 = t->i915; |
| 47 | 52 | struct intel_engine_cs *engine; |
| 48 | 53 | enum intel_engine_id id; |
| 54 | + struct intel_gt *gt; | |
| 55 | + unsigned int i; | |
| 49 | 56 | |
| 50 | 57 | if (igt_flush_test(i915)) |
| 51 | 58 | return -EIO; |
| @@ -57,16 +64,18 @@ int igt_live_test_end(struct igt_live_test *t) · 5 unmodified lines | ||
| 57 | 64 | return -EIO; |
| 58 | 65 | } |
| 59 | 66 | |
| 60 | − for_each_engine(engine, to_gt(i915), id) { | |
| 61 | − if (t->reset_engine[id] == | |
| 62 | − i915_reset_engine_count(&i915->gpu_error, engine)) | |
| 63 | − continue; | |
| 67 | + for_each_gt(gt, i915, i) { | |
| 68 | + for_each_engine(engine, gt, id) { | |
| 69 | + if (t->reset_engine[id] == | |
| 70 | + i915_reset_engine_count(&i915->gpu_error, engine)) | |
| 71 | + continue; | |
| 64 | 72 | |
| 65 | − pr_err("%s(%s): engine '%s' was reset %d times!\n", | |
| 66 | − t->func, t->name, engine->name, | |
| 67 | − i915_reset_engine_count(&i915->gpu_error, engine) - | |
| 68 | − t->reset_engine[id]); | |
| 69 | − return -EIO; | |
| 73 | + gt_err(gt, "%s(%s): engine '%s' was reset %d times!\n", | |
| 74 | + t->func, t->name, engine->name, | |
| 75 | + i915_reset_engine_count(&i915->gpu_error, engine) - | |
| 76 | + t->reset_engine[id]); | |
| 77 | + return -EIO; | |
| 78 | + } | |
| 70 | 79 | } |
| 71 | 80 | |
| 72 | 81 | return 0; |
| @@ -1070,7 +1070,9 @@ static int igt_lmem_write_cpu(void *arg) · 1069 unmodified lines | ||
| 1070 | 1070 | /* Put the pages into a known state -- from the gpu for added fun */ |
| 1071 | 1071 | intel_engine_pm_get(engine); |
| 1072 | 1072 | err = intel_context_migrate_clear(engine->gt->migrate.context, NULL, |
| 1073 | − obj->mm.pages->sgl, I915_CACHE_NONE, | |
| 1073 | + obj->mm.pages->sgl, | |
| 1074 | + i915_gem_get_pat_index(i915, | |
| 1075 | + I915_CACHE_NONE), | |
| 1074 | 1076 | true, 0xdeadbeaf, &rq); |
| 1075 | 1077 | if (rq) { |
| 1076 | 1078 | dma_resv_add_fence(obj->base.resv, &rq->fence, |
| @@ -123,7 +123,9 @@ struct drm_i915_private *mock_gem_device(void) · 122 unmodified lines | ||
| 123 | 123 | static struct dev_iommu fake_iommu = { .priv = (void *)-1 }; |
| 124 | 124 | #endif |
| 125 | 125 | struct drm_i915_private *i915; |
| 126 | + struct intel_device_info *i915_info; | |
| 126 | 127 | struct pci_dev *pdev; |
| 128 | + unsigned int i; | |
| 127 | 129 | int ret; |
| 128 | 130 | |
| 129 | 131 | pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); |
| @@ -180,6 +182,13 @@ struct drm_i915_private *mock_gem_device(void) · 50 unmodified lines | ||
| 180 | 182 | I915_GTT_PAGE_SIZE_2M; |
| 181 | 183 | |
| 182 | 184 | RUNTIME_INFO(i915)->memory_regions = REGION_SMEM; |
| 185 | + | |
| 186 | + /* simply use legacy cache level for mock device */ | |
| 187 | + i915_info = (struct intel_device_info *)INTEL_INFO(i915); | |
| 188 | + i915_info->max_pat_index = 3; | |
| 189 | + for (i = 0; i < I915_MAX_CACHE_LEVEL; i++) | |
| 190 | + i915_info->cachelevel_to_pat[i] = i; | |
| 191 | + | |
| 183 | 192 | intel_memory_regions_hw_probe(i915); |
| 184 | 193 | |
| 185 | 194 | spin_lock_init(&i915->gpu_error.lock); |
| @@ -27,21 +27,21 @@ · 26 unmodified lines | ||
| 27 | 27 | static void mock_insert_page(struct i915_address_space *vm, |
| 28 | 28 | dma_addr_t addr, |
| 29 | 29 | u64 offset, |
| 30 | − enum i915_cache_level level, | |
| 30 | + unsigned int pat_index, | |
| 31 | 31 | u32 flags) |
| 32 | 32 | { |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | static void mock_insert_entries(struct i915_address_space *vm, |
| 36 | 36 | struct i915_vma_resource *vma_res, |
| 37 | − enum i915_cache_level level, u32 flags) | |
| 37 | + unsigned int pat_index, u32 flags) | |
| 38 | 38 | { |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | static void mock_bind_ppgtt(struct i915_address_space *vm, |
| 42 | 42 | struct i915_vm_pt_stash *stash, |
| 43 | 43 | struct i915_vma_resource *vma_res, |
| 44 | − enum i915_cache_level cache_level, | |
| 44 | + unsigned int pat_index, | |
| 45 | 45 | u32 flags) |
| 46 | 46 | { |
| 47 | 47 | GEM_BUG_ON(flags & I915_VMA_GLOBAL_BIND); |
| @@ -94,7 +94,7 @@ struct i915_ppgtt *mock_ppgtt(struct drm_i915_private *i915, const char *name) · 46 unmodified lines | ||
| 94 | 94 | static void mock_bind_ggtt(struct i915_address_space *vm, |
| 95 | 95 | struct i915_vm_pt_stash *stash, |
| 96 | 96 | struct i915_vma_resource *vma_res, |
| 97 | − enum i915_cache_level cache_level, | |
| 97 | + unsigned int pat_index, | |
| 98 | 98 | u32 flags) |
| 99 | 99 | { |
| 100 | 100 | } |
| @@ -400,8 +400,8 @@ static int imx_lcdc_probe(struct platform_device *pdev) · 399 unmodified lines | ||
| 400 | 400 | |
| 401 | 401 | lcdc = devm_drm_dev_alloc(dev, &imx_lcdc_drm_driver, |
| 402 | 402 | struct imx_lcdc, drm); |
| 403 | − if (!lcdc) | |
| 404 | − return -ENOMEM; | |
| 403 | + if (IS_ERR(lcdc)) | |
| 404 | + return PTR_ERR(lcdc); | |
| 405 | 405 | |
| 406 | 406 | drm = &lcdc->drm; |
| 407 | 407 | |
| @@ -285,7 +285,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) · 284 unmodified lines | ||
| 285 | 285 | * Remove early framebuffers (ie. simplefb). The framebuffer can be |
| 286 | 286 | * located anywhere in RAM |
| 287 | 287 | */ |
| 288 | − ret = drm_aperture_remove_framebuffers(false, &meson_driver); | |
| 288 | + ret = drm_aperture_remove_framebuffers(&meson_driver); | |
| 289 | 289 | if (ret) |
| 290 | 290 | goto free_drm; |
| 291 | 291 | |
| @@ -186,7 +186,7 @@ union meson_hdmi_venc_mode { · 185 unmodified lines | ||
| 186 | 186 | } encp; |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | −union meson_hdmi_venc_mode meson_hdmi_enci_mode_480i = { | |
| 189 | +static union meson_hdmi_venc_mode meson_hdmi_enci_mode_480i = { | |
| 190 | 190 | .enci = { |
| 191 | 191 | .hso_begin = 5, |
| 192 | 192 | .hso_end = 129, |
| @@ -206,7 +206,7 @@ union meson_hdmi_venc_mode meson_hdmi_enci_mode_480i = { · 13 unmodified lines | ||
| 206 | 206 | }, |
| 207 | 207 | }; |
| 208 | 208 | |
| 209 | −union meson_hdmi_venc_mode meson_hdmi_enci_mode_576i = { | |
| 209 | +static union meson_hdmi_venc_mode meson_hdmi_enci_mode_576i = { | |
| 210 | 210 | .enci = { |
| 211 | 211 | .hso_begin = 3, |
| 212 | 212 | .hso_end = 129, |
| @@ -226,7 +226,7 @@ union meson_hdmi_venc_mode meson_hdmi_enci_mode_576i = { · 13 unmodified lines | ||
| 226 | 226 | }, |
| 227 | 227 | }; |
| 228 | 228 | |
| 229 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_480p = { | |
| 229 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_480p = { | |
| 230 | 230 | .encp = { |
| 231 | 231 | .dvi_settings = 0x21, |
| 232 | 232 | .video_mode = 0x4000, |
| @@ -272,7 +272,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_480p = { · 39 unmodified lines | ||
| 272 | 272 | }, |
| 273 | 273 | }; |
| 274 | 274 | |
| 275 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_576p = { | |
| 275 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_576p = { | |
| 276 | 276 | .encp = { |
| 277 | 277 | .dvi_settings = 0x21, |
| 278 | 278 | .video_mode = 0x4000, |
| @@ -318,7 +318,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_576p = { · 39 unmodified lines | ||
| 318 | 318 | }, |
| 319 | 319 | }; |
| 320 | 320 | |
| 321 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p60 = { | |
| 321 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p60 = { | |
| 322 | 322 | .encp = { |
| 323 | 323 | .dvi_settings = 0x2029, |
| 324 | 324 | .video_mode = 0x4040, |
| @@ -360,7 +360,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p60 = { · 35 unmodified lines | ||
| 360 | 360 | }, |
| 361 | 361 | }; |
| 362 | 362 | |
| 363 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p50 = { | |
| 363 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p50 = { | |
| 364 | 364 | .encp = { |
| 365 | 365 | .dvi_settings = 0x202d, |
| 366 | 366 | .video_mode = 0x4040, |
| @@ -405,7 +405,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_720p50 = { · 38 unmodified lines | ||
| 405 | 405 | }, |
| 406 | 406 | }; |
| 407 | 407 | |
| 408 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i60 = { | |
| 408 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i60 = { | |
| 409 | 409 | .encp = { |
| 410 | 410 | .dvi_settings = 0x2029, |
| 411 | 411 | .video_mode = 0x5ffc, |
| @@ -454,7 +454,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i60 = { · 42 unmodified lines | ||
| 454 | 454 | }, |
| 455 | 455 | }; |
| 456 | 456 | |
| 457 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i50 = { | |
| 457 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i50 = { | |
| 458 | 458 | .encp = { |
| 459 | 459 | .dvi_settings = 0x202d, |
| 460 | 460 | .video_mode = 0x5ffc, |
| @@ -503,7 +503,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080i50 = { · 42 unmodified lines | ||
| 503 | 503 | }, |
| 504 | 504 | }; |
| 505 | 505 | |
| 506 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p24 = { | |
| 506 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p24 = { | |
| 507 | 507 | .encp = { |
| 508 | 508 | .dvi_settings = 0xd, |
| 509 | 509 | .video_mode = 0x4040, |
| @@ -552,7 +552,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p24 = { · 42 unmodified lines | ||
| 552 | 552 | }, |
| 553 | 553 | }; |
| 554 | 554 | |
| 555 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p30 = { | |
| 555 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p30 = { | |
| 556 | 556 | .encp = { |
| 557 | 557 | .dvi_settings = 0x1, |
| 558 | 558 | .video_mode = 0x4040, |
| @@ -596,7 +596,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p30 = { · 37 unmodified lines | ||
| 596 | 596 | }, |
| 597 | 597 | }; |
| 598 | 598 | |
| 599 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p50 = { | |
| 599 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p50 = { | |
| 600 | 600 | .encp = { |
| 601 | 601 | .dvi_settings = 0xd, |
| 602 | 602 | .video_mode = 0x4040, |
| @@ -644,7 +644,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p50 = { · 41 unmodified lines | ||
| 644 | 644 | }, |
| 645 | 645 | }; |
| 646 | 646 | |
| 647 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p60 = { | |
| 647 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p60 = { | |
| 648 | 648 | .encp = { |
| 649 | 649 | .dvi_settings = 0x1, |
| 650 | 650 | .video_mode = 0x4040, |
| @@ -688,7 +688,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_1080p60 = { · 37 unmodified lines | ||
| 688 | 688 | }, |
| 689 | 689 | }; |
| 690 | 690 | |
| 691 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p24 = { | |
| 691 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p24 = { | |
| 692 | 692 | .encp = { |
| 693 | 693 | .dvi_settings = 0x1, |
| 694 | 694 | .video_mode = 0x4040, |
| @@ -730,7 +730,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p24 = { · 35 unmodified lines | ||
| 730 | 730 | }, |
| 731 | 731 | }; |
| 732 | 732 | |
| 733 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p25 = { | |
| 733 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p25 = { | |
| 734 | 734 | .encp = { |
| 735 | 735 | .dvi_settings = 0x1, |
| 736 | 736 | .video_mode = 0x4040, |
| @@ -772,7 +772,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p25 = { · 35 unmodified lines | ||
| 772 | 772 | }, |
| 773 | 773 | }; |
| 774 | 774 | |
| 775 | −union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p30 = { | |
| 775 | +static union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p30 = { | |
| 776 | 776 | .encp = { |
| 777 | 777 | .dvi_settings = 0x1, |
| 778 | 778 | .video_mode = 0x4040, |
| @@ -814,7 +814,7 @@ union meson_hdmi_venc_mode meson_hdmi_encp_mode_2160p30 = { · 35 unmodified lines | ||
| 814 | 814 | }, |
| 815 | 815 | }; |
| 816 | 816 | |
| 817 | −struct meson_hdmi_venc_vic_mode { | |
| 817 | +static struct meson_hdmi_venc_vic_mode { | |
| 818 | 818 | unsigned int vic; |
| 819 | 819 | union meson_hdmi_venc_mode *mode; |
| 820 | 820 | } meson_hdmi_venc_vic_modes[] = { |
| @@ -455,7 +455,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv) · 454 unmodified lines | ||
| 455 | 455 | goto err_deinit_vram; |
| 456 | 456 | |
| 457 | 457 | /* the fw fb could be anywhere in memory */ |
| 458 | − ret = drm_aperture_remove_framebuffers(false, drv); | |
| 458 | + ret = drm_aperture_remove_framebuffers(drv); | |
| 459 | 459 | if (ret) |
| 460 | 460 | goto err_msm_uninit; |
| 461 | 461 | |
| @@ -121,9 +121,9 @@ static int msm_fbdev_create(struct drm_fb_helper *helper, · 120 unmodified lines | ||
| 121 | 121 | |
| 122 | 122 | drm_fb_helper_fill_info(fbi, helper, sizes); |
| 123 | 123 | |
| 124 | − fbi->screen_base = msm_gem_get_vaddr(bo); | |
| 125 | − if (IS_ERR(fbi->screen_base)) { | |
| 126 | − ret = PTR_ERR(fbi->screen_base); | |
| 124 | + fbi->screen_buffer = msm_gem_get_vaddr(bo); | |
| 125 | + if (IS_ERR(fbi->screen_buffer)) { | |
| 126 | + ret = PTR_ERR(fbi->screen_buffer); | |
| 127 | 127 | goto fail; |
| 128 | 128 | } |
| 129 | 129 | fbi->screen_size = bo->size; |
| @@ -64,6 +64,7 @@ · 63 unmodified lines | ||
| 64 | 64 | #include "nouveau_connector.h" |
| 65 | 65 | #include "nouveau_encoder.h" |
| 66 | 66 | #include "nouveau_fence.h" |
| 67 | +#include "nv50_display.h" | |
| 67 | 68 | |
| 68 | 69 | #include <subdev/bios/dp.h> |
| 69 | 70 | |
| @@ -2,6 +2,8 @@ · 1 unmodified line | ||
| 2 | 2 | #ifndef __NVIF_IF0012_H__ |
| 3 | 3 | #define __NVIF_IF0012_H__ |
| 4 | 4 | |
| 5 | +#include <drm/display/drm_dp.h> | |
| 6 | + | |
| 5 | 7 | union nvif_outp_args { |
| 6 | 8 | struct nvif_outp_v0 { |
| 7 | 9 | __u8 version; |
| @@ -63,7 +65,7 @@ union nvif_outp_acquire_args { · 55 unmodified lines | ||
| 63 | 65 | __u8 hda; |
| 64 | 66 | __u8 mst; |
| 65 | 67 | __u8 pad04[4]; |
| 66 | − __u8 dpcd[16]; | |
| 68 | + __u8 dpcd[DP_RECEIVER_CAP_SIZE]; | |
| 67 | 69 | } dp; |
| 68 | 70 | }; |
| 69 | 71 | } v0; |
| @@ -73,13 +73,14 @@ nouveau_debugfs_pstate_get(struct seq_file *m, void *data) · 72 unmodified lines | ||
| 73 | 73 | { |
| 74 | 74 | struct drm_device *drm = m->private; |
| 75 | 75 | struct nouveau_debugfs *debugfs = nouveau_debugfs(drm); |
| 76 | − struct nvif_object *ctrl = &debugfs->ctrl; | |
| 76 | + struct nvif_object *ctrl; | |
| 77 | 77 | struct nvif_control_pstate_info_v0 info = {}; |
| 78 | 78 | int ret, i; |
| 79 | 79 | |
| 80 | 80 | if (!debugfs) |
| 81 | 81 | return -ENODEV; |
| 82 | 82 | |
| 83 | + ctrl = &debugfs->ctrl; | |
| 83 | 84 | ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_INFO, &info, sizeof(info)); |
| 84 | 85 | if (ret) |
| 85 | 86 | return ret; |
| @@ -119,19 +120,19 @@ nouveau_debugfs_pstate_get(struct seq_file *m, void *data) · 33 unmodified lines | ||
| 119 | 120 | |
| 120 | 121 | if (state >= 0) { |
| 121 | 122 | if (info.ustate_ac == state) |
| 122 | − seq_printf(m, " AC"); | |
| 123 | + seq_puts(m, " AC"); | |
| 123 | 124 | if (info.ustate_dc == state) |
| 124 | − seq_printf(m, " DC"); | |
| 125 | + seq_puts(m, " DC"); | |
| 125 | 126 | if (info.pstate == state) |
| 126 | − seq_printf(m, " *"); | |
| 127 | + seq_puts(m, " *"); | |
| 127 | 128 | } else { |
| 128 | 129 | if (info.ustate_ac < -1) |
| 129 | − seq_printf(m, " AC"); | |
| 130 | + seq_puts(m, " AC"); | |
| 130 | 131 | if (info.ustate_dc < -1) |
| 131 | − seq_printf(m, " DC"); | |
| 132 | + seq_puts(m, " DC"); | |
| 132 | 133 | } |
| 133 | 134 | |
| 134 | − seq_printf(m, "\n"); | |
| 135 | + seq_putc(m, '\n'); | |
| 135 | 136 | } |
| 136 | 137 | |
| 137 | 138 | return 0; |
| @@ -144,7 +145,6 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, · 6 unmodified lines | ||
| 144 | 145 | struct seq_file *m = file->private_data; |
| 145 | 146 | struct drm_device *drm = m->private; |
| 146 | 147 | struct nouveau_debugfs *debugfs = nouveau_debugfs(drm); |
| 147 | − struct nvif_object *ctrl = &debugfs->ctrl; | |
| 148 | 148 | struct nvif_control_pstate_user_v0 args = { .pwrsrc = -EINVAL }; |
| 149 | 149 | char buf[32] = {}, *tmp, *cur = buf; |
| 150 | 150 | long value, ret; |
| @@ -188,7 +188,8 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf, · 37 unmodified lines | ||
| 188 | 188 | return ret; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | − ret = nvif_mthd(ctrl, NVIF_CONTROL_PSTATE_USER, &args, sizeof(args)); | |
| 191 | + ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER, | |
| 192 | + &args, sizeof(args)); | |
| 192 | 193 | pm_runtime_put_autosuspend(drm->dev); |
| 193 | 194 | if (ret < 0) |
| 194 | 195 | return ret; |
| @@ -211,7 +211,7 @@ static const struct attribute_group temp1_auto_point_sensor_group = { · 210 unmodified lines | ||
| 211 | 211 | |
| 212 | 212 | #define N_ATTR_GROUPS 3 |
| 213 | 213 | |
| 214 | −static const struct hwmon_channel_info *nouveau_info[] = { | |
| 214 | +static const struct hwmon_channel_info * const nouveau_info[] = { | |
| 215 | 215 | HWMON_CHANNEL_INFO(chip, |
| 216 | 216 | HWMON_C_UPDATE_INTERVAL), |
| 217 | 217 | HWMON_CHANNEL_INFO(temp, |
| @@ -31,7 +31,5 @@ · 30 unmodified lines | ||
| 31 | 31 | #include "nouveau_reg.h" |
| 32 | 32 | |
| 33 | 33 | int nv50_display_create(struct drm_device *); |
| 34 | −void nv50_display_destroy(struct drm_device *); | |
| 35 | −int nv50_display_init(struct drm_device *); | |
| 36 | −void nv50_display_fini(struct drm_device *); | |
| 34 | + | |
| 37 | 35 | #endif /* __NV50_DISPLAY_H__ */ |
| @@ -3,6 +3,7 @@ · 2 unmodified lines | ||
| 3 | 3 | #define __NVKM_DISP_OUTP_H__ |
| 4 | 4 | #include "priv.h" |
| 5 | 5 | |
| 6 | +#include <drm/display/drm_dp.h> | |
| 6 | 7 | #include <subdev/bios.h> |
| 7 | 8 | #include <subdev/bios/dcb.h> |
| 8 | 9 | #include <subdev/bios/dp.h> |
| @@ -42,7 +43,7 @@ struct nvkm_outp { · 33 unmodified lines | ||
| 42 | 43 | bool aux_pwr_pu; |
| 43 | 44 | u8 lttpr[6]; |
| 44 | 45 | u8 lttprs; |
| 45 | − u8 dpcd[16]; | |
| 46 | + u8 dpcd[DP_RECEIVER_CAP_SIZE]; | |
| 46 | 47 | |
| 47 | 48 | struct { |
| 48 | 49 | int dpcd; /* -1, or index into SUPPORTED_LINK_RATES table */ |
| @@ -146,7 +146,7 @@ nvkm_uoutp_mthd_release(struct nvkm_outp *outp, void *argv, u32 argc) · 145 unmodified lines | ||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | static int |
| 149 | −nvkm_uoutp_mthd_acquire_dp(struct nvkm_outp *outp, u8 dpcd[16], | |
| 149 | +nvkm_uoutp_mthd_acquire_dp(struct nvkm_outp *outp, u8 dpcd[DP_RECEIVER_CAP_SIZE], | |
| 150 | 150 | u8 link_nr, u8 link_bw, bool hda, bool mst) |
| 151 | 151 | { |
| 152 | 152 | int ret; |
| @@ -59,7 +59,6 @@ int · 58 unmodified lines | ||
| 59 | 59 | nvbios_power_budget_header(struct nvkm_bios *bios, |
| 60 | 60 | struct nvbios_power_budget *budget) |
| 61 | 61 | { |
| 62 | − struct nvkm_subdev *subdev = &bios->subdev; | |
| 63 | 62 | u8 ver, hdr, cnt, len, cap_entry; |
| 64 | 63 | u32 header; |
| 65 | 64 | |
| @@ -82,7 +81,7 @@ nvbios_power_budget_header(struct nvkm_bios *bios, · 16 unmodified lines | ||
| 82 | 81 | } |
| 83 | 82 | |
| 84 | 83 | if (cap_entry >= cnt && cap_entry != 0xff) { |
| 85 | − nvkm_warn(subdev, | |
| 84 | + nvkm_warn(&bios->subdev, | |
| 86 | 85 | "invalid cap_entry in power budget table found\n"); |
| 87 | 86 | budget->cap_entry = 0xff; |
| 88 | 87 | return -EINVAL; |
| @@ -417,7 +417,6 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx) · 416 unmodified lines | ||
| 417 | 417 | return 0; |
| 418 | 418 | |
| 419 | 419 | pstate = kzalloc(sizeof(*pstate), GFP_KERNEL); |
| 420 | − cstate = &pstate->base; | |
| 421 | 420 | if (!pstate) |
| 422 | 421 | return -ENOMEM; |
| 423 | 422 | |
| @@ -427,6 +426,7 @@ nvkm_pstate_new(struct nvkm_clk *clk, int idx) · 3 unmodified lines | ||
| 427 | 426 | pstate->fanspeed = perfE.fanspeed; |
| 428 | 427 | pstate->pcie_speed = perfE.pcie_speed; |
| 429 | 428 | pstate->pcie_width = perfE.pcie_width; |
| 429 | + cstate = &pstate->base; | |
| 430 | 430 | cstate->voltage = perfE.voltage; |
| 431 | 431 | cstate->domain[nv_clk_src_core] = perfE.core; |
| 432 | 432 | cstate->domain[nv_clk_src_shader] = perfE.shader; |
| @@ -45,7 +45,7 @@ ga102_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif) · 44 unmodified lines | ||
| 45 | 45 | return 0; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | −struct nvkm_gsp_fwif | |
| 48 | +static struct nvkm_gsp_fwif | |
| 49 | 49 | ga102_gsps[] = { |
| 50 | 50 | { -1, ga102_gsp_nofw, &ga102_gsp }, |
| 51 | 51 | {} |
| @@ -114,18 +114,17 @@ nvkm_pcie_init(struct nvkm_pci *pci) · 113 unmodified lines | ||
| 114 | 114 | int |
| 115 | 115 | nvkm_pcie_set_link(struct nvkm_pci *pci, enum nvkm_pcie_speed speed, u8 width) |
| 116 | 116 | { |
| 117 | − struct nvkm_subdev *subdev = &pci->subdev; | |
| 117 | + struct nvkm_subdev *subdev; | |
| 118 | 118 | enum nvkm_pcie_speed cur_speed, max_speed; |
| 119 | − struct pci_bus *pbus; | |
| 120 | 119 | int ret; |
| 121 | 120 | |
| 122 | 121 | if (!pci || !pci_is_pcie(pci->pdev)) |
| 123 | 122 | return 0; |
| 124 | − pbus = pci->pdev->bus; | |
| 125 | 123 | |
| 126 | 124 | if (!pci->func->pcie.set_link) |
| 127 | 125 | return -ENOSYS; |
| 128 | 126 | |
| 127 | + subdev = &pci->subdev; | |
| 129 | 128 | nvkm_trace(subdev, "requested %s\n", nvkm_pcie_speeds[speed]); |
| 130 | 129 | |
| 131 | 130 | if (pci->func->pcie.version(pci) < 2) { |
| @@ -134,7 +133,7 @@ nvkm_pcie_set_link(struct nvkm_pci *pci, enum nvkm_pcie_speed speed, u8 width) · 2 unmodified lines | ||
| 134 | 133 | } |
| 135 | 134 | |
| 136 | 135 | cur_speed = pci->func->pcie.cur_speed(pci); |
| 137 | − max_speed = min(nvkm_pcie_speed(pbus->max_bus_speed), | |
| 136 | + max_speed = min(nvkm_pcie_speed(pci->pdev->bus->max_bus_speed), | |
| 138 | 137 | pci->func->pcie.max_speed(pci)); |
| 139 | 138 | |
| 140 | 139 | nvkm_trace(subdev, "current speed: %s\n", nvkm_pcie_speeds[cur_speed]); |
| @@ -98,10 +98,10 @@ nvkm_fanpwm_create(struct nvkm_therm *therm, struct dcb_gpio_func *func) · 97 unmodified lines | ||
| 98 | 98 | return -ENODEV; |
| 99 | 99 | |
| 100 | 100 | fan = kzalloc(sizeof(*fan), GFP_KERNEL); |
| 101 | − therm->fan = &fan->base; | |
| 102 | 101 | if (!fan) |
| 103 | 102 | return -ENOMEM; |
| 104 | 103 | |
| 104 | + therm->fan = &fan->base; | |
| 105 | 105 | fan->base.type = "PWM"; |
| 106 | 106 | fan->base.get = nvkm_fanpwm_get; |
| 107 | 107 | fan->base.set = nvkm_fanpwm_set; |
| @@ -100,10 +100,10 @@ nvkm_fantog_create(struct nvkm_therm *therm, struct dcb_gpio_func *func) · 99 unmodified lines | ||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | fan = kzalloc(sizeof(*fan), GFP_KERNEL); |
| 103 | − therm->fan = &fan->base; | |
| 104 | 103 | if (!fan) |
| 105 | 104 | return -ENOMEM; |
| 106 | 105 | |
| 106 | + therm->fan = &fan->base; | |
| 107 | 107 | fan->base.type = "toggle"; |
| 108 | 108 | fan->base.get = nvkm_fantog_get; |
| 109 | 109 | fan->base.set = nvkm_fantog_set; |
| @@ -553,6 +553,13 @@ config DRM_PANEL_SAMSUNG_S6D27A1 · 552 unmodified lines | ||
| 553 | 553 | This panel can be found in Samsung Galaxy Ace 2 |
| 554 | 554 | GT-I8160 mobile phone. |
| 555 | 555 | |
| 556 | +config DRM_PANEL_SAMSUNG_S6D7AA0 | |
| 557 | + tristate "Samsung S6D7AA0 MIPI-DSI video mode panel controller" | |
| 558 | + depends on OF | |
| 559 | + depends on BACKLIGHT_CLASS_DEVICE | |
| 560 | + select DRM_MIPI_DSI | |
| 561 | + select VIDEOMODE_HELPERS | |
| 562 | + | |
| 556 | 563 | config DRM_PANEL_SAMSUNG_S6E3HA2 |
| 557 | 564 | tristate "Samsung S6E3HA2 DSI video mode panel" |
| 558 | 565 | depends on OF |
| @@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o · 53 unmodified lines | ||
| 54 | 54 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o |
| 55 | 55 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o |
| 56 | 56 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o |
| 57 | +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o | |
| 57 | 58 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o |
| 58 | 59 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o |
| 59 | 60 | obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o |
| @@ -36,6 +36,7 @@ struct panel_desc { · 35 unmodified lines | ||
| 36 | 36 | const struct panel_init_cmd *init_cmds; |
| 37 | 37 | unsigned int lanes; |
| 38 | 38 | bool discharge_on_disable; |
| 39 | + bool lp11_before_reset; | |
| 39 | 40 | }; |
| 40 | 41 | |
| 41 | 42 | struct boe_panel { |
| @@ -451,11 +452,14 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 409 unmodified lines | ||
| 451 | 452 | _INIT_DCS_CMD(0xFF, 0x20), |
| 452 | 453 | _INIT_DCS_CMD(0xFB, 0x01), |
| 453 | 454 | _INIT_DCS_CMD(0x05, 0xD1), |
| 454 | − _INIT_DCS_CMD(0x0D, 0x63), | |
| 455 | − _INIT_DCS_CMD(0x07, 0x8C), | |
| 455 | + _INIT_DCS_CMD(0x06, 0xC0), | |
| 456 | + _INIT_DCS_CMD(0x07, 0x87), | |
| 456 | 457 | _INIT_DCS_CMD(0x08, 0x4B), |
| 458 | + | |
| 459 | + _INIT_DCS_CMD(0x0D, 0x63), | |
| 457 | 460 | _INIT_DCS_CMD(0x0E, 0x91), |
| 458 | 461 | _INIT_DCS_CMD(0x0F, 0x69), |
| 462 | + _INIT_DCS_CMD(0x94, 0x00), | |
| 459 | 463 | _INIT_DCS_CMD(0x95, 0xF5), |
| 460 | 464 | _INIT_DCS_CMD(0x96, 0xF5), |
| 461 | 465 | _INIT_DCS_CMD(0x9D, 0x00), |
| @@ -463,98 +467,96 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 1 unmodified line | ||
| 463 | 467 | _INIT_DCS_CMD(0x69, 0x98), |
| 464 | 468 | _INIT_DCS_CMD(0x75, 0xA2), |
| 465 | 469 | _INIT_DCS_CMD(0x77, 0xB3), |
| 470 | + | |
| 471 | + _INIT_DCS_CMD(0x58, 0x43), | |
| 466 | 472 | _INIT_DCS_CMD(0xFF, 0x24), |
| 467 | 473 | _INIT_DCS_CMD(0xFB, 0x01), |
| 468 | 474 | _INIT_DCS_CMD(0x91, 0x44), |
| 469 | − _INIT_DCS_CMD(0x92, 0x7A), | |
| 470 | − _INIT_DCS_CMD(0x93, 0x1A), | |
| 471 | − _INIT_DCS_CMD(0x94, 0x40), | |
| 472 | − _INIT_DCS_CMD(0x9A, 0x08), | |
| 475 | + _INIT_DCS_CMD(0x92, 0x4C), | |
| 476 | + _INIT_DCS_CMD(0x94, 0x86), | |
| 473 | 477 | _INIT_DCS_CMD(0x60, 0x96), |
| 474 | 478 | _INIT_DCS_CMD(0x61, 0xD0), |
| 475 | 479 | _INIT_DCS_CMD(0x63, 0x70), |
| 476 | − _INIT_DCS_CMD(0xC2, 0xCF), | |
| 477 | − _INIT_DCS_CMD(0x9B, 0x0F), | |
| 478 | − _INIT_DCS_CMD(0x9A, 0x08), | |
| 480 | + _INIT_DCS_CMD(0xC2, 0xCA), | |
| 481 | + | |
| 479 | 482 | _INIT_DCS_CMD(0x00, 0x03), |
| 480 | 483 | _INIT_DCS_CMD(0x01, 0x03), |
| 481 | 484 | _INIT_DCS_CMD(0x02, 0x03), |
| 482 | − _INIT_DCS_CMD(0x03, 0x03), | |
| 483 | − _INIT_DCS_CMD(0x04, 0x03), | |
| 484 | − _INIT_DCS_CMD(0x05, 0x03), | |
| 485 | − _INIT_DCS_CMD(0x06, 0x22), | |
| 486 | − _INIT_DCS_CMD(0x07, 0x06), | |
| 487 | − _INIT_DCS_CMD(0x08, 0x00), | |
| 488 | − _INIT_DCS_CMD(0x09, 0x1D), | |
| 489 | − _INIT_DCS_CMD(0x0A, 0x1C), | |
| 490 | − _INIT_DCS_CMD(0x0B, 0x13), | |
| 491 | − _INIT_DCS_CMD(0x0C, 0x12), | |
| 492 | − _INIT_DCS_CMD(0x0D, 0x11), | |
| 493 | − _INIT_DCS_CMD(0x0E, 0x10), | |
| 494 | − _INIT_DCS_CMD(0x0F, 0x0F), | |
| 495 | − _INIT_DCS_CMD(0x10, 0x0E), | |
| 496 | − _INIT_DCS_CMD(0x11, 0x0D), | |
| 497 | − _INIT_DCS_CMD(0x12, 0x0C), | |
| 485 | + _INIT_DCS_CMD(0x03, 0x29), | |
| 486 | + _INIT_DCS_CMD(0x04, 0x22), | |
| 487 | + _INIT_DCS_CMD(0x05, 0x22), | |
| 488 | + _INIT_DCS_CMD(0x06, 0x0B), | |
| 489 | + _INIT_DCS_CMD(0x07, 0x1D), | |
| 490 | + _INIT_DCS_CMD(0x08, 0x1C), | |
| 491 | + _INIT_DCS_CMD(0x09, 0x05), | |
| 492 | + _INIT_DCS_CMD(0x0A, 0x08), | |
| 493 | + _INIT_DCS_CMD(0x0B, 0x09), | |
| 494 | + _INIT_DCS_CMD(0x0C, 0x0A), | |
| 495 | + _INIT_DCS_CMD(0x0D, 0x0C), | |
| 496 | + _INIT_DCS_CMD(0x0E, 0x0D), | |
| 497 | + _INIT_DCS_CMD(0x0F, 0x0E), | |
| 498 | + _INIT_DCS_CMD(0x10, 0x0F), | |
| 499 | + _INIT_DCS_CMD(0x11, 0x10), | |
| 500 | + _INIT_DCS_CMD(0x12, 0x11), | |
| 498 | 501 | _INIT_DCS_CMD(0x13, 0x04), |
| 499 | − _INIT_DCS_CMD(0x14, 0x03), | |
| 502 | + _INIT_DCS_CMD(0x14, 0x00), | |
| 500 | 503 | _INIT_DCS_CMD(0x15, 0x03), |
| 501 | 504 | _INIT_DCS_CMD(0x16, 0x03), |
| 502 | 505 | _INIT_DCS_CMD(0x17, 0x03), |
| 503 | 506 | _INIT_DCS_CMD(0x18, 0x03), |
| 504 | − _INIT_DCS_CMD(0x19, 0x03), | |
| 505 | − _INIT_DCS_CMD(0x1A, 0x03), | |
| 506 | − _INIT_DCS_CMD(0x1B, 0x03), | |
| 507 | − _INIT_DCS_CMD(0x1C, 0x22), | |
| 508 | − _INIT_DCS_CMD(0x1D, 0x06), | |
| 509 | − _INIT_DCS_CMD(0x1E, 0x00), | |
| 510 | − _INIT_DCS_CMD(0x1F, 0x1D), | |
| 511 | − _INIT_DCS_CMD(0x20, 0x1C), | |
| 512 | − _INIT_DCS_CMD(0x21, 0x13), | |
| 513 | − _INIT_DCS_CMD(0x22, 0x12), | |
| 514 | − _INIT_DCS_CMD(0x23, 0x11), | |
| 515 | − _INIT_DCS_CMD(0x24, 0x10), | |
| 516 | − _INIT_DCS_CMD(0x25, 0x0F), | |
| 517 | − _INIT_DCS_CMD(0x26, 0x0E), | |
| 518 | − _INIT_DCS_CMD(0x27, 0x0D), | |
| 519 | − _INIT_DCS_CMD(0x28, 0x0C), | |
| 507 | + _INIT_DCS_CMD(0x19, 0x29), | |
| 508 | + _INIT_DCS_CMD(0x1A, 0x22), | |
| 509 | + _INIT_DCS_CMD(0x1B, 0x22), | |
| 510 | + _INIT_DCS_CMD(0x1C, 0x0B), | |
| 511 | + _INIT_DCS_CMD(0x1D, 0x1D), | |
| 512 | + _INIT_DCS_CMD(0x1E, 0x1C), | |
| 513 | + _INIT_DCS_CMD(0x1F, 0x05), | |
| 514 | + _INIT_DCS_CMD(0x20, 0x08), | |
| 515 | + _INIT_DCS_CMD(0x21, 0x09), | |
| 516 | + _INIT_DCS_CMD(0x22, 0x0A), | |
| 517 | + _INIT_DCS_CMD(0x23, 0x0C), | |
| 518 | + _INIT_DCS_CMD(0x24, 0x0D), | |
| 519 | + _INIT_DCS_CMD(0x25, 0x0E), | |
| 520 | + _INIT_DCS_CMD(0x26, 0x0F), | |
| 521 | + _INIT_DCS_CMD(0x27, 0x10), | |
| 522 | + _INIT_DCS_CMD(0x28, 0x11), | |
| 520 | 523 | _INIT_DCS_CMD(0x29, 0x04), |
| 521 | − _INIT_DCS_CMD(0x2A, 0x03), | |
| 524 | + _INIT_DCS_CMD(0x2A, 0x00), | |
| 522 | 525 | _INIT_DCS_CMD(0x2B, 0x03), |
| 523 | 526 | |
| 524 | − _INIT_DCS_CMD(0x2F, 0x05), | |
| 525 | − _INIT_DCS_CMD(0x30, 0x32), | |
| 526 | − _INIT_DCS_CMD(0x31, 0x43), | |
| 527 | − _INIT_DCS_CMD(0x33, 0x05), | |
| 528 | − _INIT_DCS_CMD(0x34, 0x32), | |
| 529 | − _INIT_DCS_CMD(0x35, 0x43), | |
| 530 | − _INIT_DCS_CMD(0x37, 0x44), | |
| 531 | − _INIT_DCS_CMD(0x38, 0x40), | |
| 527 | + _INIT_DCS_CMD(0x2F, 0x0A), | |
| 528 | + _INIT_DCS_CMD(0x30, 0x35), | |
| 529 | + _INIT_DCS_CMD(0x37, 0xA7), | |
| 532 | 530 | _INIT_DCS_CMD(0x39, 0x00), |
| 533 | − _INIT_DCS_CMD(0x3A, 0x18), | |
| 534 | − _INIT_DCS_CMD(0x3B, 0x00), | |
| 535 | − _INIT_DCS_CMD(0x3D, 0x93), | |
| 536 | − _INIT_DCS_CMD(0xAB, 0x44), | |
| 537 | − _INIT_DCS_CMD(0xAC, 0x40), | |
| 531 | + _INIT_DCS_CMD(0x3A, 0x46), | |
| 532 | + _INIT_DCS_CMD(0x3B, 0x32), | |
| 533 | + _INIT_DCS_CMD(0x3D, 0x12), | |
| 534 | + | |
| 535 | + _INIT_DCS_CMD(0x3F, 0x33), | |
| 536 | + _INIT_DCS_CMD(0x40, 0x31), | |
| 537 | + _INIT_DCS_CMD(0x41, 0x40), | |
| 538 | + _INIT_DCS_CMD(0x42, 0x42), | |
| 539 | + _INIT_DCS_CMD(0x47, 0x77), | |
| 540 | + _INIT_DCS_CMD(0x48, 0x77), | |
| 541 | + _INIT_DCS_CMD(0x4A, 0x45), | |
| 542 | + _INIT_DCS_CMD(0x4B, 0x45), | |
| 543 | + _INIT_DCS_CMD(0x4C, 0x14), | |
| 538 | 544 | |
| 539 | 545 | _INIT_DCS_CMD(0x4D, 0x21), |
| 540 | 546 | _INIT_DCS_CMD(0x4E, 0x43), |
| 541 | 547 | _INIT_DCS_CMD(0x4F, 0x65), |
| 542 | − _INIT_DCS_CMD(0x50, 0x87), | |
| 543 | − _INIT_DCS_CMD(0x51, 0x78), | |
| 544 | − _INIT_DCS_CMD(0x52, 0x56), | |
| 545 | − _INIT_DCS_CMD(0x53, 0x34), | |
| 546 | − _INIT_DCS_CMD(0x54, 0x21), | |
| 547 | − _INIT_DCS_CMD(0x55, 0x83), | |
| 548 | − _INIT_DCS_CMD(0x56, 0x08), | |
| 548 | + _INIT_DCS_CMD(0x55, 0x06), | |
| 549 | + _INIT_DCS_CMD(0x56, 0x06), | |
| 549 | 550 | _INIT_DCS_CMD(0x58, 0x21), |
| 550 | − _INIT_DCS_CMD(0x59, 0x40), | |
| 551 | − _INIT_DCS_CMD(0x5A, 0x00), | |
| 552 | − _INIT_DCS_CMD(0x5B, 0x2C), | |
| 553 | − _INIT_DCS_CMD(0x5E, 0x00, 0x10), | |
| 551 | + _INIT_DCS_CMD(0x59, 0x70), | |
| 552 | + _INIT_DCS_CMD(0x5A, 0x46), | |
| 553 | + _INIT_DCS_CMD(0x5B, 0x32), | |
| 554 | + _INIT_DCS_CMD(0x5C, 0x88), | |
| 555 | + _INIT_DCS_CMD(0x5E, 0x00, 0x00), | |
| 554 | 556 | _INIT_DCS_CMD(0x5F, 0x00), |
| 555 | 557 | |
| 556 | − _INIT_DCS_CMD(0x7A, 0x00), | |
| 557 | − _INIT_DCS_CMD(0x7B, 0x00), | |
| 558 | + _INIT_DCS_CMD(0x7A, 0xFF), | |
| 559 | + _INIT_DCS_CMD(0x7B, 0xFF), | |
| 558 | 560 | _INIT_DCS_CMD(0x7C, 0x00), |
| 559 | 561 | _INIT_DCS_CMD(0x7D, 0x00), |
| 560 | 562 | _INIT_DCS_CMD(0x7E, 0x20), |
| @@ -564,152 +566,183 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 3 unmodified lines | ||
| 564 | 566 | _INIT_DCS_CMD(0x82, 0x08), |
| 565 | 567 | _INIT_DCS_CMD(0x97, 0x02), |
| 566 | 568 | _INIT_DCS_CMD(0xC5, 0x10), |
| 569 | + | |
| 570 | + _INIT_DCS_CMD(0xD7, 0x55), | |
| 571 | + _INIT_DCS_CMD(0xD8, 0x55), | |
| 572 | + _INIT_DCS_CMD(0xD9, 0x23), | |
| 567 | 573 | _INIT_DCS_CMD(0xDA, 0x05), |
| 568 | 574 | _INIT_DCS_CMD(0xDB, 0x01), |
| 569 | − _INIT_DCS_CMD(0xDC, 0x7A), | |
| 575 | + _INIT_DCS_CMD(0xDC, 0x65), | |
| 570 | 576 | _INIT_DCS_CMD(0xDD, 0x55), |
| 571 | 577 | _INIT_DCS_CMD(0xDE, 0x27), |
| 572 | 578 | _INIT_DCS_CMD(0xDF, 0x01), |
| 573 | − _INIT_DCS_CMD(0xE0, 0x7A), | |
| 579 | + _INIT_DCS_CMD(0xE0, 0x65), | |
| 574 | 580 | _INIT_DCS_CMD(0xE1, 0x01), |
| 575 | − _INIT_DCS_CMD(0xE2, 0x7A), | |
| 581 | + _INIT_DCS_CMD(0xE2, 0x65), | |
| 576 | 582 | _INIT_DCS_CMD(0xE3, 0x01), |
| 577 | − _INIT_DCS_CMD(0xE4, 0x7A), | |
| 583 | + _INIT_DCS_CMD(0xE4, 0x65), | |
| 578 | 584 | _INIT_DCS_CMD(0xE5, 0x01), |
| 579 | − _INIT_DCS_CMD(0xE6, 0x7A), | |
| 585 | + _INIT_DCS_CMD(0xE6, 0x65), | |
| 580 | 586 | _INIT_DCS_CMD(0xE7, 0x00), |
| 581 | 587 | _INIT_DCS_CMD(0xE8, 0x00), |
| 582 | 588 | _INIT_DCS_CMD(0xE9, 0x01), |
| 583 | − _INIT_DCS_CMD(0xEA, 0x7A), | |
| 589 | + _INIT_DCS_CMD(0xEA, 0x65), | |
| 584 | 590 | _INIT_DCS_CMD(0xEB, 0x01), |
| 585 | − _INIT_DCS_CMD(0xEE, 0x7A), | |
| 591 | + _INIT_DCS_CMD(0xEE, 0x65), | |
| 586 | 592 | _INIT_DCS_CMD(0xEF, 0x01), |
| 587 | − _INIT_DCS_CMD(0xF0, 0x7A), | |
| 588 | − | |
| 593 | + _INIT_DCS_CMD(0xF0, 0x65), | |
| 589 | 594 | _INIT_DCS_CMD(0xB6, 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00), |
| 595 | + | |
| 590 | 596 | _INIT_DCS_CMD(0xFF, 0x25), |
| 591 | − _INIT_DCS_CMD(0xFB, 0x01), | |
| 592 | 597 | |
| 598 | + _INIT_DCS_CMD(0xFB, 0x01), | |
| 593 | 599 | _INIT_DCS_CMD(0x05, 0x00), |
| 594 | − | |
| 595 | − _INIT_DCS_CMD(0x13, 0x02), | |
| 596 | − _INIT_DCS_CMD(0x14, 0xDF), | |
| 597 | 600 | _INIT_DCS_CMD(0xF1, 0x10), |
| 601 | + | |
| 598 | 602 | _INIT_DCS_CMD(0x1E, 0x00), |
| 599 | − _INIT_DCS_CMD(0x1F, 0x00), | |
| 600 | − _INIT_DCS_CMD(0x20, 0x2C), | |
| 603 | + _INIT_DCS_CMD(0x1F, 0x46), | |
| 604 | + _INIT_DCS_CMD(0x20, 0x32), | |
| 605 | + | |
| 601 | 606 | _INIT_DCS_CMD(0x25, 0x00), |
| 602 | − _INIT_DCS_CMD(0x26, 0x00), | |
| 603 | − _INIT_DCS_CMD(0x27, 0x2C), | |
| 607 | + _INIT_DCS_CMD(0x26, 0x46), | |
| 608 | + _INIT_DCS_CMD(0x27, 0x32), | |
| 609 | + | |
| 604 | 610 | _INIT_DCS_CMD(0x3F, 0x80), |
| 605 | 611 | _INIT_DCS_CMD(0x40, 0x00), |
| 606 | 612 | _INIT_DCS_CMD(0x43, 0x00), |
| 607 | 613 | |
| 608 | − _INIT_DCS_CMD(0x44, 0x18), | |
| 609 | − _INIT_DCS_CMD(0x45, 0x00), | |
| 614 | + _INIT_DCS_CMD(0x44, 0x46), | |
| 615 | + _INIT_DCS_CMD(0x45, 0x46), | |
| 616 | + | |
| 617 | + _INIT_DCS_CMD(0x48, 0x46), | |
| 618 | + _INIT_DCS_CMD(0x49, 0x32), | |
| 610 | 619 | |
| 611 | − _INIT_DCS_CMD(0x48, 0x00), | |
| 612 | − _INIT_DCS_CMD(0x49, 0x2C), | |
| 613 | 620 | _INIT_DCS_CMD(0x5B, 0x80), |
| 621 | + | |
| 614 | 622 | _INIT_DCS_CMD(0x5C, 0x00), |
| 615 | − _INIT_DCS_CMD(0x5D, 0x00), | |
| 616 | − _INIT_DCS_CMD(0x5E, 0x00), | |
| 617 | − _INIT_DCS_CMD(0x61, 0x00), | |
| 618 | − _INIT_DCS_CMD(0x62, 0x2C), | |
| 619 | − _INIT_DCS_CMD(0x68, 0x10), | |
| 623 | + _INIT_DCS_CMD(0x5D, 0x46), | |
| 624 | + _INIT_DCS_CMD(0x5E, 0x32), | |
| 625 | + | |
| 626 | + _INIT_DCS_CMD(0x5F, 0x46), | |
| 627 | + _INIT_DCS_CMD(0x60, 0x32), | |
| 628 | + | |
| 629 | + _INIT_DCS_CMD(0x61, 0x46), | |
| 630 | + _INIT_DCS_CMD(0x62, 0x32), | |
| 631 | + _INIT_DCS_CMD(0x68, 0x0C), | |
| 632 | + | |
| 633 | + _INIT_DCS_CMD(0x6C, 0x0D), | |
| 634 | + _INIT_DCS_CMD(0x6E, 0x0D), | |
| 635 | + _INIT_DCS_CMD(0x78, 0x00), | |
| 636 | + _INIT_DCS_CMD(0x79, 0xC5), | |
| 637 | + _INIT_DCS_CMD(0x7A, 0x0C), | |
| 638 | + _INIT_DCS_CMD(0x7B, 0xB0), | |
| 639 | + | |
| 620 | 640 | _INIT_DCS_CMD(0xFF, 0x26), |
| 621 | 641 | _INIT_DCS_CMD(0xFB, 0x01), |
| 622 | 642 | |
| 623 | 643 | _INIT_DCS_CMD(0x00, 0xA1), |
| 624 | 644 | _INIT_DCS_CMD(0x02, 0x31), |
| 625 | − _INIT_DCS_CMD(0x0A, 0xF2), | |
| 626 | − _INIT_DCS_CMD(0x04, 0x28), | |
| 645 | + _INIT_DCS_CMD(0x0A, 0xF4), | |
| 646 | + _INIT_DCS_CMD(0x04, 0x50), | |
| 627 | 647 | _INIT_DCS_CMD(0x06, 0x30), |
| 628 | 648 | _INIT_DCS_CMD(0x0C, 0x16), |
| 629 | 649 | _INIT_DCS_CMD(0x0D, 0x0D), |
| 630 | 650 | _INIT_DCS_CMD(0x0F, 0x00), |
| 631 | 651 | _INIT_DCS_CMD(0x11, 0x00), |
| 632 | 652 | _INIT_DCS_CMD(0x12, 0x50), |
| 633 | − _INIT_DCS_CMD(0x13, 0x56), | |
| 634 | − _INIT_DCS_CMD(0x14, 0x57), | |
| 653 | + _INIT_DCS_CMD(0x13, 0x40), | |
| 654 | + _INIT_DCS_CMD(0x14, 0x58), | |
| 635 | 655 | _INIT_DCS_CMD(0x15, 0x00), |
| 636 | 656 | _INIT_DCS_CMD(0x16, 0x10), |
| 637 | 657 | _INIT_DCS_CMD(0x17, 0xA0), |
| 638 | 658 | _INIT_DCS_CMD(0x18, 0x86), |
| 639 | 659 | _INIT_DCS_CMD(0x22, 0x00), |
| 640 | 660 | _INIT_DCS_CMD(0x23, 0x00), |
| 641 | − _INIT_DCS_CMD(0x19, 0x0D), | |
| 642 | − _INIT_DCS_CMD(0x1A, 0x7F), | |
| 643 | − _INIT_DCS_CMD(0x1B, 0x0C), | |
| 644 | − _INIT_DCS_CMD(0x1C, 0xBF), | |
| 645 | − _INIT_DCS_CMD(0x2A, 0x0D), | |
| 646 | − _INIT_DCS_CMD(0x2B, 0x7F), | |
| 647 | − _INIT_DCS_CMD(0x20, 0x00), | |
| 661 | + | |
| 662 | + _INIT_DCS_CMD(0x19, 0x0E), | |
| 663 | + _INIT_DCS_CMD(0x1A, 0x31), | |
| 664 | + _INIT_DCS_CMD(0x1B, 0x0D), | |
| 665 | + _INIT_DCS_CMD(0x1C, 0x29), | |
| 666 | + _INIT_DCS_CMD(0x2A, 0x0E), | |
| 667 | + _INIT_DCS_CMD(0x2B, 0x31), | |
| 648 | 668 | |
| 649 | 669 | _INIT_DCS_CMD(0x1D, 0x00), |
| 650 | − _INIT_DCS_CMD(0x1E, 0x78), | |
| 651 | − _INIT_DCS_CMD(0x1F, 0x78), | |
| 670 | + _INIT_DCS_CMD(0x1E, 0x62), | |
| 671 | + _INIT_DCS_CMD(0x1F, 0x62), | |
| 652 | 672 | |
| 653 | − _INIT_DCS_CMD(0x2F, 0x03), | |
| 654 | − _INIT_DCS_CMD(0x30, 0x78), | |
| 655 | − _INIT_DCS_CMD(0x33, 0x78), | |
| 656 | − _INIT_DCS_CMD(0x34, 0x66), | |
| 657 | − _INIT_DCS_CMD(0x35, 0x11), | |
| 673 | + _INIT_DCS_CMD(0x2F, 0x06), | |
| 674 | + _INIT_DCS_CMD(0x30, 0x62), | |
| 675 | + _INIT_DCS_CMD(0x31, 0x06), | |
| 676 | + _INIT_DCS_CMD(0x32, 0x7F), | |
| 677 | + _INIT_DCS_CMD(0x33, 0x11), | |
| 678 | + _INIT_DCS_CMD(0x34, 0x89), | |
| 679 | + _INIT_DCS_CMD(0x35, 0x67), | |
| 658 | 680 | |
| 659 | − _INIT_DCS_CMD(0x39, 0x10), | |
| 660 | − _INIT_DCS_CMD(0x3A, 0x78), | |
| 681 | + _INIT_DCS_CMD(0x39, 0x0B), | |
| 682 | + _INIT_DCS_CMD(0x3A, 0x62), | |
| 661 | 683 | _INIT_DCS_CMD(0x3B, 0x06), |
| 662 | 684 | |
| 663 | 685 | _INIT_DCS_CMD(0xC8, 0x04), |
| 664 | − _INIT_DCS_CMD(0xC9, 0x84), | |
| 686 | + _INIT_DCS_CMD(0xC9, 0x89), | |
| 665 | 687 | _INIT_DCS_CMD(0xCA, 0x4E), |
| 666 | 688 | _INIT_DCS_CMD(0xCB, 0x00), |
| 689 | + _INIT_DCS_CMD(0xA9, 0x3F), | |
| 690 | + _INIT_DCS_CMD(0xAA, 0x3E), | |
| 691 | + _INIT_DCS_CMD(0xAB, 0x3D), | |
| 692 | + _INIT_DCS_CMD(0xAC, 0x3C), | |
| 693 | + _INIT_DCS_CMD(0xAD, 0x3B), | |
| 694 | + _INIT_DCS_CMD(0xAE, 0x3A), | |
| 695 | + _INIT_DCS_CMD(0xAF, 0x39), | |
| 696 | + _INIT_DCS_CMD(0xB0, 0x38), | |
| 667 | 697 | |
| 668 | − _INIT_DCS_CMD(0xA9, 0x50), | |
| 669 | − _INIT_DCS_CMD(0xAA, 0x4F), | |
| 670 | − _INIT_DCS_CMD(0xAB, 0x4D), | |
| 671 | − _INIT_DCS_CMD(0xAC, 0x4A), | |
| 672 | − _INIT_DCS_CMD(0xAD, 0x48), | |
| 673 | − _INIT_DCS_CMD(0xAE, 0x46), | |
| 674 | 698 | _INIT_DCS_CMD(0xFF, 0x27), |
| 675 | 699 | _INIT_DCS_CMD(0xFB, 0x01), |
| 700 | + | |
| 701 | + _INIT_DCS_CMD(0xD0, 0x11), | |
| 702 | + _INIT_DCS_CMD(0xD1, 0x54), | |
| 703 | + _INIT_DCS_CMD(0xDE, 0x43), | |
| 704 | + _INIT_DCS_CMD(0xDF, 0x02), | |
| 705 | + | |
| 676 | 706 | _INIT_DCS_CMD(0xC0, 0x18), |
| 677 | 707 | _INIT_DCS_CMD(0xC1, 0x00), |
| 678 | 708 | _INIT_DCS_CMD(0xC2, 0x00), |
| 709 | + _INIT_DCS_CMD(0x00, 0x00), | |
| 710 | + _INIT_DCS_CMD(0xC3, 0x00), | |
| 679 | 711 | _INIT_DCS_CMD(0x56, 0x06), |
| 712 | + | |
| 680 | 713 | _INIT_DCS_CMD(0x58, 0x80), |
| 681 | − _INIT_DCS_CMD(0x59, 0x75), | |
| 714 | + _INIT_DCS_CMD(0x59, 0x78), | |
| 682 | 715 | _INIT_DCS_CMD(0x5A, 0x00), |
| 683 | − _INIT_DCS_CMD(0x5B, 0x02), | |
| 716 | + _INIT_DCS_CMD(0x5B, 0x18), | |
| 684 | 717 | _INIT_DCS_CMD(0x5C, 0x00), |
| 685 | − _INIT_DCS_CMD(0x5D, 0x00), | |
| 718 | + _INIT_DCS_CMD(0x5D, 0x01), | |
| 686 | 719 | _INIT_DCS_CMD(0x5E, 0x20), |
| 687 | 720 | _INIT_DCS_CMD(0x5F, 0x10), |
| 688 | 721 | _INIT_DCS_CMD(0x60, 0x00), |
| 689 | − _INIT_DCS_CMD(0x61, 0x2E), | |
| 722 | + _INIT_DCS_CMD(0x61, 0x1C), | |
| 690 | 723 | _INIT_DCS_CMD(0x62, 0x00), |
| 691 | 724 | _INIT_DCS_CMD(0x63, 0x01), |
| 692 | − _INIT_DCS_CMD(0x64, 0x43), | |
| 693 | − _INIT_DCS_CMD(0x65, 0x2D), | |
| 725 | + _INIT_DCS_CMD(0x64, 0x44), | |
| 726 | + _INIT_DCS_CMD(0x65, 0x1B), | |
| 694 | 727 | _INIT_DCS_CMD(0x66, 0x00), |
| 695 | 728 | _INIT_DCS_CMD(0x67, 0x01), |
| 696 | − _INIT_DCS_CMD(0x68, 0x43), | |
| 729 | + _INIT_DCS_CMD(0x68, 0x44), | |
| 730 | + | |
| 697 | 731 | _INIT_DCS_CMD(0x98, 0x01), |
| 698 | 732 | _INIT_DCS_CMD(0xB4, 0x03), |
| 699 | − _INIT_DCS_CMD(0x9B, 0xBD), | |
| 700 | − _INIT_DCS_CMD(0xA0, 0x90), | |
| 701 | − _INIT_DCS_CMD(0xAB, 0x1B), | |
| 702 | − _INIT_DCS_CMD(0xBC, 0x0C), | |
| 733 | + _INIT_DCS_CMD(0x9B, 0xBE), | |
| 734 | + | |
| 735 | + _INIT_DCS_CMD(0xAB, 0x14), | |
| 736 | + _INIT_DCS_CMD(0xBC, 0x08), | |
| 703 | 737 | _INIT_DCS_CMD(0xBD, 0x28), |
| 704 | 738 | |
| 705 | 739 | _INIT_DCS_CMD(0xFF, 0x2A), |
| 706 | 740 | _INIT_DCS_CMD(0xFB, 0x01), |
| 707 | − | |
| 708 | 741 | _INIT_DCS_CMD(0x22, 0x2F), |
| 709 | 742 | _INIT_DCS_CMD(0x23, 0x08), |
| 710 | 743 | |
| 711 | 744 | _INIT_DCS_CMD(0x24, 0x00), |
| 712 | − _INIT_DCS_CMD(0x25, 0x65), | |
| 745 | + _INIT_DCS_CMD(0x25, 0x62), | |
| 713 | 746 | _INIT_DCS_CMD(0x26, 0xF8), |
| 714 | 747 | _INIT_DCS_CMD(0x27, 0x00), |
| 715 | 748 | _INIT_DCS_CMD(0x28, 0x1A), |
| @@ -719,18 +752,29 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 3 unmodified lines | ||
| 719 | 752 | _INIT_DCS_CMD(0x2D, 0x1A), |
| 720 | 753 | |
| 721 | 754 | _INIT_DCS_CMD(0x64, 0x96), |
| 722 | − _INIT_DCS_CMD(0x65, 0x00), | |
| 755 | + _INIT_DCS_CMD(0x65, 0x10), | |
| 723 | 756 | _INIT_DCS_CMD(0x66, 0x00), |
| 757 | + _INIT_DCS_CMD(0x67, 0x96), | |
| 758 | + _INIT_DCS_CMD(0x68, 0x10), | |
| 759 | + _INIT_DCS_CMD(0x69, 0x00), | |
| 724 | 760 | _INIT_DCS_CMD(0x6A, 0x96), |
| 725 | − _INIT_DCS_CMD(0x6B, 0x00), | |
| 761 | + _INIT_DCS_CMD(0x6B, 0x10), | |
| 726 | 762 | _INIT_DCS_CMD(0x6C, 0x00), |
| 727 | 763 | _INIT_DCS_CMD(0x70, 0x92), |
| 728 | − _INIT_DCS_CMD(0x71, 0x00), | |
| 764 | + _INIT_DCS_CMD(0x71, 0x10), | |
| 729 | 765 | _INIT_DCS_CMD(0x72, 0x00), |
| 730 | − _INIT_DCS_CMD(0xA2, 0x33), | |
| 766 | + _INIT_DCS_CMD(0x79, 0x96), | |
| 767 | + _INIT_DCS_CMD(0x7A, 0x10), | |
| 768 | + _INIT_DCS_CMD(0x88, 0x96), | |
| 769 | + _INIT_DCS_CMD(0x89, 0x10), | |
| 770 | + | |
| 771 | + _INIT_DCS_CMD(0xA2, 0x3F), | |
| 731 | 772 | _INIT_DCS_CMD(0xA3, 0x30), |
| 732 | 773 | _INIT_DCS_CMD(0xA4, 0xC0), |
| 774 | + _INIT_DCS_CMD(0xA5, 0x03), | |
| 775 | + | |
| 733 | 776 | _INIT_DCS_CMD(0xE8, 0x00), |
| 777 | + | |
| 734 | 778 | _INIT_DCS_CMD(0x97, 0x3C), |
| 735 | 779 | _INIT_DCS_CMD(0x98, 0x02), |
| 736 | 780 | _INIT_DCS_CMD(0x99, 0x95), |
| @@ -739,38 +783,68 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 2 unmodified lines | ||
| 739 | 783 | _INIT_DCS_CMD(0x9C, 0x0B), |
| 740 | 784 | _INIT_DCS_CMD(0x9D, 0x0A), |
| 741 | 785 | _INIT_DCS_CMD(0x9E, 0x90), |
| 786 | + | |
| 787 | + _INIT_DCS_CMD(0xFF, 0x25), | |
| 788 | + _INIT_DCS_CMD(0x13, 0x02), | |
| 789 | + _INIT_DCS_CMD(0x14, 0xD7), | |
| 790 | + _INIT_DCS_CMD(0xDB, 0x02), | |
| 791 | + _INIT_DCS_CMD(0xDC, 0xD7), | |
| 792 | + _INIT_DCS_CMD(0x17, 0xCF), | |
| 793 | + _INIT_DCS_CMD(0x19, 0x0F), | |
| 794 | + _INIT_DCS_CMD(0x1B, 0x5B), | |
| 795 | + | |
| 796 | + _INIT_DCS_CMD(0xFF, 0x20), | |
| 797 | + | |
| 798 | + _INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E), | |
| 799 | + _INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA), | |
| 800 | + _INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51), | |
| 801 | + _INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2), | |
| 802 | + | |
| 803 | + _INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84), | |
| 804 | + _INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE), | |
| 805 | + _INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51), | |
| 806 | + _INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2), | |
| 807 | + | |
| 808 | + _INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89), | |
| 809 | + _INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1), | |
| 810 | + _INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53), | |
| 811 | + _INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x75, 0x03, 0x89, 0x03, 0x9C, 0x03, 0xAA, 0x03, 0xB2), | |
| 812 | + | |
| 813 | + _INIT_DCS_CMD(0xFF, 0x21), | |
| 814 | + _INIT_DCS_CMD(0xB0, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x24, 0x00, 0x38, 0x00, 0x4C, 0x00, 0x5E, 0x00, 0x6F, 0x00, 0x7E), | |
| 815 | + _INIT_DCS_CMD(0xB1, 0x00, 0x8C, 0x00, 0xBE, 0x00, 0xE5, 0x01, 0x27, 0x01, 0x58, 0x01, 0xA8, 0x01, 0xE8, 0x01, 0xEA), | |
| 816 | + _INIT_DCS_CMD(0xB2, 0x02, 0x28, 0x02, 0x71, 0x02, 0x9E, 0x02, 0xDA, 0x03, 0x00, 0x03, 0x31, 0x03, 0x40, 0x03, 0x51), | |
| 817 | + _INIT_DCS_CMD(0xB3, 0x03, 0x62, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA), | |
| 818 | + | |
| 819 | + _INIT_DCS_CMD(0xB4, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x27, 0x00, 0x3D, 0x00, 0x52, 0x00, 0x64, 0x00, 0x75, 0x00, 0x84), | |
| 820 | + _INIT_DCS_CMD(0xB5, 0x00, 0x93, 0x00, 0xC5, 0x00, 0xEC, 0x01, 0x2C, 0x01, 0x5D, 0x01, 0xAC, 0x01, 0xEC, 0x01, 0xEE), | |
| 821 | + _INIT_DCS_CMD(0xB6, 0x02, 0x2B, 0x02, 0x73, 0x02, 0xA0, 0x02, 0xDB, 0x03, 0x01, 0x03, 0x31, 0x03, 0x41, 0x03, 0x51), | |
| 822 | + _INIT_DCS_CMD(0xB7, 0x03, 0x63, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA), | |
| 823 | + | |
| 824 | + _INIT_DCS_CMD(0xB8, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x2A, 0x00, 0x40, 0x00, 0x56, 0x00, 0x68, 0x00, 0x7A, 0x00, 0x89), | |
| 825 | + _INIT_DCS_CMD(0xB9, 0x00, 0x98, 0x00, 0xC9, 0x00, 0xF1, 0x01, 0x30, 0x01, 0x61, 0x01, 0xB0, 0x01, 0xEF, 0x01, 0xF1), | |
| 826 | + _INIT_DCS_CMD(0xBA, 0x02, 0x2E, 0x02, 0x76, 0x02, 0xA3, 0x02, 0xDD, 0x03, 0x02, 0x03, 0x32, 0x03, 0x42, 0x03, 0x53), | |
| 827 | + _INIT_DCS_CMD(0xBB, 0x03, 0x66, 0x03, 0x77, 0x03, 0x90, 0x03, 0xAC, 0x03, 0xCA, 0x03, 0xDA), | |
| 828 | + | |
| 742 | 829 | _INIT_DCS_CMD(0xFF, 0xF0), |
| 743 | 830 | _INIT_DCS_CMD(0xFB, 0x01), |
| 744 | 831 | _INIT_DCS_CMD(0x3A, 0x08), |
| 745 | − _INIT_DCS_CMD(0xFF, 0xD0), | |
| 746 | − _INIT_DCS_CMD(0xFB, 0x01), | |
| 747 | − _INIT_DCS_CMD(0x00, 0x33), | |
| 748 | − _INIT_DCS_CMD(0x08, 0x01), | |
| 749 | − _INIT_DCS_CMD(0x09, 0xBF), | |
| 750 | − _INIT_DCS_CMD(0x2F, 0x33), | |
| 751 | − _INIT_DCS_CMD(0xFF, 0x23), | |
| 752 | − _INIT_DCS_CMD(0xFB, 0x01), | |
| 753 | − _INIT_DCS_CMD(0x00, 0x80), | |
| 754 | − _INIT_DCS_CMD(0x07, 0x00), | |
| 755 | − _INIT_DCS_CMD(0xFF, 0x20), | |
| 756 | − _INIT_DCS_CMD(0xFB, 0x01), | |
| 757 | − _INIT_DCS_CMD(0x30, 0x00), | |
| 758 | − _INIT_DCS_CMD(0xFF, 0x24), | |
| 759 | − _INIT_DCS_CMD(0x5C, 0x88), | |
| 760 | − _INIT_DCS_CMD(0x5D, 0x08), | |
| 832 | + | |
| 761 | 833 | _INIT_DCS_CMD(0xFF, 0x10), |
| 762 | 834 | _INIT_DCS_CMD(0xB9, 0x01), |
| 835 | + | |
| 763 | 836 | _INIT_DCS_CMD(0xFF, 0x20), |
| 837 | + | |
| 764 | 838 | _INIT_DCS_CMD(0x18, 0x40), |
| 765 | 839 | _INIT_DCS_CMD(0xFF, 0x10), |
| 840 | + | |
| 766 | 841 | _INIT_DCS_CMD(0xB9, 0x02), |
| 767 | 842 | _INIT_DCS_CMD(0xFF, 0x10), |
| 843 | + | |
| 768 | 844 | _INIT_DCS_CMD(0xFB, 0x01), |
| 769 | − _INIT_DCS_CMD(0xBB, 0x13), | |
| 770 | − _INIT_DCS_CMD(0x3B, 0x03, 0x96, 0x1A, 0x04, 0x04), | |
| 845 | + _INIT_DCS_CMD(0xB0, 0x01), | |
| 771 | 846 | _INIT_DCS_CMD(0x35, 0x00), |
| 772 | − _INIT_DCS_CMD(0x51, 0x0F, 0xFF), | |
| 773 | − _INIT_DCS_CMD(0x53, 0x24), | |
| 847 | + _INIT_DCS_CMD(0x3B, 0x03, 0xAE, 0x1A, 0x04, 0x04), | |
| 774 | 848 | _INIT_DELAY_CMD(100), |
| 775 | 849 | _INIT_DCS_CMD(0x11), |
| 776 | 850 | _INIT_DELAY_CMD(200), |
| @@ -780,7 +854,6 @@ static const struct panel_init_cmd inx_hj110iz_init_cmd[] = { · 3 unmodified lines | ||
| 780 | 854 | }; |
| 781 | 855 | |
| 782 | 856 | static const struct panel_init_cmd boe_init_cmd[] = { |
| 783 | − _INIT_DELAY_CMD(24), | |
| 784 | 857 | _INIT_DCS_CMD(0xB0, 0x05), |
| 785 | 858 | _INIT_DCS_CMD(0xB1, 0xE5), |
| 786 | 859 | _INIT_DCS_CMD(0xB3, 0x52), |
| @@ -1366,6 +1439,10 @@ static int boe_panel_prepare(struct drm_panel *panel) · 579 unmodified lines | ||
| 1366 | 1439 | |
| 1367 | 1440 | usleep_range(10000, 11000); |
| 1368 | 1441 | |
| 1442 | + if (boe->desc->lp11_before_reset) { | |
| 1443 | + mipi_dsi_dcs_nop(boe->dsi); | |
| 1444 | + usleep_range(1000, 2000); | |
| 1445 | + } | |
| 1369 | 1446 | gpiod_set_value(boe->enable_gpio, 1); |
| 1370 | 1447 | usleep_range(1000, 2000); |
| 1371 | 1448 | gpiod_set_value(boe->enable_gpio, 0); |
| @@ -1431,15 +1508,15 @@ static const struct panel_desc boe_tv110c9m_desc = { · 59 unmodified lines | ||
| 1431 | 1508 | }; |
| 1432 | 1509 | |
| 1433 | 1510 | static const struct drm_display_mode inx_hj110iz_default_mode = { |
| 1434 | − .clock = 166594, | |
| 1511 | + .clock = 168432, | |
| 1435 | 1512 | .hdisplay = 1200, |
| 1436 | 1513 | .hsync_start = 1200 + 40, |
| 1437 | 1514 | .hsync_end = 1200 + 40 + 8, |
| 1438 | 1515 | .htotal = 1200 + 40 + 8 + 28, |
| 1439 | 1516 | .vdisplay = 2000, |
| 1440 | 1517 | .vsync_start = 2000 + 26, |
| 1441 | − .vsync_end = 2000 + 26 + 1, | |
| 1442 | − .vtotal = 2000 + 26 + 1 + 149, | |
| 1518 | + .vsync_end = 2000 + 26 + 2, | |
| 1519 | + .vtotal = 2000 + 26 + 2 + 172, | |
| 1443 | 1520 | .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, |
| 1444 | 1521 | }; |
| 1445 | 1522 | |
| @@ -1592,6 +1669,7 @@ static const struct panel_desc boe_tv105wum_nw0_desc = { · 146 unmodified lines | ||
| 1592 | 1669 | .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE | |
| 1593 | 1670 | MIPI_DSI_MODE_LPM, |
| 1594 | 1671 | .init_cmds = boe_init_cmd, |
| 1672 | + .lp11_before_reset = true, | |
| 1595 | 1673 | }; |
| 1596 | 1674 | |
| 1597 | 1675 | static const struct drm_display_mode starry_qfh032011_53g_default_mode = { |
| @@ -5,6 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * Copyright (c) 2022, 2023 Jianhua Lu <lujianhua000@gmail.com> |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | +#include <linux/backlight.h> | |
| 8 | 9 | #include <linux/delay.h> |
| 9 | 10 | #include <linux/gpio/consumer.h> |
| 10 | 11 | #include <linux/module.h> |
| @@ -12,6 +13,8 @@ · 1 unmodified line | ||
| 12 | 13 | #include <linux/of_graph.h> |
| 13 | 14 | #include <linux/regulator/consumer.h> |
| 14 | 15 | |
| 16 | +#include <video/mipi_display.h> | |
| 17 | + | |
| 15 | 18 | #include <drm/drm_connector.h> |
| 16 | 19 | #include <drm/drm_crtc.h> |
| 17 | 20 | #include <drm/drm_mipi_dsi.h> |
| @@ -30,6 +33,7 @@ struct panel_info { · 12 unmodified lines | ||
| 30 | 33 | struct drm_panel panel; |
| 31 | 34 | struct mipi_dsi_device *dsi[2]; |
| 32 | 35 | const struct panel_desc *desc; |
| 36 | + enum drm_panel_orientation orientation; | |
| 33 | 37 | |
| 34 | 38 | struct gpio_desc *reset_gpio; |
| 35 | 39 | struct backlight_device *backlight; |
| @@ -53,6 +57,7 @@ struct panel_desc { · 17 unmodified lines | ||
| 53 | 57 | int (*init_sequence)(struct panel_info *pinfo); |
| 54 | 58 | |
| 55 | 59 | bool is_dual_dsi; |
| 60 | + bool has_dcs_backlight; | |
| 56 | 61 | }; |
| 57 | 62 | |
| 58 | 63 | static inline struct panel_info *to_panel_info(struct drm_panel *panel) |
| @@ -478,6 +483,456 @@ static int elish_csot_init_sequence(struct panel_info *pinfo) · 419 unmodified lines | ||
| 478 | 483 | return 0; |
| 479 | 484 | } |
| 480 | 485 | |
| 486 | +static int j606f_boe_init_sequence(struct panel_info *pinfo) | |
| 487 | +{ | |
| 488 | + struct mipi_dsi_device *dsi = pinfo->dsi[0]; | |
| 489 | + struct device *dev = &dsi->dev; | |
| 490 | + int ret; | |
| 491 | + | |
| 492 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x20); | |
| 493 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 494 | + mipi_dsi_dcs_write_seq(dsi, 0x05, 0xd9); | |
| 495 | + mipi_dsi_dcs_write_seq(dsi, 0x07, 0x78); | |
| 496 | + mipi_dsi_dcs_write_seq(dsi, 0x08, 0x5a); | |
| 497 | + mipi_dsi_dcs_write_seq(dsi, 0x0d, 0x63); | |
| 498 | + mipi_dsi_dcs_write_seq(dsi, 0x0e, 0x91); | |
| 499 | + mipi_dsi_dcs_write_seq(dsi, 0x0f, 0x73); | |
| 500 | + mipi_dsi_dcs_write_seq(dsi, 0x95, 0xeb); | |
| 501 | + mipi_dsi_dcs_write_seq(dsi, 0x96, 0xeb); | |
| 502 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_ROWS, 0x11); | |
| 503 | + mipi_dsi_dcs_write_seq(dsi, 0x6d, 0x66); | |
| 504 | + mipi_dsi_dcs_write_seq(dsi, 0x75, 0xa2); | |
| 505 | + mipi_dsi_dcs_write_seq(dsi, 0x77, 0xb3); | |
| 506 | + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d, 0x00, | |
| 507 | + 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9); | |
| 508 | + mipi_dsi_dcs_write_seq(dsi, 0xb1, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e, 0x01, | |
| 509 | + 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31); | |
| 510 | + mipi_dsi_dcs_write_seq(dsi, 0xb2, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08, 0x03, | |
| 511 | + 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b); | |
| 512 | + mipi_dsi_dcs_write_seq(dsi, 0xb3, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7, 0x03, | |
| 513 | + 0xfd, 0x03, 0xff); | |
| 514 | + mipi_dsi_dcs_write_seq(dsi, 0xb4, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d, 0x00, | |
| 515 | + 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9); | |
| 516 | + mipi_dsi_dcs_write_seq(dsi, 0xb5, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e, 0x01, | |
| 517 | + 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31); | |
| 518 | + mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08, 0x03, | |
| 519 | + 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b); | |
| 520 | + mipi_dsi_dcs_write_seq(dsi, 0xb7, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7, 0x03, | |
| 521 | + 0xfd, 0x03, 0xff); | |
| 522 | + mipi_dsi_dcs_write_seq(dsi, 0xb8, 0x00, 0x08, 0x00, 0x23, 0x00, 0x4d, 0x00, 0x6d, 0x00, | |
| 523 | + 0x89, 0x00, 0xa1, 0x00, 0xb6, 0x00, 0xc9); | |
| 524 | + mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x00, 0xda, 0x01, 0x13, 0x01, 0x3c, 0x01, 0x7e, 0x01, | |
| 525 | + 0xab, 0x01, 0xf7, 0x02, 0x2f, 0x02, 0x31); | |
| 526 | + mipi_dsi_dcs_write_seq(dsi, 0xba, 0x02, 0x67, 0x02, 0xa6, 0x02, 0xd1, 0x03, 0x08, 0x03, | |
| 527 | + 0x2e, 0x03, 0x5b, 0x03, 0x6b, 0x03, 0x7b); | |
| 528 | + mipi_dsi_dcs_write_seq(dsi, 0xbb, 0x03, 0x8e, 0x03, 0xa2, 0x03, 0xb7, 0x03, 0xe7, 0x03, | |
| 529 | + 0xfd, 0x03, 0xff); | |
| 530 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x21); | |
| 531 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 532 | + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65, 0x00, | |
| 533 | + 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1); | |
| 534 | + mipi_dsi_dcs_write_seq(dsi, 0xb1, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76, 0x01, | |
| 535 | + 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29); | |
| 536 | + mipi_dsi_dcs_write_seq(dsi, 0xb2, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00, 0x03, | |
| 537 | + 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73); | |
| 538 | + mipi_dsi_dcs_write_seq(dsi, 0xb3, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf, 0x03, | |
| 539 | + 0xf5, 0x03, 0xf7); | |
| 540 | + mipi_dsi_dcs_write_seq(dsi, 0xb4, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65, 0x00, | |
| 541 | + 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1); | |
| 542 | + mipi_dsi_dcs_write_seq(dsi, 0xb5, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76, 0x01, | |
| 543 | + 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29); | |
| 544 | + mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00, 0x03, | |
| 545 | + 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73); | |
| 546 | + mipi_dsi_dcs_write_seq(dsi, 0xb7, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf, 0x03, | |
| 547 | + 0xf5, 0x03, 0xf7); | |
| 548 | + mipi_dsi_dcs_write_seq(dsi, 0xb8, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x45, 0x00, 0x65, 0x00, | |
| 549 | + 0x81, 0x00, 0x99, 0x00, 0xae, 0x00, 0xc1); | |
| 550 | + mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x00, 0xd2, 0x01, 0x0b, 0x01, 0x34, 0x01, 0x76, 0x01, | |
| 551 | + 0xa3, 0x01, 0xef, 0x02, 0x27, 0x02, 0x29); | |
| 552 | + mipi_dsi_dcs_write_seq(dsi, 0xba, 0x02, 0x5f, 0x02, 0x9e, 0x02, 0xc9, 0x03, 0x00, 0x03, | |
| 553 | + 0x26, 0x03, 0x53, 0x03, 0x63, 0x03, 0x73); | |
| 554 | + mipi_dsi_dcs_write_seq(dsi, 0xbb, 0x03, 0x86, 0x03, 0x9a, 0x03, 0xaf, 0x03, 0xdf, 0x03, | |
| 555 | + 0xf5, 0x03, 0xf7); | |
| 556 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x23); | |
| 557 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 558 | + mipi_dsi_dcs_write_seq(dsi, 0x00, 0x80); | |
| 559 | + mipi_dsi_dcs_write_seq(dsi, 0x07, 0x00); | |
| 560 | + mipi_dsi_dcs_write_seq(dsi, 0x11, 0x01); | |
| 561 | + mipi_dsi_dcs_write_seq(dsi, 0x12, 0x77); | |
| 562 | + mipi_dsi_dcs_write_seq(dsi, 0x15, 0x07); | |
| 563 | + mipi_dsi_dcs_write_seq(dsi, 0x16, 0x07); | |
| 564 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x24); | |
| 565 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 566 | + mipi_dsi_dcs_write_seq(dsi, 0x00, 0x00); | |
| 567 | + mipi_dsi_dcs_write_seq(dsi, 0x01, 0x00); | |
| 568 | + mipi_dsi_dcs_write_seq(dsi, 0x02, 0x1c); | |
| 569 | + mipi_dsi_dcs_write_seq(dsi, 0x03, 0x1c); | |
| 570 | + mipi_dsi_dcs_write_seq(dsi, 0x04, 0x1d); | |
| 571 | + mipi_dsi_dcs_write_seq(dsi, 0x05, 0x1d); | |
| 572 | + mipi_dsi_dcs_write_seq(dsi, 0x06, 0x04); | |
| 573 | + mipi_dsi_dcs_write_seq(dsi, 0x07, 0x04); | |
| 574 | + mipi_dsi_dcs_write_seq(dsi, 0x08, 0x0f); | |
| 575 | + mipi_dsi_dcs_write_seq(dsi, 0x09, 0x0f); | |
| 576 | + mipi_dsi_dcs_write_seq(dsi, 0x0a, 0x0e); | |
| 577 | + mipi_dsi_dcs_write_seq(dsi, 0x0b, 0x0e); | |
| 578 | + mipi_dsi_dcs_write_seq(dsi, 0x0c, 0x0d); | |
| 579 | + mipi_dsi_dcs_write_seq(dsi, 0x0d, 0x0d); | |
| 580 | + mipi_dsi_dcs_write_seq(dsi, 0x0e, 0x0c); | |
| 581 | + mipi_dsi_dcs_write_seq(dsi, 0x0f, 0x0c); | |
| 582 | + mipi_dsi_dcs_write_seq(dsi, 0x10, 0x08); | |
| 583 | + mipi_dsi_dcs_write_seq(dsi, 0x11, 0x08); | |
| 584 | + mipi_dsi_dcs_write_seq(dsi, 0x12, 0x00); | |
| 585 | + mipi_dsi_dcs_write_seq(dsi, 0x13, 0x00); | |
| 586 | + mipi_dsi_dcs_write_seq(dsi, 0x14, 0x00); | |
| 587 | + mipi_dsi_dcs_write_seq(dsi, 0x15, 0x00); | |
| 588 | + mipi_dsi_dcs_write_seq(dsi, 0x16, 0x00); | |
| 589 | + mipi_dsi_dcs_write_seq(dsi, 0x17, 0x00); | |
| 590 | + mipi_dsi_dcs_write_seq(dsi, 0x18, 0x1c); | |
| 591 | + mipi_dsi_dcs_write_seq(dsi, 0x19, 0x1c); | |
| 592 | + mipi_dsi_dcs_write_seq(dsi, 0x1a, 0x1d); | |
| 593 | + mipi_dsi_dcs_write_seq(dsi, 0x1b, 0x1d); | |
| 594 | + mipi_dsi_dcs_write_seq(dsi, 0x1c, 0x04); | |
| 595 | + mipi_dsi_dcs_write_seq(dsi, 0x1d, 0x04); | |
| 596 | + mipi_dsi_dcs_write_seq(dsi, 0x1e, 0x0f); | |
| 597 | + mipi_dsi_dcs_write_seq(dsi, 0x1f, 0x0f); | |
| 598 | + mipi_dsi_dcs_write_seq(dsi, 0x20, 0x0e); | |
| 599 | + mipi_dsi_dcs_write_seq(dsi, 0x21, 0x0e); | |
| 600 | + mipi_dsi_dcs_write_seq(dsi, 0x22, 0x0d); | |
| 601 | + mipi_dsi_dcs_write_seq(dsi, 0x23, 0x0d); | |
| 602 | + mipi_dsi_dcs_write_seq(dsi, 0x24, 0x0c); | |
| 603 | + mipi_dsi_dcs_write_seq(dsi, 0x25, 0x0c); | |
| 604 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_GAMMA_CURVE, 0x08); | |
| 605 | + mipi_dsi_dcs_write_seq(dsi, 0x27, 0x08); | |
| 606 | + mipi_dsi_dcs_write_seq(dsi, 0x28, 0x00); | |
| 607 | + mipi_dsi_dcs_write_seq(dsi, 0x29, 0x00); | |
| 608 | + mipi_dsi_dcs_write_seq(dsi, 0x2a, 0x00); | |
| 609 | + mipi_dsi_dcs_write_seq(dsi, 0x2b, 0x00); | |
| 610 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_LUT, 0x20); | |
| 611 | + mipi_dsi_dcs_write_seq(dsi, 0x2f, 0x0a); | |
| 612 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_ROWS, 0x44); | |
| 613 | + mipi_dsi_dcs_write_seq(dsi, 0x33, 0x0c); | |
| 614 | + mipi_dsi_dcs_write_seq(dsi, 0x34, 0x32); | |
| 615 | + mipi_dsi_dcs_write_seq(dsi, 0x37, 0x44); | |
| 616 | + mipi_dsi_dcs_write_seq(dsi, 0x38, 0x40); | |
| 617 | + mipi_dsi_dcs_write_seq(dsi, 0x39, 0x00); | |
| 618 | + | |
| 619 | + ret = mipi_dsi_dcs_set_pixel_format(dsi, 0x9a); | |
| 620 | + if (ret < 0) { | |
| 621 | + dev_err(dev, "Failed to set pixel format: %d\n", ret); | |
| 622 | + return ret; | |
| 623 | + } | |
| 624 | + | |
| 625 | + mipi_dsi_dcs_write_seq(dsi, 0x3b, 0xa0); | |
| 626 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_3D_CONTROL, 0x42); | |
| 627 | + mipi_dsi_dcs_write_seq(dsi, 0x3f, 0x06); | |
| 628 | + mipi_dsi_dcs_write_seq(dsi, 0x43, 0x06); | |
| 629 | + mipi_dsi_dcs_write_seq(dsi, 0x47, 0x66); | |
| 630 | + mipi_dsi_dcs_write_seq(dsi, 0x4a, 0x9a); | |
| 631 | + mipi_dsi_dcs_write_seq(dsi, 0x4b, 0xa0); | |
| 632 | + mipi_dsi_dcs_write_seq(dsi, 0x4c, 0x91); | |
| 633 | + mipi_dsi_dcs_write_seq(dsi, 0x4d, 0x21); | |
| 634 | + mipi_dsi_dcs_write_seq(dsi, 0x4e, 0x43); | |
| 635 | + | |
| 636 | + ret = mipi_dsi_dcs_set_display_brightness(dsi, 18); | |
| 637 | + if (ret < 0) { | |
| 638 | + dev_err(dev, "Failed to set display brightness: %d\n", ret); | |
| 639 | + return ret; | |
| 640 | + } | |
| 641 | + | |
| 642 | + mipi_dsi_dcs_write_seq(dsi, 0x52, 0x34); | |
| 643 | + mipi_dsi_dcs_write_seq(dsi, 0x55, 0x82, 0x02); | |
| 644 | + mipi_dsi_dcs_write_seq(dsi, 0x56, 0x04); | |
| 645 | + mipi_dsi_dcs_write_seq(dsi, 0x58, 0x21); | |
| 646 | + mipi_dsi_dcs_write_seq(dsi, 0x59, 0x30); | |
| 647 | + mipi_dsi_dcs_write_seq(dsi, 0x5a, 0xba); | |
| 648 | + mipi_dsi_dcs_write_seq(dsi, 0x5b, 0xa0); | |
| 649 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, 0x00, 0x06); | |
| 650 | + mipi_dsi_dcs_write_seq(dsi, 0x5f, 0x00); | |
| 651 | + mipi_dsi_dcs_write_seq(dsi, 0x65, 0x82); | |
| 652 | + mipi_dsi_dcs_write_seq(dsi, 0x7e, 0x20); | |
| 653 | + mipi_dsi_dcs_write_seq(dsi, 0x7f, 0x3c); | |
| 654 | + mipi_dsi_dcs_write_seq(dsi, 0x82, 0x04); | |
| 655 | + mipi_dsi_dcs_write_seq(dsi, 0x97, 0xc0); | |
| 656 | + mipi_dsi_dcs_write_seq(dsi, 0xb6, | |
| 657 | + 0x05, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, | |
| 658 | + 0x05, 0x00, 0x00); | |
| 659 | + mipi_dsi_dcs_write_seq(dsi, 0x92, 0xc4); | |
| 660 | + mipi_dsi_dcs_write_seq(dsi, 0x93, 0x1a); | |
| 661 | + mipi_dsi_dcs_write_seq(dsi, 0x94, 0x5f); | |
| 662 | + mipi_dsi_dcs_write_seq(dsi, 0xd7, 0x55); | |
| 663 | + mipi_dsi_dcs_write_seq(dsi, 0xda, 0x0a); | |
| 664 | + mipi_dsi_dcs_write_seq(dsi, 0xde, 0x08); | |
| 665 | + mipi_dsi_dcs_write_seq(dsi, 0xdb, 0x05); | |
| 666 | + mipi_dsi_dcs_write_seq(dsi, 0xdc, 0xc4); | |
| 667 | + mipi_dsi_dcs_write_seq(dsi, 0xdd, 0x22); | |
| 668 | + mipi_dsi_dcs_write_seq(dsi, 0xdf, 0x05); | |
| 669 | + mipi_dsi_dcs_write_seq(dsi, 0xe0, 0xc4); | |
| 670 | + mipi_dsi_dcs_write_seq(dsi, 0xe1, 0x05); | |
| 671 | + mipi_dsi_dcs_write_seq(dsi, 0xe2, 0xc4); | |
| 672 | + mipi_dsi_dcs_write_seq(dsi, 0xe3, 0x05); | |
| 673 | + mipi_dsi_dcs_write_seq(dsi, 0xe4, 0xc4); | |
| 674 | + mipi_dsi_dcs_write_seq(dsi, 0xe5, 0x05); | |
| 675 | + mipi_dsi_dcs_write_seq(dsi, 0xe6, 0xc4); | |
| 676 | + mipi_dsi_dcs_write_seq(dsi, 0x5c, 0x88); | |
| 677 | + mipi_dsi_dcs_write_seq(dsi, 0x5d, 0x08); | |
| 678 | + mipi_dsi_dcs_write_seq(dsi, 0x8d, 0x88); | |
| 679 | + mipi_dsi_dcs_write_seq(dsi, 0x8e, 0x08); | |
| 680 | + mipi_dsi_dcs_write_seq(dsi, 0xb5, 0x90); | |
| 681 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x25); | |
| 682 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 683 | + mipi_dsi_dcs_write_seq(dsi, 0x05, 0x00); | |
| 684 | + mipi_dsi_dcs_write_seq(dsi, 0x19, 0x07); | |
| 685 | + mipi_dsi_dcs_write_seq(dsi, 0x1f, 0xba); | |
| 686 | + mipi_dsi_dcs_write_seq(dsi, 0x20, 0xa0); | |
| 687 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_GAMMA_CURVE, 0xba); | |
| 688 | + mipi_dsi_dcs_write_seq(dsi, 0x27, 0xa0); | |
| 689 | + mipi_dsi_dcs_write_seq(dsi, 0x33, 0xba); | |
| 690 | + mipi_dsi_dcs_write_seq(dsi, 0x34, 0xa0); | |
| 691 | + mipi_dsi_dcs_write_seq(dsi, 0x3f, 0xe0); | |
| 692 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_VSYNC_TIMING, 0x00); | |
| 693 | + mipi_dsi_dcs_write_seq(dsi, 0x44, 0x00); | |
| 694 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_GET_SCANLINE, 0x40); | |
| 695 | + mipi_dsi_dcs_write_seq(dsi, 0x48, 0xba); | |
| 696 | + mipi_dsi_dcs_write_seq(dsi, 0x49, 0xa0); | |
| 697 | + mipi_dsi_dcs_write_seq(dsi, 0x5b, 0x00); | |
| 698 | + mipi_dsi_dcs_write_seq(dsi, 0x5c, 0x00); | |
| 699 | + mipi_dsi_dcs_write_seq(dsi, 0x5d, 0x00); | |
| 700 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, 0xd0); | |
| 701 | + mipi_dsi_dcs_write_seq(dsi, 0x61, 0xba); | |
| 702 | + mipi_dsi_dcs_write_seq(dsi, 0x62, 0xa0); | |
| 703 | + mipi_dsi_dcs_write_seq(dsi, 0xf1, 0x10); | |
| 704 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x2a); | |
| 705 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 706 | + mipi_dsi_dcs_write_seq(dsi, 0x64, 0x16); | |
| 707 | + mipi_dsi_dcs_write_seq(dsi, 0x67, 0x16); | |
| 708 | + mipi_dsi_dcs_write_seq(dsi, 0x6a, 0x16); | |
| 709 | + mipi_dsi_dcs_write_seq(dsi, 0x70, 0x30); | |
| 710 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_READ_PPS_START, 0xf3); | |
| 711 | + mipi_dsi_dcs_write_seq(dsi, 0xa3, 0xff); | |
| 712 | + mipi_dsi_dcs_write_seq(dsi, 0xa4, 0xff); | |
| 713 | + mipi_dsi_dcs_write_seq(dsi, 0xa5, 0xff); | |
| 714 | + mipi_dsi_dcs_write_seq(dsi, 0xd6, 0x08); | |
| 715 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x26); | |
| 716 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 717 | + mipi_dsi_dcs_write_seq(dsi, 0x00, 0xa1); | |
| 718 | + mipi_dsi_dcs_write_seq(dsi, 0x0a, 0xf2); | |
| 719 | + mipi_dsi_dcs_write_seq(dsi, 0x04, 0x28); | |
| 720 | + mipi_dsi_dcs_write_seq(dsi, 0x06, 0x30); | |
| 721 | + mipi_dsi_dcs_write_seq(dsi, 0x0c, 0x13); | |
| 722 | + mipi_dsi_dcs_write_seq(dsi, 0x0d, 0x0a); | |
| 723 | + mipi_dsi_dcs_write_seq(dsi, 0x0f, 0x0a); | |
| 724 | + mipi_dsi_dcs_write_seq(dsi, 0x11, 0x00); | |
| 725 | + mipi_dsi_dcs_write_seq(dsi, 0x12, 0x50); | |
| 726 | + mipi_dsi_dcs_write_seq(dsi, 0x13, 0x51); | |
| 727 | + mipi_dsi_dcs_write_seq(dsi, 0x14, 0x65); | |
| 728 | + mipi_dsi_dcs_write_seq(dsi, 0x15, 0x00); | |
| 729 | + mipi_dsi_dcs_write_seq(dsi, 0x16, 0x10); | |
| 730 | + mipi_dsi_dcs_write_seq(dsi, 0x17, 0xa0); | |
| 731 | + mipi_dsi_dcs_write_seq(dsi, 0x18, 0x86); | |
| 732 | + mipi_dsi_dcs_write_seq(dsi, 0x19, 0x11); | |
| 733 | + mipi_dsi_dcs_write_seq(dsi, 0x1a, 0x7b); | |
| 734 | + mipi_dsi_dcs_write_seq(dsi, 0x1b, 0x10); | |
| 735 | + mipi_dsi_dcs_write_seq(dsi, 0x1c, 0xbb); | |
| 736 | + mipi_dsi_dcs_write_seq(dsi, 0x22, 0x00); | |
| 737 | + mipi_dsi_dcs_write_seq(dsi, 0x23, 0x00); | |
| 738 | + mipi_dsi_dcs_write_seq(dsi, 0x2a, 0x11); | |
| 739 | + mipi_dsi_dcs_write_seq(dsi, 0x2b, 0x7b); | |
| 740 | + mipi_dsi_dcs_write_seq(dsi, 0x1d, 0x00); | |
| 741 | + mipi_dsi_dcs_write_seq(dsi, 0x1e, 0xc3); | |
| 742 | + mipi_dsi_dcs_write_seq(dsi, 0x1f, 0xc3); | |
| 743 | + mipi_dsi_dcs_write_seq(dsi, 0x24, 0x00); | |
| 744 | + mipi_dsi_dcs_write_seq(dsi, 0x25, 0xc3); | |
| 745 | + mipi_dsi_dcs_write_seq(dsi, 0x2f, 0x05); | |
| 746 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_ROWS, 0xc3); | |
| 747 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_COLUMNS, 0x00); | |
| 748 | + mipi_dsi_dcs_write_seq(dsi, 0x32, 0xc3); | |
| 749 | + mipi_dsi_dcs_write_seq(dsi, 0x39, 0x00); | |
| 750 | + | |
| 751 | + ret = mipi_dsi_dcs_set_pixel_format(dsi, 0xc3); | |
| 752 | + if (ret < 0) { | |
| 753 | + dev_err(dev, "Failed to set pixel format: %d\n", ret); | |
| 754 | + return ret; | |
| 755 | + } | |
| 756 | + | |
| 757 | + mipi_dsi_dcs_write_seq(dsi, 0x20, 0x01); | |
| 758 | + mipi_dsi_dcs_write_seq(dsi, 0x33, 0x11); | |
| 759 | + mipi_dsi_dcs_write_seq(dsi, 0x34, 0x78); | |
| 760 | + mipi_dsi_dcs_write_seq(dsi, 0x35, 0x16); | |
| 761 | + mipi_dsi_dcs_write_seq(dsi, 0xc8, 0x04); | |
| 762 | + mipi_dsi_dcs_write_seq(dsi, 0xc9, 0x82); | |
| 763 | + mipi_dsi_dcs_write_seq(dsi, 0xca, 0x4e); | |
| 764 | + mipi_dsi_dcs_write_seq(dsi, 0xcb, 0x00); | |
| 765 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_READ_PPS_CONTINUE, 0x4c); | |
| 766 | + mipi_dsi_dcs_write_seq(dsi, 0xaa, 0x47); | |
| 767 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x27); | |
| 768 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 769 | + mipi_dsi_dcs_write_seq(dsi, 0x56, 0x06); | |
| 770 | + mipi_dsi_dcs_write_seq(dsi, 0x58, 0x80); | |
| 771 | + mipi_dsi_dcs_write_seq(dsi, 0x59, 0x53); | |
| 772 | + mipi_dsi_dcs_write_seq(dsi, 0x5a, 0x00); | |
| 773 | + mipi_dsi_dcs_write_seq(dsi, 0x5b, 0x14); | |
| 774 | + mipi_dsi_dcs_write_seq(dsi, 0x5c, 0x00); | |
| 775 | + mipi_dsi_dcs_write_seq(dsi, 0x5d, 0x01); | |
| 776 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_CABC_MIN_BRIGHTNESS, 0x20); | |
| 777 | + mipi_dsi_dcs_write_seq(dsi, 0x5f, 0x10); | |
| 778 | + mipi_dsi_dcs_write_seq(dsi, 0x60, 0x00); | |
| 779 | + mipi_dsi_dcs_write_seq(dsi, 0x61, 0x1d); | |
| 780 | + mipi_dsi_dcs_write_seq(dsi, 0x62, 0x00); | |
| 781 | + mipi_dsi_dcs_write_seq(dsi, 0x63, 0x01); | |
| 782 | + mipi_dsi_dcs_write_seq(dsi, 0x64, 0x24); | |
| 783 | + mipi_dsi_dcs_write_seq(dsi, 0x65, 0x1c); | |
| 784 | + mipi_dsi_dcs_write_seq(dsi, 0x66, 0x00); | |
| 785 | + mipi_dsi_dcs_write_seq(dsi, 0x67, 0x01); | |
| 786 | + mipi_dsi_dcs_write_seq(dsi, 0x68, 0x25); | |
| 787 | + mipi_dsi_dcs_write_seq(dsi, 0x00, 0x00); | |
| 788 | + mipi_dsi_dcs_write_seq(dsi, 0x78, 0x00); | |
| 789 | + mipi_dsi_dcs_write_seq(dsi, 0xc3, 0x00); | |
| 790 | + mipi_dsi_dcs_write_seq(dsi, 0xd1, 0x24); | |
| 791 | + mipi_dsi_dcs_write_seq(dsi, 0xd2, 0x30); | |
| 792 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x2a); | |
| 793 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 794 | + mipi_dsi_dcs_write_seq(dsi, 0x22, 0x2f); | |
| 795 | + mipi_dsi_dcs_write_seq(dsi, 0x23, 0x08); | |
| 796 | + mipi_dsi_dcs_write_seq(dsi, 0x24, 0x00); | |
| 797 | + mipi_dsi_dcs_write_seq(dsi, 0x25, 0xc3); | |
| 798 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_GAMMA_CURVE, 0xf8); | |
| 799 | + mipi_dsi_dcs_write_seq(dsi, 0x27, 0x00); | |
| 800 | + mipi_dsi_dcs_write_seq(dsi, 0x28, 0x1a); | |
| 801 | + mipi_dsi_dcs_write_seq(dsi, 0x29, 0x00); | |
| 802 | + mipi_dsi_dcs_write_seq(dsi, 0x2a, 0x1a); | |
| 803 | + mipi_dsi_dcs_write_seq(dsi, 0x2b, 0x00); | |
| 804 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_LUT, 0x1a); | |
| 805 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0xe0); | |
| 806 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 807 | + mipi_dsi_dcs_write_seq(dsi, 0x14, 0x60); | |
| 808 | + mipi_dsi_dcs_write_seq(dsi, 0x16, 0xc0); | |
| 809 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0xf0); | |
| 810 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 811 | + | |
| 812 | + ret = mipi_dsi_dcs_set_pixel_format(dsi, 0x08); | |
| 813 | + if (ret < 0) { | |
| 814 | + dev_err(dev, "Failed to set pixel format: %d\n", ret); | |
| 815 | + return ret; | |
| 816 | + } | |
| 817 | + | |
| 818 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x24); | |
| 819 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 820 | + | |
| 821 | + ret = mipi_dsi_dcs_set_pixel_format(dsi, 0x5d); | |
| 822 | + if (ret < 0) { | |
| 823 | + dev_err(dev, "Failed to set pixel format: %d\n", ret); | |
| 824 | + return ret; | |
| 825 | + } | |
| 826 | + | |
| 827 | + mipi_dsi_dcs_write_seq(dsi, 0x3b, 0x60); | |
| 828 | + mipi_dsi_dcs_write_seq(dsi, 0x4a, 0x5d); | |
| 829 | + mipi_dsi_dcs_write_seq(dsi, 0x4b, 0x60); | |
| 830 | + mipi_dsi_dcs_write_seq(dsi, 0x5a, 0x70); | |
| 831 | + mipi_dsi_dcs_write_seq(dsi, 0x5b, 0x60); | |
| 832 | + mipi_dsi_dcs_write_seq(dsi, 0x91, 0x44); | |
| 833 | + mipi_dsi_dcs_write_seq(dsi, 0x92, 0x75); | |
| 834 | + mipi_dsi_dcs_write_seq(dsi, 0xdb, 0x05); | |
| 835 | + mipi_dsi_dcs_write_seq(dsi, 0xdc, 0x75); | |
| 836 | + mipi_dsi_dcs_write_seq(dsi, 0xdd, 0x22); | |
| 837 | + mipi_dsi_dcs_write_seq(dsi, 0xdf, 0x05); | |
| 838 | + mipi_dsi_dcs_write_seq(dsi, 0xe0, 0x75); | |
| 839 | + mipi_dsi_dcs_write_seq(dsi, 0xe1, 0x05); | |
| 840 | + mipi_dsi_dcs_write_seq(dsi, 0xe2, 0x75); | |
| 841 | + mipi_dsi_dcs_write_seq(dsi, 0xe3, 0x05); | |
| 842 | + mipi_dsi_dcs_write_seq(dsi, 0xe4, 0x75); | |
| 843 | + mipi_dsi_dcs_write_seq(dsi, 0xe5, 0x05); | |
| 844 | + mipi_dsi_dcs_write_seq(dsi, 0xe6, 0x75); | |
| 845 | + mipi_dsi_dcs_write_seq(dsi, 0x5c, 0x00); | |
| 846 | + mipi_dsi_dcs_write_seq(dsi, 0x5d, 0x00); | |
| 847 | + mipi_dsi_dcs_write_seq(dsi, 0x8d, 0x00); | |
| 848 | + mipi_dsi_dcs_write_seq(dsi, 0x8e, 0x00); | |
| 849 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x25); | |
| 850 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 851 | + mipi_dsi_dcs_write_seq(dsi, 0x1f, 0x70); | |
| 852 | + mipi_dsi_dcs_write_seq(dsi, 0x20, 0x60); | |
| 853 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_GAMMA_CURVE, 0x70); | |
| 854 | + mipi_dsi_dcs_write_seq(dsi, 0x27, 0x60); | |
| 855 | + mipi_dsi_dcs_write_seq(dsi, 0x33, 0x70); | |
| 856 | + mipi_dsi_dcs_write_seq(dsi, 0x34, 0x60); | |
| 857 | + mipi_dsi_dcs_write_seq(dsi, 0x48, 0x70); | |
| 858 | + mipi_dsi_dcs_write_seq(dsi, 0x49, 0x60); | |
| 859 | + mipi_dsi_dcs_write_seq(dsi, 0x5b, 0x00); | |
| 860 | + mipi_dsi_dcs_write_seq(dsi, 0x61, 0x70); | |
| 861 | + mipi_dsi_dcs_write_seq(dsi, 0x62, 0x60); | |
| 862 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x26); | |
| 863 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 864 | + mipi_dsi_dcs_write_seq(dsi, 0x02, 0x31); | |
| 865 | + mipi_dsi_dcs_write_seq(dsi, 0x19, 0x0a); | |
| 866 | + mipi_dsi_dcs_write_seq(dsi, 0x1a, 0x7f); | |
| 867 | + mipi_dsi_dcs_write_seq(dsi, 0x1b, 0x0a); | |
| 868 | + mipi_dsi_dcs_write_seq(dsi, 0x1c, 0x0c); | |
| 869 | + mipi_dsi_dcs_write_seq(dsi, 0x2a, 0x0a); | |
| 870 | + mipi_dsi_dcs_write_seq(dsi, 0x2b, 0x7f); | |
| 871 | + mipi_dsi_dcs_write_seq(dsi, 0x1e, 0x75); | |
| 872 | + mipi_dsi_dcs_write_seq(dsi, 0x1f, 0x75); | |
| 873 | + mipi_dsi_dcs_write_seq(dsi, 0x25, 0x75); | |
| 874 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_ROWS, 0x75); | |
| 875 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_PARTIAL_COLUMNS, 0x05); | |
| 876 | + mipi_dsi_dcs_write_seq(dsi, 0x32, 0x8d); | |
| 877 | + | |
| 878 | + ret = mipi_dsi_dcs_set_pixel_format(dsi, 0x75); | |
| 879 | + if (ret < 0) { | |
| 880 | + dev_err(dev, "Failed to set pixel format: %d\n", ret); | |
| 881 | + return ret; | |
| 882 | + } | |
| 883 | + | |
| 884 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x2a); | |
| 885 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 886 | + mipi_dsi_dcs_write_seq(dsi, 0x25, 0x75); | |
| 887 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x10); | |
| 888 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 889 | + mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x01); | |
| 890 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x20); | |
| 891 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 892 | + mipi_dsi_dcs_write_seq(dsi, 0x18, 0x40); | |
| 893 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x10); | |
| 894 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 895 | + mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x02); | |
| 896 | + | |
| 897 | + ret = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK); | |
| 898 | + if (ret < 0) { | |
| 899 | + dev_err(dev, "Failed to set tear on: %d\n", ret); | |
| 900 | + return ret; | |
| 901 | + } | |
| 902 | + | |
| 903 | + mipi_dsi_dcs_write_seq(dsi, 0xbb, 0x13); | |
| 904 | + mipi_dsi_dcs_write_seq(dsi, 0x3b, 0x03, 0x5f, 0x1a, 0x04, 0x04); | |
| 905 | + mipi_dsi_dcs_write_seq(dsi, 0xff, 0x10); | |
| 906 | + usleep_range(10000, 11000); | |
| 907 | + mipi_dsi_dcs_write_seq(dsi, 0xfb, 0x01); | |
| 908 | + | |
| 909 | + ret = mipi_dsi_dcs_set_display_brightness(dsi, 0); | |
| 910 | + if (ret < 0) { | |
| 911 | + dev_err(dev, "Failed to set display brightness: %d\n", ret); | |
| 912 | + return ret; | |
| 913 | + } | |
| 914 | + | |
| 915 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x2c); | |
| 916 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_POWER_SAVE, 0x00); | |
| 917 | + mipi_dsi_dcs_write_seq(dsi, 0x68, 0x05, 0x01); | |
| 918 | + | |
| 919 | + ret = mipi_dsi_dcs_exit_sleep_mode(dsi); | |
| 920 | + if (ret < 0) { | |
| 921 | + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); | |
| 922 | + return ret; | |
| 923 | + } | |
| 924 | + msleep(100); | |
| 925 | + | |
| 926 | + ret = mipi_dsi_dcs_set_display_on(dsi); | |
| 927 | + if (ret < 0) { | |
| 928 | + dev_err(dev, "Failed to set display on: %d\n", ret); | |
| 929 | + return ret; | |
| 930 | + } | |
| 931 | + msleep(30); | |
| 932 | + | |
| 933 | + return 0; | |
| 934 | +} | |
| 935 | + | |
| 481 | 936 | static const struct drm_display_mode elish_boe_modes[] = { |
| 482 | 937 | { |
| 483 | 938 | /* There is only one 120 Hz timing, but it doesn't work perfectly, 104 Hz preferred */ |
| @@ -508,6 +963,22 @@ static const struct drm_display_mode elish_csot_modes[] = { · 24 unmodified lines | ||
| 508 | 963 | }, |
| 509 | 964 | }; |
| 510 | 965 | |
| 966 | +static const struct drm_display_mode j606f_boe_modes[] = { | |
| 967 | + { | |
| 968 | + .clock = (1200 + 58 + 2 + 60) * (2000 + 26 + 2 + 93) * 60 / 1000, | |
| 969 | + .hdisplay = 1200, | |
| 970 | + .hsync_start = 1200 + 58, | |
| 971 | + .hsync_end = 1200 + 58 + 2, | |
| 972 | + .htotal = 1200 + 58 + 2 + 60, | |
| 973 | + .vdisplay = 2000, | |
| 974 | + .vsync_start = 2000 + 26, | |
| 975 | + .vsync_end = 2000 + 26 + 2, | |
| 976 | + .vtotal = 2000 + 26 + 2 + 93, | |
| 977 | + .width_mm = 143, | |
| 978 | + .height_mm = 235, | |
| 979 | + }, | |
| 980 | +}; | |
| 981 | + | |
| 511 | 982 | static const struct panel_desc elish_boe_desc = { |
| 512 | 983 | .modes = elish_boe_modes, |
| 513 | 984 | .num_modes = ARRAY_SIZE(elish_boe_modes), |
| @@ -544,6 +1015,20 @@ static const struct panel_desc elish_csot_desc = { · 30 unmodified lines | ||
| 544 | 1015 | .is_dual_dsi = true, |
| 545 | 1016 | }; |
| 546 | 1017 | |
| 1018 | +static const struct panel_desc j606f_boe_desc = { | |
| 1019 | + .modes = j606f_boe_modes, | |
| 1020 | + .num_modes = ARRAY_SIZE(j606f_boe_modes), | |
| 1021 | + .width_mm = 143, | |
| 1022 | + .height_mm = 235, | |
| 1023 | + .bpc = 8, | |
| 1024 | + .lanes = 4, | |
| 1025 | + .format = MIPI_DSI_FMT_RGB888, | |
| 1026 | + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | | |
| 1027 | + MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM, | |
| 1028 | + .init_sequence = j606f_boe_init_sequence, | |
| 1029 | + .has_dcs_backlight = true, | |
| 1030 | +}; | |
| 1031 | + | |
| 547 | 1032 | static void nt36523_reset(struct panel_info *pinfo) |
| 548 | 1033 | { |
| 549 | 1034 | gpiod_set_value_cansleep(pinfo->reset_gpio, 1); |
| @@ -672,13 +1157,74 @@ static int nt36523_get_modes(struct drm_panel *panel, · 122 unmodified lines | ||
| 672 | 1157 | return pinfo->desc->num_modes; |
| 673 | 1158 | } |
| 674 | 1159 | |
| 1160 | +static enum drm_panel_orientation nt36523_get_orientation(struct drm_panel *panel) | |
| 1161 | +{ | |
| 1162 | + struct panel_info *pinfo = to_panel_info(panel); | |
| 1163 | + | |
| 1164 | + return pinfo->orientation; | |
| 1165 | +} | |
| 1166 | + | |
| 675 | 1167 | static const struct drm_panel_funcs nt36523_panel_funcs = { |
| 676 | 1168 | .disable = nt36523_disable, |
| 677 | 1169 | .prepare = nt36523_prepare, |
| 678 | 1170 | .unprepare = nt36523_unprepare, |
| 679 | 1171 | .get_modes = nt36523_get_modes, |
| 1172 | + .get_orientation = nt36523_get_orientation, | |
| 680 | 1173 | }; |
| 681 | 1174 | |
| 1175 | +static int nt36523_bl_update_status(struct backlight_device *bl) | |
| 1176 | +{ | |
| 1177 | + struct mipi_dsi_device *dsi = bl_get_data(bl); | |
| 1178 | + u16 brightness = backlight_get_brightness(bl); | |
| 1179 | + int ret; | |
| 1180 | + | |
| 1181 | + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; | |
| 1182 | + | |
| 1183 | + ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness); | |
| 1184 | + if (ret < 0) | |
| 1185 | + return ret; | |
| 1186 | + | |
| 1187 | + dsi->mode_flags |= MIPI_DSI_MODE_LPM; | |
| 1188 | + | |
| 1189 | + return 0; | |
| 1190 | +} | |
| 1191 | + | |
| 1192 | +static int nt36523_bl_get_brightness(struct backlight_device *bl) | |
| 1193 | +{ | |
| 1194 | + struct mipi_dsi_device *dsi = bl_get_data(bl); | |
| 1195 | + u16 brightness; | |
| 1196 | + int ret; | |
| 1197 | + | |
| 1198 | + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; | |
| 1199 | + | |
| 1200 | + ret = mipi_dsi_dcs_get_display_brightness_large(dsi, &brightness); | |
| 1201 | + if (ret < 0) | |
| 1202 | + return ret; | |
| 1203 | + | |
| 1204 | + dsi->mode_flags |= MIPI_DSI_MODE_LPM; | |
| 1205 | + | |
| 1206 | + return brightness; | |
| 1207 | +} | |
| 1208 | + | |
| 1209 | +static const struct backlight_ops nt36523_bl_ops = { | |
| 1210 | + .update_status = nt36523_bl_update_status, | |
| 1211 | + .get_brightness = nt36523_bl_get_brightness, | |
| 1212 | +}; | |
| 1213 | + | |
| 1214 | +static struct backlight_device *nt36523_create_backlight(struct mipi_dsi_device *dsi) | |
| 1215 | +{ | |
| 1216 | + struct device *dev = &dsi->dev; | |
| 1217 | + const struct backlight_properties props = { | |
| 1218 | + .type = BACKLIGHT_RAW, | |
| 1219 | + .brightness = 512, | |
| 1220 | + .max_brightness = 4095, | |
| 1221 | + .scale = BACKLIGHT_SCALE_NON_LINEAR, | |
| 1222 | + }; | |
| 1223 | + | |
| 1224 | + return devm_backlight_device_register(dev, dev_name(dev), dev, dsi, | |
| 1225 | + &nt36523_bl_ops, &props); | |
| 1226 | +} | |
| 1227 | + | |
| 682 | 1228 | static int nt36523_probe(struct mipi_dsi_device *dsi) |
| 683 | 1229 | { |
| 684 | 1230 | struct device *dev = &dsi->dev; |
| @@ -730,9 +1276,22 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) · 45 unmodified lines | ||
| 730 | 1276 | mipi_dsi_set_drvdata(dsi, pinfo); |
| 731 | 1277 | drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); |
| 732 | 1278 | |
| 733 | − ret = drm_panel_of_backlight(&pinfo->panel); | |
| 734 | − if (ret) | |
| 735 | − return dev_err_probe(dev, ret, "failed to get backlight\n"); | |
| 1279 | + ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation); | |
| 1280 | + if (ret < 0) { | |
| 1281 | + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); | |
| 1282 | + return ret; | |
| 1283 | + } | |
| 1284 | + | |
| 1285 | + if (pinfo->desc->has_dcs_backlight) { | |
| 1286 | + pinfo->panel.backlight = nt36523_create_backlight(dsi); | |
| 1287 | + if (IS_ERR(pinfo->panel.backlight)) | |
| 1288 | + return dev_err_probe(dev, PTR_ERR(pinfo->panel.backlight), | |
| 1289 | + "Failed to create backlight\n"); | |
| 1290 | + } else { | |
| 1291 | + ret = drm_panel_of_backlight(&pinfo->panel); | |
| 1292 | + if (ret) | |
| 1293 | + return dev_err_probe(dev, ret, "Failed to get backlight\n"); | |
| 1294 | + } | |
| 736 | 1295 | |
| 737 | 1296 | drm_panel_add(&pinfo->panel); |
| 738 | 1297 | |
| @@ -750,6 +1309,10 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) · 11 unmodified lines | ||
| 750 | 1309 | } |
| 751 | 1310 | |
| 752 | 1311 | static const struct of_device_id nt36523_of_match[] = { |
| 1312 | + { | |
| 1313 | + .compatible = "lenovo,j606f-boe-nt36523w", | |
| 1314 | + .data = &j606f_boe_desc, | |
| 1315 | + }, | |
| 753 | 1316 | { |
| 754 | 1317 | .compatible = "xiaomi,elish-boe-nt36523", |
| 755 | 1318 | .data = &elish_boe_desc, |
| @@ -0,0 +1,585 @@ | ||
| 1 | +// SPDX-License-Identifier: GPL-2.0 | |
| 2 | +/* | |
| 3 | + * Samsung S6D7AA0 MIPI-DSI TFT LCD controller drm_panel driver. | |
| 4 | + * | |
| 5 | + * Copyright (C) 2022 Artur Weber <aweber.kernel@gmail.com> | |
| 6 | + */ | |
| 7 | + | |
| 8 | +#include <linux/backlight.h> | |
| 9 | +#include <linux/delay.h> | |
| 10 | +#include <linux/gpio/consumer.h> | |
| 11 | +#include <linux/module.h> | |
| 12 | +#include <linux/regulator/consumer.h> | |
| 13 | +#include <linux/of.h> | |
| 14 | +#include <linux/of_device.h> | |
| 15 | + | |
| 16 | +#include <video/mipi_display.h> | |
| 17 | +#include <drm/drm_mipi_dsi.h> | |
| 18 | +#include <drm/drm_modes.h> | |
| 19 | +#include <drm/drm_panel.h> | |
| 20 | + | |
| 21 | +/* Manufacturer command set */ | |
| 22 | +#define MCS_BL_CTL 0xc3 | |
| 23 | +#define MCS_OTP_RELOAD 0xd0 | |
| 24 | +#define MCS_PASSWD1 0xf0 | |
| 25 | +#define MCS_PASSWD2 0xf1 | |
| 26 | +#define MCS_PASSWD3 0xfc | |
| 27 | + | |
| 28 | +struct s6d7aa0 { | |
| 29 | + struct drm_panel panel; | |
| 30 | + struct mipi_dsi_device *dsi; | |
| 31 | + struct gpio_desc *reset_gpio; | |
| 32 | + struct regulator_bulk_data supplies[2]; | |
| 33 | + const struct s6d7aa0_panel_desc *desc; | |
| 34 | +}; | |
| 35 | + | |
| 36 | +struct s6d7aa0_panel_desc { | |
| 37 | + unsigned int panel_type; | |
| 38 | + int (*init_func)(struct s6d7aa0 *ctx); | |
| 39 | + int (*off_func)(struct s6d7aa0 *ctx); | |
| 40 | + const struct drm_display_mode *drm_mode; | |
| 41 | + unsigned long mode_flags; | |
| 42 | + u32 bus_flags; | |
| 43 | + bool has_backlight; | |
| 44 | + bool use_passwd3; | |
| 45 | +}; | |
| 46 | + | |
| 47 | +enum s6d7aa0_panels { | |
| 48 | + S6D7AA0_PANEL_LSL080AL02, | |
| 49 | + S6D7AA0_PANEL_LSL080AL03, | |
| 50 | + S6D7AA0_PANEL_LTL101AT01, | |
| 51 | +}; | |
| 52 | + | |
| 53 | +static inline struct s6d7aa0 *panel_to_s6d7aa0(struct drm_panel *panel) | |
| 54 | +{ | |
| 55 | + return container_of(panel, struct s6d7aa0, panel); | |
| 56 | +} | |
| 57 | + | |
| 58 | +static void s6d7aa0_reset(struct s6d7aa0 *ctx) | |
| 59 | +{ | |
| 60 | + gpiod_set_value_cansleep(ctx->reset_gpio, 1); | |
| 61 | + msleep(50); | |
| 62 | + gpiod_set_value_cansleep(ctx->reset_gpio, 0); | |
| 63 | + msleep(50); | |
| 64 | +} | |
| 65 | + | |
| 66 | +static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) | |
| 67 | +{ | |
| 68 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 69 | + int ret = 0; | |
| 70 | + | |
| 71 | + if (lock) { | |
| 72 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0xa5, 0xa5); | |
| 73 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0xa5, 0xa5); | |
| 74 | + if (ctx->desc->use_passwd3) | |
| 75 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0x5a, 0x5a); | |
| 76 | + } else { | |
| 77 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD1, 0x5a, 0x5a); | |
| 78 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD2, 0x5a, 0x5a); | |
| 79 | + if (ctx->desc->use_passwd3) | |
| 80 | + mipi_dsi_dcs_write_seq(dsi, MCS_PASSWD3, 0xa5, 0xa5); | |
| 81 | + } | |
| 82 | + | |
| 83 | + return ret; | |
| 84 | +} | |
| 85 | + | |
| 86 | +static int s6d7aa0_on(struct s6d7aa0 *ctx) | |
| 87 | +{ | |
| 88 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 89 | + struct device *dev = &dsi->dev; | |
| 90 | + int ret; | |
| 91 | + | |
| 92 | + ret = ctx->desc->init_func(ctx); | |
| 93 | + if (ret < 0) { | |
| 94 | + dev_err(dev, "Failed to initialize panel: %d\n", ret); | |
| 95 | + gpiod_set_value_cansleep(ctx->reset_gpio, 1); | |
| 96 | + return ret; | |
| 97 | + } | |
| 98 | + | |
| 99 | + ret = mipi_dsi_dcs_set_display_on(dsi); | |
| 100 | + if (ret < 0) { | |
| 101 | + dev_err(dev, "Failed to set display on: %d\n", ret); | |
| 102 | + return ret; | |
| 103 | + } | |
| 104 | + | |
| 105 | + return 0; | |
| 106 | +} | |
| 107 | + | |
| 108 | +static int s6d7aa0_off(struct s6d7aa0 *ctx) | |
| 109 | +{ | |
| 110 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 111 | + struct device *dev = &dsi->dev; | |
| 112 | + int ret; | |
| 113 | + | |
| 114 | + ret = ctx->desc->off_func(ctx); | |
| 115 | + if (ret < 0) { | |
| 116 | + dev_err(dev, "Panel-specific off function failed: %d\n", ret); | |
| 117 | + return ret; | |
| 118 | + } | |
| 119 | + | |
| 120 | + ret = mipi_dsi_dcs_set_display_off(dsi); | |
| 121 | + if (ret < 0) { | |
| 122 | + dev_err(dev, "Failed to set display off: %d\n", ret); | |
| 123 | + return ret; | |
| 124 | + } | |
| 125 | + msleep(64); | |
| 126 | + | |
| 127 | + ret = mipi_dsi_dcs_enter_sleep_mode(dsi); | |
| 128 | + if (ret < 0) { | |
| 129 | + dev_err(dev, "Failed to enter sleep mode: %d\n", ret); | |
| 130 | + return ret; | |
| 131 | + } | |
| 132 | + msleep(120); | |
| 133 | + | |
| 134 | + return 0; | |
| 135 | +} | |
| 136 | + | |
| 137 | +static int s6d7aa0_prepare(struct drm_panel *panel) | |
| 138 | +{ | |
| 139 | + struct s6d7aa0 *ctx = panel_to_s6d7aa0(panel); | |
| 140 | + struct device *dev = &ctx->dsi->dev; | |
| 141 | + int ret; | |
| 142 | + | |
| 143 | + ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); | |
| 144 | + if (ret < 0) { | |
| 145 | + dev_err(dev, "Failed to enable regulators: %d\n", ret); | |
| 146 | + return ret; | |
| 147 | + } | |
| 148 | + | |
| 149 | + s6d7aa0_reset(ctx); | |
| 150 | + | |
| 151 | + ret = s6d7aa0_on(ctx); | |
| 152 | + if (ret < 0) { | |
| 153 | + dev_err(dev, "Failed to initialize panel: %d\n", ret); | |
| 154 | + gpiod_set_value_cansleep(ctx->reset_gpio, 1); | |
| 155 | + return ret; | |
| 156 | + } | |
| 157 | + | |
| 158 | + return 0; | |
| 159 | +} | |
| 160 | + | |
| 161 | +static int s6d7aa0_disable(struct drm_panel *panel) | |
| 162 | +{ | |
| 163 | + struct s6d7aa0 *ctx = panel_to_s6d7aa0(panel); | |
| 164 | + struct device *dev = &ctx->dsi->dev; | |
| 165 | + int ret; | |
| 166 | + | |
| 167 | + ret = s6d7aa0_off(ctx); | |
| 168 | + if (ret < 0) | |
| 169 | + dev_err(dev, "Failed to un-initialize panel: %d\n", ret); | |
| 170 | + | |
| 171 | + return 0; | |
| 172 | +} | |
| 173 | + | |
| 174 | +static int s6d7aa0_unprepare(struct drm_panel *panel) | |
| 175 | +{ | |
| 176 | + struct s6d7aa0 *ctx = panel_to_s6d7aa0(panel); | |
| 177 | + | |
| 178 | + gpiod_set_value_cansleep(ctx->reset_gpio, 1); | |
| 179 | + regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); | |
| 180 | + | |
| 181 | + return 0; | |
| 182 | +} | |
| 183 | + | |
| 184 | +/* Backlight control code */ | |
| 185 | + | |
| 186 | +static int s6d7aa0_bl_update_status(struct backlight_device *bl) | |
| 187 | +{ | |
| 188 | + struct mipi_dsi_device *dsi = bl_get_data(bl); | |
| 189 | + u16 brightness = backlight_get_brightness(bl); | |
| 190 | + int ret; | |
| 191 | + | |
| 192 | + ret = mipi_dsi_dcs_set_display_brightness(dsi, brightness); | |
| 193 | + if (ret < 0) | |
| 194 | + return ret; | |
| 195 | + | |
| 196 | + return 0; | |
| 197 | +} | |
| 198 | + | |
| 199 | +static int s6d7aa0_bl_get_brightness(struct backlight_device *bl) | |
| 200 | +{ | |
| 201 | + struct mipi_dsi_device *dsi = bl_get_data(bl); | |
| 202 | + u16 brightness; | |
| 203 | + int ret; | |
| 204 | + | |
| 205 | + ret = mipi_dsi_dcs_get_display_brightness(dsi, &brightness); | |
| 206 | + if (ret < 0) | |
| 207 | + return ret; | |
| 208 | + | |
| 209 | + return brightness & 0xff; | |
| 210 | +} | |
| 211 | + | |
| 212 | +static const struct backlight_ops s6d7aa0_bl_ops = { | |
| 213 | + .update_status = s6d7aa0_bl_update_status, | |
| 214 | + .get_brightness = s6d7aa0_bl_get_brightness, | |
| 215 | +}; | |
| 216 | + | |
| 217 | +static struct backlight_device * | |
| 218 | +s6d7aa0_create_backlight(struct mipi_dsi_device *dsi) | |
| 219 | +{ | |
| 220 | + struct device *dev = &dsi->dev; | |
| 221 | + const struct backlight_properties props = { | |
| 222 | + .type = BACKLIGHT_RAW, | |
| 223 | + .brightness = 255, | |
| 224 | + .max_brightness = 255, | |
| 225 | + }; | |
| 226 | + | |
| 227 | + return devm_backlight_device_register(dev, dev_name(dev), dev, dsi, | |
| 228 | + &s6d7aa0_bl_ops, &props); | |
| 229 | +} | |
| 230 | + | |
| 231 | +/* Initialization code and structures for LSL080AL02 panel */ | |
| 232 | + | |
| 233 | +static int s6d7aa0_lsl080al02_init(struct s6d7aa0 *ctx) | |
| 234 | +{ | |
| 235 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 236 | + struct device *dev = &dsi->dev; | |
| 237 | + int ret; | |
| 238 | + | |
| 239 | + usleep_range(20000, 25000); | |
| 240 | + | |
| 241 | + ret = s6d7aa0_lock(ctx, false); | |
| 242 | + if (ret < 0) { | |
| 243 | + dev_err(dev, "Failed to unlock registers: %d\n", ret); | |
| 244 | + return ret; | |
| 245 | + } | |
| 246 | + | |
| 247 | + mipi_dsi_dcs_write_seq(dsi, MCS_OTP_RELOAD, 0x00, 0x10); | |
| 248 | + usleep_range(1000, 1500); | |
| 249 | + | |
| 250 | + /* SEQ_B6_PARAM_8_R01 */ | |
| 251 | + mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x10); | |
| 252 | + | |
| 253 | + /* BL_CTL_ON */ | |
| 254 | + mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0x40, 0x00, 0x28); | |
| 255 | + | |
| 256 | + usleep_range(5000, 6000); | |
| 257 | + | |
| 258 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x04); | |
| 259 | + | |
| 260 | + ret = mipi_dsi_dcs_exit_sleep_mode(dsi); | |
| 261 | + if (ret < 0) { | |
| 262 | + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); | |
| 263 | + return ret; | |
| 264 | + } | |
| 265 | + | |
| 266 | + msleep(120); | |
| 267 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_ADDRESS_MODE, 0x00); | |
| 268 | + | |
| 269 | + ret = s6d7aa0_lock(ctx, true); | |
| 270 | + if (ret < 0) { | |
| 271 | + dev_err(dev, "Failed to lock registers: %d\n", ret); | |
| 272 | + return ret; | |
| 273 | + } | |
| 274 | + | |
| 275 | + ret = mipi_dsi_dcs_set_display_on(dsi); | |
| 276 | + if (ret < 0) { | |
| 277 | + dev_err(dev, "Failed to set display on: %d\n", ret); | |
| 278 | + return ret; | |
| 279 | + } | |
| 280 | + | |
| 281 | + return 0; | |
| 282 | +} | |
| 283 | + | |
| 284 | +static int s6d7aa0_lsl080al02_off(struct s6d7aa0 *ctx) | |
| 285 | +{ | |
| 286 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 287 | + | |
| 288 | + /* BL_CTL_OFF */ | |
| 289 | + mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0x40, 0x00, 0x20); | |
| 290 | + | |
| 291 | + return 0; | |
| 292 | +} | |
| 293 | + | |
| 294 | +static const struct drm_display_mode s6d7aa0_lsl080al02_mode = { | |
| 295 | + .clock = (800 + 16 + 4 + 140) * (1280 + 8 + 4 + 4) * 60 / 1000, | |
| 296 | + .hdisplay = 800, | |
| 297 | + .hsync_start = 800 + 16, | |
| 298 | + .hsync_end = 800 + 16 + 4, | |
| 299 | + .htotal = 800 + 16 + 4 + 140, | |
| 300 | + .vdisplay = 1280, | |
| 301 | + .vsync_start = 1280 + 8, | |
| 302 | + .vsync_end = 1280 + 8 + 4, | |
| 303 | + .vtotal = 1280 + 8 + 4 + 4, | |
| 304 | + .width_mm = 108, | |
| 305 | + .height_mm = 173, | |
| 306 | +}; | |
| 307 | + | |
| 308 | +static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al02_desc = { | |
| 309 | + .panel_type = S6D7AA0_PANEL_LSL080AL02, | |
| 310 | + .init_func = s6d7aa0_lsl080al02_init, | |
| 311 | + .off_func = s6d7aa0_lsl080al02_off, | |
| 312 | + .drm_mode = &s6d7aa0_lsl080al02_mode, | |
| 313 | + .mode_flags = MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP, | |
| 314 | + .bus_flags = DRM_BUS_FLAG_DE_HIGH, | |
| 315 | + | |
| 316 | + .has_backlight = false, | |
| 317 | + .use_passwd3 = false, | |
| 318 | +}; | |
| 319 | + | |
| 320 | +/* Initialization code and structures for LSL080AL03 panel */ | |
| 321 | + | |
| 322 | +static int s6d7aa0_lsl080al03_init(struct s6d7aa0 *ctx) | |
| 323 | +{ | |
| 324 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 325 | + struct device *dev = &dsi->dev; | |
| 326 | + int ret; | |
| 327 | + | |
| 328 | + usleep_range(20000, 25000); | |
| 329 | + | |
| 330 | + ret = s6d7aa0_lock(ctx, false); | |
| 331 | + if (ret < 0) { | |
| 332 | + dev_err(dev, "Failed to unlock registers: %d\n", ret); | |
| 333 | + return ret; | |
| 334 | + } | |
| 335 | + | |
| 336 | + if (ctx->desc->panel_type == S6D7AA0_PANEL_LSL080AL03) { | |
| 337 | + mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0xc7, 0x00, 0x29); | |
| 338 | + mipi_dsi_dcs_write_seq(dsi, 0xbc, 0x01, 0x4e, 0xa0); | |
| 339 | + mipi_dsi_dcs_write_seq(dsi, 0xfd, 0x16, 0x10, 0x11, 0x23, | |
| 340 | + 0x09); | |
| 341 | + mipi_dsi_dcs_write_seq(dsi, 0xfe, 0x00, 0x02, 0x03, 0x21, | |
| 342 | + 0x80, 0x78); | |
| 343 | + } else if (ctx->desc->panel_type == S6D7AA0_PANEL_LTL101AT01) { | |
| 344 | + mipi_dsi_dcs_write_seq(dsi, MCS_BL_CTL, 0x40, 0x00, 0x08); | |
| 345 | + mipi_dsi_dcs_write_seq(dsi, 0xbc, 0x01, 0x4e, 0x0b); | |
| 346 | + mipi_dsi_dcs_write_seq(dsi, 0xfd, 0x16, 0x10, 0x11, 0x23, | |
| 347 | + 0x09); | |
| 348 | + mipi_dsi_dcs_write_seq(dsi, 0xfe, 0x00, 0x02, 0x03, 0x21, | |
| 349 | + 0x80, 0x68); | |
| 350 | + } | |
| 351 | + | |
| 352 | + mipi_dsi_dcs_write_seq(dsi, 0xb3, 0x51); | |
| 353 | + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x24); | |
| 354 | + mipi_dsi_dcs_write_seq(dsi, 0xf2, 0x02, 0x08, 0x08); | |
| 355 | + | |
| 356 | + usleep_range(10000, 11000); | |
| 357 | + | |
| 358 | + mipi_dsi_dcs_write_seq(dsi, 0xc0, 0x80, 0x80, 0x30); | |
| 359 | + mipi_dsi_dcs_write_seq(dsi, 0xcd, | |
| 360 | + 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, 0x2e, | |
| 361 | + 0x2e, 0x2e, 0x2e, 0x2e, 0x2e); | |
| 362 | + mipi_dsi_dcs_write_seq(dsi, 0xce, | |
| 363 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 364 | + 0x00, 0x00, 0x00, 0x00, 0x00); | |
| 365 | + mipi_dsi_dcs_write_seq(dsi, 0xc1, 0x03); | |
| 366 | + | |
| 367 | + ret = mipi_dsi_dcs_exit_sleep_mode(dsi); | |
| 368 | + if (ret < 0) { | |
| 369 | + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); | |
| 370 | + return ret; | |
| 371 | + } | |
| 372 | + | |
| 373 | + ret = s6d7aa0_lock(ctx, true); | |
| 374 | + if (ret < 0) { | |
| 375 | + dev_err(dev, "Failed to lock registers: %d\n", ret); | |
| 376 | + return ret; | |
| 377 | + } | |
| 378 | + | |
| 379 | + ret = mipi_dsi_dcs_set_display_on(dsi); | |
| 380 | + if (ret < 0) { | |
| 381 | + dev_err(dev, "Failed to set display on: %d\n", ret); | |
| 382 | + return ret; | |
| 383 | + } | |
| 384 | + | |
| 385 | + return 0; | |
| 386 | +} | |
| 387 | + | |
| 388 | +static int s6d7aa0_lsl080al03_off(struct s6d7aa0 *ctx) | |
| 389 | +{ | |
| 390 | + struct mipi_dsi_device *dsi = ctx->dsi; | |
| 391 | + | |
| 392 | + mipi_dsi_dcs_write_seq(dsi, 0x22, 0x00); | |
| 393 | + | |
| 394 | + return 0; | |
| 395 | +} | |
| 396 | + | |
| 397 | +static const struct drm_display_mode s6d7aa0_lsl080al03_mode = { | |
| 398 | + .clock = (768 + 18 + 16 + 126) * (1024 + 8 + 2 + 6) * 60 / 1000, | |
| 399 | + .hdisplay = 768, | |
| 400 | + .hsync_start = 768 + 18, | |
| 401 | + .hsync_end = 768 + 18 + 16, | |
| 402 | + .htotal = 768 + 18 + 16 + 126, | |
| 403 | + .vdisplay = 1024, | |
| 404 | + .vsync_start = 1024 + 8, | |
| 405 | + .vsync_end = 1024 + 8 + 2, | |
| 406 | + .vtotal = 1024 + 8 + 2 + 6, | |
| 407 | + .width_mm = 122, | |
| 408 | + .height_mm = 163, | |
| 409 | +}; | |
| 410 | + | |
| 411 | +static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = { | |
| 412 | + .panel_type = S6D7AA0_PANEL_LSL080AL03, | |
| 413 | + .init_func = s6d7aa0_lsl080al03_init, | |
| 414 | + .off_func = s6d7aa0_lsl080al03_off, | |
| 415 | + .drm_mode = &s6d7aa0_lsl080al03_mode, | |
| 416 | + .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, | |
| 417 | + .bus_flags = 0, | |
| 418 | + | |
| 419 | + .has_backlight = true, | |
| 420 | + .use_passwd3 = true, | |
| 421 | +}; | |
| 422 | + | |
| 423 | +/* Initialization structures for LTL101AT01 panel */ | |
| 424 | + | |
| 425 | +static const struct drm_display_mode s6d7aa0_ltl101at01_mode = { | |
| 426 | + .clock = (768 + 96 + 16 + 184) * (1024 + 8 + 2 + 6) * 60 / 1000, | |
| 427 | + .hdisplay = 768, | |
| 428 | + .hsync_start = 768 + 96, | |
| 429 | + .hsync_end = 768 + 96 + 16, | |
| 430 | + .htotal = 768 + 96 + 16 + 184, | |
| 431 | + .vdisplay = 1024, | |
| 432 | + .vsync_start = 1024 + 8, | |
| 433 | + .vsync_end = 1024 + 8 + 2, | |
| 434 | + .vtotal = 1024 + 8 + 2 + 6, | |
| 435 | + .width_mm = 148, | |
| 436 | + .height_mm = 197, | |
| 437 | +}; | |
| 438 | + | |
| 439 | +static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = { | |
| 440 | + .panel_type = S6D7AA0_PANEL_LTL101AT01, | |
| 441 | + .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */ | |
| 442 | + .off_func = s6d7aa0_lsl080al03_off, | |
| 443 | + .drm_mode = &s6d7aa0_ltl101at01_mode, | |
| 444 | + .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, | |
| 445 | + .bus_flags = 0, | |
| 446 | + | |
| 447 | + .has_backlight = true, | |
| 448 | + .use_passwd3 = true, | |
| 449 | +}; | |
| 450 | + | |
| 451 | +static int s6d7aa0_get_modes(struct drm_panel *panel, | |
| 452 | + struct drm_connector *connector) | |
| 453 | +{ | |
| 454 | + struct drm_display_mode *mode; | |
| 455 | + struct s6d7aa0 *ctx; | |
| 456 | + | |
| 457 | + ctx = container_of(panel, struct s6d7aa0, panel); | |
| 458 | + if (!ctx) | |
| 459 | + return -EINVAL; | |
| 460 | + | |
| 461 | + mode = drm_mode_duplicate(connector->dev, ctx->desc->drm_mode); | |
| 462 | + if (!mode) | |
| 463 | + return -ENOMEM; | |
| 464 | + | |
| 465 | + drm_mode_set_name(mode); | |
| 466 | + | |
| 467 | + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; | |
| 468 | + connector->display_info.width_mm = mode->width_mm; | |
| 469 | + connector->display_info.height_mm = mode->height_mm; | |
| 470 | + connector->display_info.bus_flags = ctx->desc->bus_flags; | |
| 471 | + drm_mode_probed_add(connector, mode); | |
| 472 | + | |
| 473 | + return 1; | |
| 474 | +} | |
| 475 | + | |
| 476 | +static const struct drm_panel_funcs s6d7aa0_panel_funcs = { | |
| 477 | + .disable = s6d7aa0_disable, | |
| 478 | + .prepare = s6d7aa0_prepare, | |
| 479 | + .unprepare = s6d7aa0_unprepare, | |
| 480 | + .get_modes = s6d7aa0_get_modes, | |
| 481 | +}; | |
| 482 | + | |
| 483 | +static int s6d7aa0_probe(struct mipi_dsi_device *dsi) | |
| 484 | +{ | |
| 485 | + struct device *dev = &dsi->dev; | |
| 486 | + struct s6d7aa0 *ctx; | |
| 487 | + int ret; | |
| 488 | + | |
| 489 | + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); | |
| 490 | + if (!ctx) | |
| 491 | + return -ENOMEM; | |
| 492 | + | |
| 493 | + ctx->desc = of_device_get_match_data(dev); | |
| 494 | + if (!ctx->desc) | |
| 495 | + return -ENODEV; | |
| 496 | + | |
| 497 | + ctx->supplies[0].supply = "power"; | |
| 498 | + ctx->supplies[1].supply = "vmipi"; | |
| 499 | + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), | |
| 500 | + ctx->supplies); | |
| 501 | + if (ret < 0) | |
| 502 | + return dev_err_probe(dev, ret, "Failed to get regulators\n"); | |
| 503 | + | |
| 504 | + ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); | |
| 505 | + if (IS_ERR(ctx->reset_gpio)) | |
| 506 | + return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio), | |
| 507 | + "Failed to get reset-gpios\n"); | |
| 508 | + | |
| 509 | + ctx->dsi = dsi; | |
| 510 | + mipi_dsi_set_drvdata(dsi, ctx); | |
| 511 | + | |
| 512 | + dsi->lanes = 4; | |
| 513 | + dsi->format = MIPI_DSI_FMT_RGB888; | |
| 514 | + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | |
| 515 | + | ctx->desc->mode_flags; | |
| 516 | + | |
| 517 | + drm_panel_init(&ctx->panel, dev, &s6d7aa0_panel_funcs, | |
| 518 | + DRM_MODE_CONNECTOR_DSI); | |
| 519 | + ctx->panel.prepare_prev_first = true; | |
| 520 | + | |
| 521 | + ret = drm_panel_of_backlight(&ctx->panel); | |
| 522 | + if (ret) | |
| 523 | + return dev_err_probe(dev, ret, "Failed to get backlight\n"); | |
| 524 | + | |
| 525 | + /* Use DSI-based backlight as fallback if available */ | |
| 526 | + if (ctx->desc->has_backlight && !ctx->panel.backlight) { | |
| 527 | + ctx->panel.backlight = s6d7aa0_create_backlight(dsi); | |
| 528 | + if (IS_ERR(ctx->panel.backlight)) | |
| 529 | + return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight), | |
| 530 | + "Failed to create backlight\n"); | |
| 531 | + } | |
| 532 | + | |
| 533 | + drm_panel_add(&ctx->panel); | |
| 534 | + | |
| 535 | + ret = mipi_dsi_attach(dsi); | |
| 536 | + if (ret < 0) { | |
| 537 | + dev_err(dev, "Failed to attach to DSI host: %d\n", ret); | |
| 538 | + drm_panel_remove(&ctx->panel); | |
| 539 | + return ret; | |
| 540 | + } | |
| 541 | + | |
| 542 | + return 0; | |
| 543 | +} | |
| 544 | + | |
| 545 | +static void s6d7aa0_remove(struct mipi_dsi_device *dsi) | |
| 546 | +{ | |
| 547 | + struct s6d7aa0 *ctx = mipi_dsi_get_drvdata(dsi); | |
| 548 | + int ret; | |
| 549 | + | |
| 550 | + ret = mipi_dsi_detach(dsi); | |
| 551 | + if (ret < 0) | |
| 552 | + dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret); | |
| 553 | + | |
| 554 | + drm_panel_remove(&ctx->panel); | |
| 555 | +} | |
| 556 | + | |
| 557 | +static const struct of_device_id s6d7aa0_of_match[] = { | |
| 558 | + { | |
| 559 | + .compatible = "samsung,lsl080al02", | |
| 560 | + .data = &s6d7aa0_lsl080al02_desc | |
| 561 | + }, | |
| 562 | + { | |
| 563 | + .compatible = "samsung,lsl080al03", | |
| 564 | + .data = &s6d7aa0_lsl080al03_desc | |
| 565 | + }, | |
| 566 | + { | |
| 567 | + .compatible = "samsung,ltl101at01", | |
| 568 | + .data = &s6d7aa0_ltl101at01_desc | |
| 569 | + }, | |
| 570 | + { /* sentinel */ } | |
| 571 | +}; | |
| 572 | + | |
| 573 | +static struct mipi_dsi_driver s6d7aa0_driver = { | |
| 574 | + .probe = s6d7aa0_probe, | |
| 575 | + .remove = s6d7aa0_remove, | |
| 576 | + .driver = { | |
| 577 | + .name = "panel-samsung-s6d7aa0", | |
| 578 | + .of_match_table = s6d7aa0_of_match, | |
| 579 | + }, | |
| 580 | +}; | |
| 581 | +module_mipi_dsi_driver(s6d7aa0_driver); | |
| 582 | + | |
| 583 | +MODULE_AUTHOR("Artur Weber <aweber.kernel@gmail.com>"); | |
| 584 | +MODULE_DESCRIPTION("Samsung S6D7AA0 MIPI-DSI LCD controller driver"); | |
| 585 | +MODULE_LICENSE("GPL"); | |
| @@ -28,9 +28,6 @@ struct sharp_nt_panel { · 27 unmodified lines | ||
| 28 | 28 | struct gpio_desc *reset_gpio; |
| 29 | 29 | |
| 30 | 30 | bool prepared; |
| 31 | − bool enabled; | |
| 32 | − | |
| 33 | − const struct drm_display_mode *mode; | |
| 34 | 31 | }; |
| 35 | 32 | |
| 36 | 33 | static inline struct sharp_nt_panel *to_sharp_nt_panel(struct drm_panel *panel) |
| @@ -97,19 +94,6 @@ static int sharp_nt_panel_off(struct sharp_nt_panel *sharp_nt) · 60 unmodified lines | ||
| 97 | 94 | return 0; |
| 98 | 95 | } |
| 99 | 96 | |
| 100 | − | |
| 101 | −static int sharp_nt_panel_disable(struct drm_panel *panel) | |
| 102 | −{ | |
| 103 | − struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); | |
| 104 | − | |
| 105 | − if (!sharp_nt->enabled) | |
| 106 | − return 0; | |
| 107 | − | |
| 108 | − sharp_nt->enabled = false; | |
| 109 | − | |
| 110 | − return 0; | |
| 111 | −} | |
| 112 | − | |
| 113 | 97 | static int sharp_nt_panel_unprepare(struct drm_panel *panel) |
| 114 | 98 | { |
| 115 | 99 | struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); |
| @@ -179,28 +163,16 @@ poweroff: · 63 unmodified lines | ||
| 179 | 163 | return ret; |
| 180 | 164 | } |
| 181 | 165 | |
| 182 | −static int sharp_nt_panel_enable(struct drm_panel *panel) | |
| 183 | −{ | |
| 184 | − struct sharp_nt_panel *sharp_nt = to_sharp_nt_panel(panel); | |
| 185 | − | |
| 186 | − if (sharp_nt->enabled) | |
| 187 | − return 0; | |
| 188 | − | |
| 189 | − sharp_nt->enabled = true; | |
| 190 | − | |
| 191 | − return 0; | |
| 192 | −} | |
| 193 | − | |
| 194 | 166 | static const struct drm_display_mode default_mode = { |
| 195 | − .clock = 41118, | |
| 167 | + .clock = (540 + 48 + 32 + 80) * (960 + 3 + 10 + 15) * 60 / 1000, | |
| 196 | 168 | .hdisplay = 540, |
| 197 | 169 | .hsync_start = 540 + 48, |
| 198 | − .hsync_end = 540 + 48 + 80, | |
| 199 | − .htotal = 540 + 48 + 80 + 32, | |
| 170 | + .hsync_end = 540 + 48 + 32, | |
| 171 | + .htotal = 540 + 48 + 32 + 80, | |
| 200 | 172 | .vdisplay = 960, |
| 201 | 173 | .vsync_start = 960 + 3, |
| 202 | − .vsync_end = 960 + 3 + 15, | |
| 203 | − .vtotal = 960 + 3 + 15 + 1, | |
| 174 | + .vsync_end = 960 + 3 + 10, | |
| 175 | + .vtotal = 960 + 3 + 10 + 15, | |
| 204 | 176 | }; |
| 205 | 177 | |
| 206 | 178 | static int sharp_nt_panel_get_modes(struct drm_panel *panel, |
| @@ -227,10 +199,8 @@ static int sharp_nt_panel_get_modes(struct drm_panel *panel, · 20 unmodified lines | ||
| 227 | 199 | } |
| 228 | 200 | |
| 229 | 201 | static const struct drm_panel_funcs sharp_nt_panel_funcs = { |
| 230 | − .disable = sharp_nt_panel_disable, | |
| 231 | 202 | .unprepare = sharp_nt_panel_unprepare, |
| 232 | 203 | .prepare = sharp_nt_panel_prepare, |
| 233 | − .enable = sharp_nt_panel_enable, | |
| 234 | 204 | .get_modes = sharp_nt_panel_get_modes, |
| 235 | 205 | }; |
| 236 | 206 | |
| @@ -239,8 +209,6 @@ static int sharp_nt_panel_add(struct sharp_nt_panel *sharp_nt) · 2 unmodified lines | ||
| 239 | 209 | struct device *dev = &sharp_nt->dsi->dev; |
| 240 | 210 | int ret; |
| 241 | 211 | |
| 242 | − sharp_nt->mode = &default_mode; | |
| 243 | − | |
| 244 | 212 | sharp_nt->supply = devm_regulator_get(dev, "avdd"); |
| 245 | 213 | if (IS_ERR(sharp_nt->supply)) |
| 246 | 214 | return PTR_ERR(sharp_nt->supply); |
| @@ -280,6 +248,7 @@ static int sharp_nt_panel_probe(struct mipi_dsi_device *dsi) · 33 unmodified lines | ||
| 280 | 248 | dsi->lanes = 2; |
| 281 | 249 | dsi->format = MIPI_DSI_FMT_RGB888; |
| 282 | 250 | dsi->mode_flags = MIPI_DSI_MODE_VIDEO | |
| 251 | + MIPI_DSI_MODE_VIDEO_SYNC_PULSE | | |
| 283 | 252 | MIPI_DSI_MODE_VIDEO_HSE | |
| 284 | 253 | MIPI_DSI_CLOCK_NON_CONTINUOUS | |
| 285 | 254 | MIPI_DSI_MODE_NO_EOT_PACKET; |
| @@ -1211,6 +1211,37 @@ static const struct panel_desc bananapi_s070wv20_ct16 = { · 1210 unmodified lines | ||
| 1211 | 1211 | }, |
| 1212 | 1212 | }; |
| 1213 | 1213 | |
| 1214 | +static const struct display_timing boe_ev121wxm_n10_1850_timing = { | |
| 1215 | + .pixelclock = { 69922000, 71000000, 72293000 }, | |
| 1216 | + .hactive = { 1280, 1280, 1280 }, | |
| 1217 | + .hfront_porch = { 48, 48, 48 }, | |
| 1218 | + .hback_porch = { 80, 80, 80 }, | |
| 1219 | + .hsync_len = { 32, 32, 32 }, | |
| 1220 | + .vactive = { 800, 800, 800 }, | |
| 1221 | + .vfront_porch = { 3, 3, 3 }, | |
| 1222 | + .vback_porch = { 14, 14, 14 }, | |
| 1223 | + .vsync_len = { 6, 6, 6 }, | |
| 1224 | +}; | |
| 1225 | + | |
| 1226 | +static const struct panel_desc boe_ev121wxm_n10_1850 = { | |
| 1227 | + .timings = &boe_ev121wxm_n10_1850_timing, | |
| 1228 | + .num_timings = 1, | |
| 1229 | + .bpc = 8, | |
| 1230 | + .size = { | |
| 1231 | + .width = 261, | |
| 1232 | + .height = 163, | |
| 1233 | + }, | |
| 1234 | + .delay = { | |
| 1235 | + .prepare = 9, | |
| 1236 | + .enable = 300, | |
| 1237 | + .unprepare = 300, | |
| 1238 | + .disable = 560, | |
| 1239 | + }, | |
| 1240 | + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, | |
| 1241 | + .bus_flags = DRM_BUS_FLAG_DE_HIGH, | |
| 1242 | + .connector_type = DRM_MODE_CONNECTOR_LVDS, | |
| 1243 | +}; | |
| 1244 | + | |
| 1214 | 1245 | static const struct drm_display_mode boe_hv070wsa_mode = { |
| 1215 | 1246 | .clock = 42105, |
| 1216 | 1247 | .hdisplay = 1024, |
| @@ -2142,6 +2173,38 @@ static const struct panel_desc innolux_at070tn92 = { · 925 unmodified lines | ||
| 2142 | 2173 | .bus_format = MEDIA_BUS_FMT_RGB888_1X24, |
| 2143 | 2174 | }; |
| 2144 | 2175 | |
| 2176 | +static const struct display_timing innolux_g070ace_l01_timing = { | |
| 2177 | + .pixelclock = { 25200000, 35000000, 35700000 }, | |
| 2178 | + .hactive = { 800, 800, 800 }, | |
| 2179 | + .hfront_porch = { 30, 32, 87 }, | |
| 2180 | + .hback_porch = { 30, 32, 87 }, | |
| 2181 | + .hsync_len = { 1, 1, 1 }, | |
| 2182 | + .vactive = { 480, 480, 480 }, | |
| 2183 | + .vfront_porch = { 3, 3, 3 }, | |
| 2184 | + .vback_porch = { 13, 13, 13 }, | |
| 2185 | + .vsync_len = { 1, 1, 4 }, | |
| 2186 | + .flags = DISPLAY_FLAGS_DE_HIGH, | |
| 2187 | +}; | |
| 2188 | + | |
| 2189 | +static const struct panel_desc innolux_g070ace_l01 = { | |
| 2190 | + .timings = &innolux_g070ace_l01_timing, | |
| 2191 | + .num_timings = 1, | |
| 2192 | + .bpc = 8, | |
| 2193 | + .size = { | |
| 2194 | + .width = 152, | |
| 2195 | + .height = 91, | |
| 2196 | + }, | |
| 2197 | + .delay = { | |
| 2198 | + .prepare = 10, | |
| 2199 | + .enable = 50, | |
| 2200 | + .disable = 50, | |
| 2201 | + .unprepare = 500, | |
| 2202 | + }, | |
| 2203 | + .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, | |
| 2204 | + .bus_flags = DRM_BUS_FLAG_DE_HIGH, | |
| 2205 | + .connector_type = DRM_MODE_CONNECTOR_LVDS, | |
| 2206 | +}; | |
| 2207 | + | |
| 2145 | 2208 | static const struct display_timing innolux_g070y2_l01_timing = { |
| 2146 | 2209 | .pixelclock = { 28000000, 29500000, 32000000 }, |
| 2147 | 2210 | .hactive = { 800, 800, 800 }, |
| @@ -3984,6 +4047,9 @@ static const struct of_device_id platform_of_match[] = { · 1836 unmodified lines | ||
| 3984 | 4047 | }, { |
| 3985 | 4048 | .compatible = "bananapi,s070wv20-ct16", |
| 3986 | 4049 | .data = &bananapi_s070wv20_ct16, |
| 4050 | + }, { | |
| 4051 | + .compatible = "boe,ev121wxm-n10-1850", | |
| 4052 | + .data = &boe_ev121wxm_n10_1850, | |
| 3987 | 4053 | }, { |
| 3988 | 4054 | .compatible = "boe,hv070wsa-100", |
| 3989 | 4055 | .data = &boe_hv070wsa |
| @@ -4098,6 +4164,9 @@ static const struct of_device_id platform_of_match[] = { · 108 unmodified lines | ||
| 4098 | 4164 | }, { |
| 4099 | 4165 | .compatible = "innolux,at070tn92", |
| 4100 | 4166 | .data = &innolux_at070tn92, |
| 4167 | + }, { | |
| 4168 | + .compatible = "innolux,g070ace-l01", | |
| 4169 | + .data = &innolux_g070ace_l01, | |
| 4101 | 4170 | }, { |
| 4102 | 4171 | .compatible = "innolux,g070y2-l01", |
| 4103 | 4172 | .data = &innolux_g070y2_l01, |
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | /* Manufacturer specific Commands send via DSI */ |
| 29 | 29 | #define ST7703_CMD_ALL_PIXEL_OFF 0x22 |
| 30 | 30 | #define ST7703_CMD_ALL_PIXEL_ON 0x23 |
| 31 | +#define ST7703_CMD_SETAPID 0xB1 | |
| 31 | 32 | #define ST7703_CMD_SETDISP 0xB2 |
| 32 | 33 | #define ST7703_CMD_SETRGBIF 0xB3 |
| 33 | 34 | #define ST7703_CMD_SETCYC 0xB4 |
| @@ -41,12 +42,15 @@ · 7 unmodified lines | ||
| 41 | 42 | #define ST7703_CMD_UNKNOWN_BF 0xBF |
| 42 | 43 | #define ST7703_CMD_SETSCR 0xC0 |
| 43 | 44 | #define ST7703_CMD_SETPOWER 0xC1 |
| 45 | +#define ST7703_CMD_SETECO 0xC6 | |
| 46 | +#define ST7703_CMD_SETIO 0xC7 | |
| 47 | +#define ST7703_CMD_SETCABC 0xC8 | |
| 44 | 48 | #define ST7703_CMD_SETPANEL 0xCC |
| 45 | −#define ST7703_CMD_UNKNOWN_C6 0xC6 | |
| 46 | 49 | #define ST7703_CMD_SETGAMMA 0xE0 |
| 47 | 50 | #define ST7703_CMD_SETEQ 0xE3 |
| 48 | 51 | #define ST7703_CMD_SETGIP1 0xE9 |
| 49 | 52 | #define ST7703_CMD_SETGIP2 0xEA |
| 53 | +#define ST7703_CMD_UNKNOWN_EF 0xEF | |
| 50 | 54 | |
| 51 | 55 | struct st7703 { |
| 52 | 56 | struct device *dev; |
| @@ -249,8 +253,7 @@ static int xbd599_init_sequence(struct st7703 *ctx) · 196 unmodified lines | ||
| 249 | 253 | * ESD_DET_TIME_SEL = 0 frames |
| 250 | 254 | */); |
| 251 | 255 | |
| 252 | − /* Undocumented command. */ | |
| 253 | − mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_C6, 0x01, 0x00, 0xFF, 0xFF, 0x00); | |
| 256 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x01, 0x00, 0xFF, 0xFF, 0x00); | |
| 254 | 257 | |
| 255 | 258 | mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, |
| 256 | 259 | 0x74, /* VBTHS, VBTLS: VGH = 17V, VBL = -11V */ |
| @@ -338,6 +341,98 @@ static const struct st7703_panel_desc xbd599_desc = { · 81 unmodified lines | ||
| 338 | 341 | .init_sequence = xbd599_init_sequence, |
| 339 | 342 | }; |
| 340 | 343 | |
| 344 | +static int rg353v2_init_sequence(struct st7703 *ctx) | |
| 345 | +{ | |
| 346 | + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); | |
| 347 | + | |
| 348 | + /* | |
| 349 | + * Init sequence was supplied by the panel vendor. | |
| 350 | + */ | |
| 351 | + | |
| 352 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xf1, 0x12, 0x83); | |
| 353 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETAPID, 0x00, 0x00, 0x00, | |
| 354 | + 0xda, 0x80); | |
| 355 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0x00, 0x13, 0x70); | |
| 356 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10, 0x28, | |
| 357 | + 0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00); | |
| 358 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); | |
| 359 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a); | |
| 360 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92); | |
| 361 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22, | |
| 362 | + 0xf0, 0x63); | |
| 363 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05, | |
| 364 | + 0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00, | |
| 365 | + 0x00, 0x00, 0x00, 0x44, 0x25, 0x00, 0x90, 0x0a, | |
| 366 | + 0x00, 0x00, 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37); | |
| 367 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x47); | |
| 368 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00); | |
| 369 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, 0x73, 0x73, 0x50, 0x50, | |
| 370 | + 0x00, 0x00, 0x12, 0x50, 0x00); | |
| 371 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, 0x53, 0xc0, 0x32, | |
| 372 | + 0x32, 0x77, 0xe1, 0xdd, 0xdd, 0x77, 0x77, 0x33, | |
| 373 | + 0x33); | |
| 374 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETECO, 0x82, 0x00, 0xbf, 0xff, | |
| 375 | + 0x00, 0xff); | |
| 376 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETIO, 0xb8, 0x00, 0x0a, 0x00, | |
| 377 | + 0x00, 0x00); | |
| 378 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCABC, 0x10, 0x40, 0x1e, | |
| 379 | + 0x02); | |
| 380 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0b); | |
| 381 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, 0x00, 0x07, 0x0d, | |
| 382 | + 0x37, 0x35, 0x3f, 0x41, 0x44, 0x06, 0x0c, 0x0d, | |
| 383 | + 0x0f, 0x11, 0x10, 0x12, 0x14, 0x1a, 0x00, 0x07, | |
| 384 | + 0x0d, 0x37, 0x35, 0x3f, 0x41, 0x44, 0x06, 0x0c, | |
| 385 | + 0x0d, 0x0f, 0x11, 0x10, 0x12, 0x14, 0x1a); | |
| 386 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07, 0x0b, 0x0b, | |
| 387 | + 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, | |
| 388 | + 0xc0, 0x10); | |
| 389 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, 0xc8, 0x10, 0x02, 0x00, | |
| 390 | + 0x00, 0xb0, 0xb1, 0x11, 0x31, 0x23, 0x28, 0x80, | |
| 391 | + 0xb0, 0xb1, 0x27, 0x08, 0x00, 0x04, 0x02, 0x00, | |
| 392 | + 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, | |
| 393 | + 0x88, 0x88, 0xba, 0x60, 0x24, 0x08, 0x88, 0x88, | |
| 394 | + 0x88, 0x88, 0x88, 0x88, 0x88, 0xba, 0x71, 0x35, | |
| 395 | + 0x18, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, | |
| 396 | + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 397 | + 0x00, 0x00, 0x00); | |
| 398 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, 0x97, 0x0a, 0x82, 0x02, | |
| 399 | + 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 400 | + 0x81, 0x88, 0xba, 0x17, 0x53, 0x88, 0x88, 0x88, | |
| 401 | + 0x88, 0x88, 0x88, 0x80, 0x88, 0xba, 0x06, 0x42, | |
| 402 | + 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x23, 0x00, | |
| 403 | + 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 404 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 405 | + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 406 | + 0x00); | |
| 407 | + mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_EF, 0xff, 0xff, 0x01); | |
| 408 | + | |
| 409 | + return 0; | |
| 410 | +} | |
| 411 | + | |
| 412 | +static const struct drm_display_mode rg353v2_mode = { | |
| 413 | + .hdisplay = 640, | |
| 414 | + .hsync_start = 640 + 40, | |
| 415 | + .hsync_end = 640 + 40 + 2, | |
| 416 | + .htotal = 640 + 40 + 2 + 80, | |
| 417 | + .vdisplay = 480, | |
| 418 | + .vsync_start = 480 + 18, | |
| 419 | + .vsync_end = 480 + 18 + 2, | |
| 420 | + .vtotal = 480 + 18 + 2 + 28, | |
| 421 | + .clock = 24150, | |
| 422 | + .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, | |
| 423 | + .width_mm = 70, | |
| 424 | + .height_mm = 57, | |
| 425 | +}; | |
| 426 | + | |
| 427 | +static const struct st7703_panel_desc rg353v2_desc = { | |
| 428 | + .mode = &rg353v2_mode, | |
| 429 | + .lanes = 4, | |
| 430 | + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | | |
| 431 | + MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM, | |
| 432 | + .format = MIPI_DSI_FMT_RGB888, | |
| 433 | + .init_sequence = rg353v2_init_sequence, | |
| 434 | +}; | |
| 435 | + | |
| 341 | 436 | static int st7703_enable(struct drm_panel *panel) |
| 342 | 437 | { |
| 343 | 438 | struct st7703 *ctx = panel_to_st7703(panel); |
| @@ -598,6 +693,7 @@ static void st7703_remove(struct mipi_dsi_device *dsi) · 254 unmodified lines | ||
| 598 | 693 | } |
| 599 | 694 | |
| 600 | 695 | static const struct of_device_id st7703_of_match[] = { |
| 696 | + { .compatible = "anbernic,rg353v-panel-v2", .data = &rg353v2_desc }, | |
| 601 | 697 | { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc }, |
| 602 | 698 | { .compatible = "xingbangda,xbd599", .data = &xbd599_desc }, |
| 603 | 699 | { /* sentinel */ } |
| @@ -273,10 +273,9 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector) · 272 unmodified lines | ||
| 273 | 273 | edid->width_cm, edid->height_cm); |
| 274 | 274 | |
| 275 | 275 | dp->sink_has_audio = drm_detect_monitor_audio(edid); |
| 276 | + | |
| 277 | + drm_connector_update_edid_property(connector, edid); | |
| 276 | 278 | ret = drm_add_edid_modes(connector, edid); |
| 277 | − if (ret) | |
| 278 | − drm_connector_update_edid_property(connector, | |
| 279 | − edid); | |
| 280 | 279 | } |
| 281 | 280 | mutex_unlock(&dp->lock); |
| 282 | 281 | |
| @@ -140,7 +140,7 @@ static int rockchip_drm_bind(struct device *dev) · 139 unmodified lines | ||
| 140 | 140 | int ret; |
| 141 | 141 | |
| 142 | 142 | /* Remove existing drivers that may own the framebuffer memory. */ |
| 143 | − ret = drm_aperture_remove_framebuffers(false, &rockchip_drm_driver); | |
| 143 | + ret = drm_aperture_remove_framebuffers(&rockchip_drm_driver); | |
| 144 | 144 | if (ret) { |
| 145 | 145 | DRM_DEV_ERROR(dev, |
| 146 | 146 | "Failed to remove existing framebuffers - %d.\n", |
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 123 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 124 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 71 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 16 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 181 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
File renamed without changes.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 334 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 135 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 485 lines aren’t shown here.
This diff is large: its 60 lines aren’t shown here.
This diff is large: its 37 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 83 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 196 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 99 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 17 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 68 lines aren’t shown here.
This diff is large: its 40 lines aren’t shown here.
This diff is large: its 6 lines aren’t shown here.
This diff is large: its 5 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 209 lines aren’t shown here.
This diff is large: its 21 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 52 lines aren’t shown here.
This diff is large: its 69 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 122 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 96 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 65 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 118 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 134 lines aren’t shown here.
This diff is large: its 80 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 150 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 130 lines aren’t shown here.
This diff is large: its 256 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 48 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 65 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 112 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 19 lines aren’t shown here.
This diff is large: its 93 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 52 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 603 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 43 lines aren’t shown here.
This diff is large: its 53 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 388 lines aren’t shown here.
This diff is large: its 82 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 78 lines aren’t shown here.
This diff is large: its 42 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 64 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 44 lines aren’t shown here.
This diff is large: its 46 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 64 lines aren’t shown here.
This diff is large: its 60 lines aren’t shown here.
This diff is large: its 51 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 47 lines aren’t shown here.
This diff is large: its 66 lines aren’t shown here.
This diff is large: its 89 lines aren’t shown here.
This diff is large: its 253 lines aren’t shown here.
This diff is large: its 59 lines aren’t shown here.
This diff is large: its 58 lines aren’t shown here.
This diff is large: its 110 lines aren’t shown here.
This diff is large: its 104 lines aren’t shown here.
This diff is large: its 26 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 32 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 60 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 15 lines aren’t shown here.
This diff is large: its 33 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 27 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 100 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 138 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 28 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 20 lines aren’t shown here.
This diff is large: its 35 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 54 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 45 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 89 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 24 lines aren’t shown here.
This diff is large: its 8 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 79 lines aren’t shown here.
This diff is large: its 68 lines aren’t shown here.
This diff is large: its 22 lines aren’t shown here.
This diff is large: its 30 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 183 lines aren’t shown here.
This diff is large: its 25 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 40 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 34 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 57 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 18 lines aren’t shown here.
This diff is large: its 29 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 14 lines aren’t shown here.
This diff is large: its 23 lines aren’t shown here.
This diff is large: its 36 lines aren’t shown here.
This diff is large: its 13 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 12 lines aren’t shown here.
This diff is large: its 10 lines aren’t shown here.
This diff is large: its 90 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 64 lines aren’t shown here.
This diff is large: its 9 lines aren’t shown here.
This diff is large: its 11 lines aren’t shown here.
This diff is large: its 194 lines aren’t shown here.