Display method, chip, and electronic device
A first electronic device detects that a second electronic device is connected. The first electronic device determines a display mode of the first electronic device based on first information of the first electronic device and/or second information of the second electronic device, where the first/second information includes running status information and/or device information of the first/second electronic device, the display mode of the first electronic device includes: a first display mode and a second display mode, the first display mode means that the first electronic device displays display information of the second electronic device, and the second display mode means that the first electronic device displays only local display information. If the first electronic device determines that the display mode of the first electronic device includes the first display mode, the first electronic device displays the display information of the second electronic device.
1 . A chip, used in a first electronic device, wherein the chip comprises at least one controller, wherein the at least one controller is configured to connect a display and a first interface that are of the first electronic device, wherein the first interface is configured to connect to a second electronic device;
wherein the at least one controller is configured to determine a display mode of the first electronic device based on first information of the first electronic device or second information of the second electronic device, wherein the display mode of the first electronic device comprises: a first display mode and a second display mode, in the first display mode the first electronic device displays display information of the second electronic device, and in the second display mode the first electronic device displays only local display information, and the first information comprises running status information of the first electronic device or device information of the first electronic device, and the second information comprises running status information of the second electronic device or device information of the second electronic device; and
wherein the at least one controller is further configured to: when determining that the display mode of the first electronic device comprises the first display mode, control the display of the first electronic device to display the display information of the second electronic device;
wherein determining the display mode of the first electronic device based on the first information of the first electronic device or the second information of the second electronic device comprises:
when determining, based on the device information of the second electronic device, that the second electronic device is a video source, determining that the display mode of the first electronic device comprises the first display mode;
wherein the at least one controller comprises a first controller, the chip further comprises a first switch, and the first switch is connected to the first controller, the first interface, and the display; and
wherein the first controller is configured to: when determining that the display mode of the first electronic device comprises the first display mode, control the first switch to connect a path between the display and the first interface, so that the display displays the display information of the second electronic device.
2 . The chip according to claim 1 , wherein the at least one controller is further configured to: when determining that the display mode of the first electronic device comprises the second display mode, control the display of the first electronic device to display the display information of the first electronic device.
3 . The chip according to claim 1 , wherein the first controller is configured to:
when determining, based on the first information, that the first electronic device is in at least one of a power-on state, a display screen-on state, or a first running mode, determine that the display mode of the first electronic device comprises the first display mode, wherein in the first running mode the first electronic device is configured to display display information of an external device.
4 . The chip according to claim 1 , wherein the at least one controller further comprises a second controller, the first controller is connected to the first interface through the second controller, and the second controller is configured to determine, based on the device information of the second electronic device, whether the second electronic device is a video source; and
wherein the first controller is further configured to:
receive a first instruction of the second controller; and
when it is determined, according to the first instruction, that the second electronic device is the video source, determine that the display mode of the first electronic device comprises the first display mode; or when it is determined, according to the first instruction, that the second electronic device is not the video source, determine that the display mode of the first electronic device comprises the second display mode.
5 . The chip according to claim 4 , wherein the at least one controller further comprises a third controller, and the first switch is connected to the display through the third controller; and
wherein the first controller is further configured to: when it is determined that the second electronic device is the video source, control the first switch to connect a path between the third controller and the first interface; and when the third controller determines, based on the first information or the second information, that at least one of the following cases is met, determine that the display mode of the first electronic device comprises the first display mode, wherein the cases comprise:
an interface that is on the first electronic device and that is connected to the second electronic device is configured to be in a first state, wherein the first state is a state of inputting display information of an external device into the first electronic device;
an interface that is on the second electronic device and that is connected to the first electronic device is configured to be in a second state, wherein the second state is a state of outputting the display information of the second electronic device to an external device;
a signal loss rate generated during signal transmission between the first electronic device and the second electronic device is less than a threshold;
a format of the display information of the first electronic device matches that of the display information of the second electronic device; and
software or hardware of the first electronic device match/matches software or hardware of the second electronic device.
6 . The chip according to claim 1 , wherein in the first display mode:
the display information of the second electronic device is located at an upper layer of the display information of the first electronic device, and partially covers the display information of the first electronic device.
7 . The chip according to claim 1 , wherein the first controller is configured to:
when determining, based on the second information, that the second electronic device is in at least one of a power-on state, a display screen-on state, or a third running mode, determine that the display mode of the first electronic device comprises the first display mode, wherein in the third running mode an external device displays the display information of the second electronic device.
8 . A method, applied to a first electronic device, comprising:
determining, by at least one controller of the first electronic device, a display mode of the first electronic device based on first information of the first electronic device or second information of a second electronic device, wherein the display mode of the first electronic device comprises: a first display mode and a second display mode, in the first display mode the first electronic device displays display information of the second electronic device, and in the second display mode the first electronic device displays only local display information, and the first information comprises running status information of the first electronic device or device information of the first electronic device, and the second information comprises running status information of the second electronic device or device information of the second electronic device, and wherein a first interface of the first electronic device is configured to connect to the second electronic device; and
when determining, by the at least one controller, that the display mode of the first electronic device comprises the first display mode, controlling the display of the first electronic device to display the display information of the second electronic device;
wherein determining, by the at least one controller, the display mode of the first electronic device based on the first information of the first electronic device or the second information of the second electronic device comprises:
when determining, based on the device information of the second electronic device, that the second electronic device is a video source, determining that the display mode of the first electronic device comprises the first display mode;
wherein the at least one controller comprises a first controller, a first switch is connected to the first controller, the first interface, and the display; and
wherein controlling the display of the first electronic device to display the display information of the second electronic device comprises:
when determining that the display mode of the first electronic device comprises the first display mode, controlling the first switch to connect a path between the display and the first interface, so that the display displays the display information of the second electronic device.
9 . The method according to claim 8 , further comprising:
when determining that the display mode of the first electronic device comprises the second display mode, controlling the display of the first electronic device to display the display information of the first electronic device.
10 . The method according to claim 8 , wherein determining, by the at least one controller of the first electronic device, the display mode of the first electronic device based on the first information of the first electronic device or the second information of the second electronic device comprises:
determining, based on the first information, that the first electronic device is in at least one of a power-on state, a display screen-on state, or a first running mode; and
determining that the display mode of the first electronic device comprises the first display mode, wherein in the first running mode the first electronic device is configured to display display information of an external device.
11 . The method according to claim 8 , wherein the at least one controller further comprises a second controller, the first controller is connected to the first interface through the second controller, and the second controller determines, based on the device information of the second electronic device, whether the second electronic device is a video source; and
wherein the method further comprises:
receiving a first instruction of the second controller; and
when it is determined, according to the first instruction, that the second electronic device is the video source, determining that the display mode of the first electronic device comprises the first display mode; or when it is determined, according to the first instruction, that the second electronic device is not the video source, determining that the display mode of the first electronic device comprises the second display mode.
12 . The method according to claim 8 , wherein the at least one controller further comprises a third controller, and the first switch is connected to the display through the third controller; and
wherein the method further comprises:
when it is determined that the second electronic device is the video source, controlling the first switch to connect a path between the third controller and the first interface; and when the third controller determines, based on the first information or the second information, that at least one of the following cases is met, determining that the display mode of the first electronic device comprises the first display mode, wherein the cases comprise:
an interface that is on the first electronic device and that is connected to the second electronic device is configured to be in a first state, wherein the first state is a state of inputting display information of an external device into the first electronic device;
an interface that is on the second electronic device and that is connected to the first electronic device is configured to be in a second state, wherein the second state is a state of outputting the display information of the second electronic device to an external device;
a signal loss rate generated during signal transmission between the first electronic device and the second electronic device is less than a threshold;
a format of the display information of the first electronic device matches that of the display information of the second electronic device; and
software or hardware of the first electronic device match/matches software or hardware of the second electronic device.
13 . The method according to claim 8 , wherein in the first display mode:
the display information of the second electronic device is located at an upper layer of the display information of the first electronic device, and partially covers the display information of the first electronic device.
14 . The method according to claim 8 , further comprising:
when determining, based on the second information, that the second electronic device is in at least one of a power-on state, a display screen-on state, or a third running mode, determining that the display mode of the first electronic device comprises the first display mode, wherein in the third running mode an external device displays the display information of the second electronic device.
15 . A first electronic device comprising:
a main control chip;
a first controller, a second controller, a third controller, a first switch, a second switch, and a third switch; and
a first interface, connected to the second controller and configured to connect to a second electronic device;
wherein the first switch is connected the first interface, the main control chip, the first controller, and the third controller, and configured to:
under control of the first controller, connect the first interface to the third controller or connect the first interface to the main control chip;
wherein the second switch is connected to the first interface, the main control chip, the third switch, and the first controller, and configured to:
under control of the first controller, connect the first interface to the third switch, or connect the first interface to the main control chip;
wherein the third switch is connected to the main control chip, the second switch and the first controller, and configured to:
under control of the first controller, connect an input device connection module to the main control chip, or connect the input device connection module to the second switch;
wherein the second controller is configured to:
determine, based on device information of the second electronic device, whether the second electronic device connected to the first interface is a video source, and forward a determining result to the first controller;
wherein the first controller is configured to:
when the determining result indicates that the second electronic device is not the video source, control the first switch to connect the main control chip to the first interface, so that the main control chip sends, through the first interface, display information of the first electronic device to the second electronic device for display;
when the determining result indicates that the second electronic device is the video source, determine whether the first electronic device is in a first running mode, and send an instruction to the first switch, where the instruction instructs the first switch to connect the third controller to the first interface; and
wherein the third controller is configured to:
uses a monitor of the first electronic device to display the display information of the second electronic device.
16 . The first electronic device according to claim 15 , wherein the first switch is a multiplexer switch.
17 . The first electronic device according to claim 15 , wherein the second switch is a multiplexer switch.
18 . The first electronic device according to claim 15 , wherein the third controller is further configured to:
determine whether the first electronic device is able to correctly identify the display information of the second electronic device.
19 . The first electronic device according to claim 18 , wherein the third controller is further configured to:
in response to determining that the first electronic device cannot correctly identify the display information of the second electronic device, send a second instruction to the first controller, where the second instruction instructs that the display information of the second electronic device cannot be identified.
20 . The first electronic device according to claim 19 , wherein the first controller is further configured to:
in response to receiving the second instruction, control the second switch to connect the first interface to the main control chip, so that the main control chip reads stored information of the second electronic device through the first interface.